8000 Extract refresh support by graysonarts · Pull Request #159 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Extract refresh support #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 24, 2017
Merged

Extract refresh support #159

merged 12 commits into from
Mar 24, 2017

Conversation

graysonarts
Copy link
Contributor

Okay, that's better.

t8y8 and others added 10 commits March 23, 2017 13:49
Part two of #125 

This backfills all existing APIs with their minimum version.
Checking this in early in release cycle for baketime.
* Add a new decorator that checks parameters against the version. Used with the @api decorator.
* Add extract_only flags to workbooks and data sources, protected behind v2.5 flag
…d sample to download_view_image.py. Comments clean up
@@ -0,0 +1,71 @@
####
# TODO
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dang it, I need to write the documentation for this. Coming soon

Copy link
Collaborator
@t8y8 t8y8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Two minor things

@@ -33,6 +33,10 @@ def __init__(self, name, priority, schedule_type, execution_order, interval_item
self.priority = priority
self.schedule_type = schedule_type

def __repr__(self):
print(self.__dict__)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Print?

return list(all_tasks)

@classmethod
def _parse_task(cls, element):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_parse_element

@graysonarts graysonarts merged commit d791dc1 into tableau:vnext Mar 24, 2017
@graysonarts graysonarts deleted the extract-refresh-support branch March 24, 2017 21:13
@graysonarts graysonarts restored the extract-refresh-support branch April 12, 2017 15:40
@fergomrom
Copy link

Hey @RussTheAerialist

This looks great, thanks for working on the extract refresh feature!

Is this safe to be used in production already? If not, do you have any ETA?

Thanks again!

@graysonarts
Copy link
Contributor Author

Hi @ferkaz, this feature is slated to be a future release of the Tableau Server. It's not guaranteed in the next release, but should be there. Oh, and now that I look at it, I forgot to tag them with the rest api version, so I need to go a new pull request for that!

@fergomrom
Copy link

Sounds good, thank you!

t8y8 pushed a commit to t8y8/server-client-python that referenced this pull request Jun 28, 2017
* Response to code reviews. Put all request options into 1 file. renamed sample to download_view_image.py. Comments clean up

* Add api annotation to all current endpoints (tableau#125)

Part two of tableau#125 

This backfills all existing APIs with their minimum version.
Checking this in early in release cycle for baketime.

* initial implement of get all and get specific for Extract Refresh Tasks

* fixing test failure in the schedule_item code

* pep8 fixes

* Download with extract_only and parameter checking (tableau#143)

* Add a new decorator that checks parameters against the version. Used with the @api decorator.
* Add extract_only flags to workbooks and data sources, protected behind v2.5 flag

* Correct the path to extract refresh tasks

* fixing missed pep8 failure

* adding runNow to the interface

* fixing pep8 issues

* Add header documentation to the sample.

* addressing tyler's feedback
@dungkr89
Copy link

Hi all, I tried to run the file and got the error: "refresh_tasks.py: error: too few arguments" when I called:
python samples\refresh_tasks.py -s "http://server.it" -u "my name" -S "Default"
Any idea? Thanks

@graysonarts
Copy link
Contributor Author
graysonarts commented Sep 27, 2017 via email

@dungkr89
Copy link

@RussTheAerialist Thank you for your reply, I'm using TSC0.5.1 and the error looks like that:

capture 1

@graysonarts
Copy link
Contributor Author

Oh! okay, I see what you mean. So the refresh tasks sample has three "commands" built into it. You can list all of the refresh tasks, you can run one of the refresh tasks, or you get information about the refresh task. In your case, if you run it like the following, it should work:

python samples\refresh_tasks.py -s "http://server.it" -u "my name" -S "Default" list

list will output a list of tasks, and you can then call info with the id of the task to get more details about it. Once you've identified which one you want to run, you can then use the run command to kick it off.

@dungkr89
Copy link
dungkr89 commented Sep 27, 2017

@RussTheAerialist Thank you, it works well
However my idea is writting code to refresh a datasource on Tableau Server from a location file. It looks like use "Tableau Data Extract Command-Line Utility to refresh extract" to extract data. You have any suggest? Thank you

@graysonarts
Copy link
Contributor Author

If you are getting a sign in error either you typed the password wrong, or you don't have access to the site you are trying to login to. If you are logging into the default site, you don't need to specify it on the command line. Try removing the -S "Default".

@andylam1989
Copy link

Thank you @RussTheAerialist, I have moved to other project so I havent seen for some days. I have just tested it and it work as your suggestion. It's very nice experience, thank you again ;)

@nnevalainen nnevalainen mentioned this pull request Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0