-
1. Re: Script to download tableau server data source / tableau server data extract
Derrick Austin Feb 23, 2016 8:09 AM (in response to Harsha Tatikonda)Hey Harsha,
You can do this with tabcmd get Here is the documentation on it.: tabcmd Commands
Hope this helps!
- Derrick
-
2. Re: Script to download tableau server data source / tableau server data extract
Ben NevilleFeb 23, 2016 8:16 AM (in response to Harsha Tatikonda)
1 of 1 people found this helpfulIt might help to take a look at the Tabcmd GET command.
Something like:
tabcmd login -s http://servername -t sitename -u username -p password123
tabcmd get "/datasources/DatasourceName.tdsx" -f "C:\FolderName\analysis.tdsx"
should work.
Save it as a .bat file and you can run it on a schedule.
Add a line with something like:
tabcmd publish "C:\FolderName\analysis.tdsx" -n "Sales_Analysis" --replace
This will publish the datasource you just downloaded if you point it at the correct location.
-
3. Re: Script to download tableau server data source / tableau server data extract
Toby ErksonFeb 23, 2016 8:20 AM (in response to Harsha Tatikonda)
Harsha,
I moved this to the Server Admin forum because this is really in the realm of Tableau Server administration and the folks there are much more familiar with the command line utilities when it comes to this type of stuff.
Please let us know if you find a solution and post it here as it will help others.
-
4. Re: Script to download tableau server data source / tableau server data extract
Harsha Tatikonda Feb 23, 2016 8:22 AM (in response to Harsha Tatikonda)Thanks Derrick, Ben for our responses. I will try them out and let you know how it goes.
Sure.. Toby.
-
5. Re: Script to download tableau server data source / tableau server data extract
Harsha Tatikonda Feb 23, 2016 9:00 AM (in response to Ben Neville)1 of 1 people found this helpfulThis worked like charm.
One correction though: "replace" in the following command wont work with .tdsx only applies to .tde.
tabcmd publish "C:\FolderName\analysis.tdsx" -n "Sales_Analysis" --replace
So I replaced it with overwrite
tabcmd publish "C:\FolderName\analysis.tdsx" -n "Sales_Analysis" --overwrite
Thanks again!
-
6. Re: Script to download tableau server data source / tableau server data extract
Atul Bhagwat Aug 15, 2017 8:00 AM (in response to Ben Neville)Hi All,
I tried to execute the tabcmd commands to get a tdsx, however all I got was a html file.. which am sure is not useful.
tabcmd login -s http://servername -t sitename -u username -p password123
tabcmd get "/datasources/DatasourceName.tdsx" -f "C:\FolderName\analysis.tdsx"
Regards,
Atul B
-
9. Re: Script to download tableau server data source / tableau server data extract
Atul Bhagwat Aug 17, 2017 6:30 AM (in response to Toby Erkson)Hi Toby,
I have admin rights on Tableau
I did post the code above.
Regards,
Atul B
-
10. Re: Script to download tableau server data source / tableau server data extract
Toby ErksonAug 17, 2017 6:54 AM (in response to Atul Bhagwat)
The code you posted it the exact same code from Ben's post and that makes no sense Are you saying you have a folder off of your C: drive that's named FolderName and that your server is actually named servername and your data source is named DatasourceName and are going to a site that is named sitename?
By "admin rights" are you saying you have the Tableau Server role of Server Administrator?
-
11. Re: Script to download tableau server data source / tableau server data extract
Atul Bhagwat Aug 17, 2017 7:09 AM (in response to Toby Erkson)Hi Toby,
I did not paste my own 2 lines, as the idea behind it is exactly the same.
Yes, I do have Server administrator rights
tabcmd login -s https://myserver -u username -p mypassword --no-certcheck
tabcmd get "/datasources/name of my ds.tdsx" -f "D:\anyfolder\ds.tdsx"
-
12. Re: Script to download tableau server data source / tableau server data extract
Toby ErksonAug 17, 2017 7:19 AM (in response to Atul Bhagwat)
I did not paste my own 2 lines, as the idea behind it is exactly the same.
When we ask for the exact code that is what we expect. This is for a reason because many times we've seen the wrong code/syntax being used. So while the actual server name, username, and password can be xxxx'd out, the rest of the code displayed should be exactly what you are using.
-
13. Re: Script to download tableau server data source / tableau server data extract
Atul Bhagwat Aug 17, 2017 7:31 AM (in response to Toby Erkson)Hi Toby,
tabcmd login -s https://xxxxxx -u xxxxxxx -p xxxxxxx -t Production --no-certcheck
tabcmd get "/datasources/Ras(PROD).tdsx" -f "D:\Archive\CCT\Ras(PROD).tdsx" --no-certcheck
-
14. Re: Script to download tableau server data source / tableau server data extract
Toby ErksonAug 17, 2017 8:17 AM (in response to Atul Bhagwat)
1 of 1 people found this helpfulAtul Bhagwat wrote:
Hi Toby,
tabcmd login -s https://xxxxxx -u xxxxxxx -p xxxxxxx -t Production --no-certcheck
tabcmd get "/datasources/Ras(PROD).tdsx" -f "D:\Archive\CCT\Ras(PROD).tdsx" --no-certcheck
Thanks
1. Just to make sure, the data source "Ras(PROD)" exists in the Production site, correct?
2. And you are logging on to the site using the Site ID, not that actual Site Name, correct?
3. I recommend deleting the parens from your data source name:
tabcmd get "/datasources/RasPROD.tdsx" -f "D:\Archive\CCT\Ras(PROD).tdsx" --no-certcheck
I tested this with one of my data sources that had parens and it failed with them, succeeded with them removed: