10000 Update publish_workbook.py (#694) · nnevalainen/server-client-python@8d51355 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d51355

Browse files
Update publish_workbook.py (tableau#694)
* Update publish_workbook.py Added below arguments, without this there is a sign-in error on publishing a test file to Tableau Online parser.add_argument('--sitename', '-S', default='', help='sitename required') tableau_auth = TSC.TableauAuth(args.username, password,site_id=args.sitename) * Update publish_workbook.py Edits (as requested) to publish workbooks on Tableau Online which removes the Sign-in Error. * Update publish_workbook.py
1 parent 273af7a commit 8d51355

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

samples/publish_workbook.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ def main():
2727
parser = argparse.ArgumentParser(description='Publish a workbook to server.')
2828
parser.add_argument('--server', '-s', required=True, help='server address')
2929
parser.add_argument('--username', '-u', required=True, help='username to sign into server')
30-
parser.add_argument('--filepath', '-f', required=True, help='filepath to the workbook to publish')
30+
parser.add_argument('--filepath', '-f', required=True, help='computer filepath of the workbook to publish')
3131
parser.add_argument('--logging-level', '-l', choices=['debug', 'info', 'error'], default='error',
3232
help='desired logging level (set to error by default)')
3333
parser.add_argument('--as-job', '-a', help='Publishing asynchronously', action='store_true')
34+
parser.add_argument('--site', '-S', default='', help='id (contentUrl) of site to sign into')
3435

3536
args = parser.parse_args()
3637

@@ -41,7 +42,7 @@ def main():
4142
logging.basicConfig(level=logging_level)
4243

4344
# Step 1: Sign in to server.
44-
tableau_auth = TSC.TableauAuth(args.username, password)
45+
tableau_auth = TSC.TableauAuth(args.username, password, site_id=args.site)
4546
server = TSC.Server(args.server)
4647

4748
overwrite_true = TSC.Server.PublishMode.Overwrite

0 commit comments

Comments
 (0)
0