Export sample#263
Merged
graysonarts merged 4 commits intotableau:developmenttableau/server-client-python:developmentfrom Feb 16, 2018
graysonarts:export_sampleCopy head branch name to clipboard
Merged
Export sample#263graysonarts merged 4 commits intotableau:developmenttableau/server-client-python:developmentfrom graysonarts:export_sampleCopy head branch name to clipboard
graysonarts merged 4 commits intotableau:developmenttableau/server-client-python:developmentfrom
graysonarts:export_sampleCopy head branch name to clipboard
Conversation
shinchris
reviewed
Feb 14, 2018
samples/export.py
Outdated
|
|
||
|
|
||
| def main(): | ||
| parser = argparse.ArgumentParser(description='Get all of the refresh tasks available on a server') |
Contributor
There was a problem hiding this comment.
Description here and for list.py is for refresh tasks.
shinchris
approved these changes
Feb 14, 2018
t8y8
approved these changes
Feb 15, 2018
samples/export.py
Outdated
| views = filter(lambda x: x.id == args.resource_id, | ||
| TSC.Pager(server.views.get)) | ||
| view = views.pop() | ||
| (populate_name, option_factory_name, member_name, extension) = args.type |
Collaborator
There was a problem hiding this comment.
It took me a few reads to understand what's going on here.
I think the code is fine, but some suggestions for clarity:
- Rename 'populate_name' to 'populate_func_name'
- Add a one line comment above that says something like "We've got lots of types and classes, this is code to figure out all the right functions to call" or something
| tableau_auth = TSC.TableauAuth(args.username, password, args.site) | ||
| server = TSC.Server(args.server, use_server_version=True) | ||
| with server.auth.sign_in(tableau_auth): | ||
| views = filter(lambda x: x.id == args.resource_id, |
Collaborator
There was a problem hiding this comment.
Code is fine, and I'm not sure if this works so ignore it if not: But can we filter on ID natively yet?
Contributor
Author
There was a problem hiding this comment.
I'm not sure views supports that right now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a sample/tool for using export from the rest api. It also supports view filters.