Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
4 views
in BI by (17.6k points)

I wanted to publish tableau reports via tab cmd commands and was able to do it successfully, one concern I have is "Connecting the twbx file to a data source' via tabcmd commands.

Following are the commands which I used to :

Login to tableau server :

tabcmd.exe login --server http://serverName --user "userName" --password "password" --site ""

Publishing Tableau reports to the Tableau server :

publish -c "E:\Tableau\ActualReportName.twbx" -n "new Report name.twbx" --project ProjectName --db-user "DBuserName" --db-password "DBpassword" 

Although I have given my db credentials while publishing reports, I have nowhere mentioned the DB server Name and DB Name for that matter from which the twbx files would fetch the data.

I have multiple DB's using the same credentials, is there any way in TabCmd to specify the Db server Name and DB name from which reports would fetch data from?

Any help with this would be great! 

1 Answer

0 votes
by (47.2k points)

  • I'd publish a .twb file instead of a .twbx file unless you have a pressing reason, 

  • The first thing which i would look into is Tableau servers support for publishing data sources that your published workbook can connect to via the Tableau server. That will allow you to embed your credentials in the shared data source and to update the workbooks and the connections in separate steps. Especially that is useful if the data connection and the workbooks change at different tempos.

  • The unsupported alternative is to have your script update the twb file before publishing. It's just an XML file and the info you want to change should be with the data connection details. If you go this route, standard disclaimers apply. Save backups. You must not modify the original, generate a revised version, expect to have to tweak your script when Tableau versions change, etc. still it's not too hard to make sense of their XML. You could probably do it with just a few lines of XSLT, but even a simple string replacement might be good enough.

Intellipaat offers Tableau Certification training for the learners to master advanced visualization tools. 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...