This can easily be fixed by doing the following:
- Open the workbook in Tableau Desktop
- Connect to the production database/table(s)
- Click Data in the toolbar and then Replace Data Source
- Replace the development data source with the production data source
This will swap the connections out and keep all of your existing work assuming that the fields are named the same. From here, since the workbook now connects to the production database, you should be able to use tabcmd to publish the workbook to server.
Hope this helps,
Thanks for the response Dan. No offense but, it is like we are asking our clients to open the code in the code editor (which costs $2000), modify the connection string in the code before you can deploying it on Tableau Server (and hey make sure you accidentally don't change anything else while doing this change as you might have to unhide some sheets in the process).
I am from the old school where connection string goes in the configuration file, so I find this little weird.
Anyways, if I have no choice but to use Tableau Desktop, than why would I use tabcmd to publish. I will use Desktop for publishing as well.
Idea was that I will create the dashboard once and distribute to N clients along with publishing script. They just have to update database connection properties in the script (using any text editor) and run the script to publish the dashboards on the Tableau Server.
My original question is still valid "How to publish one dashboard to different clients without using Tableau Desktop?".
Hope this is not too demanding.
I'm in exactly the same situation as yours. Design once, and deploy it to multiple sites (which differ only in server name and database name in my case). You can't set it with tabcmd, but only in the workbook. Fortunately, the workbooks (twb) files are in xml format. If you open any twb file in a text editor and search the word 'server=', you will find the bit which specifies the server and the database for each connection.
So in my case, I developed my own little tool (.exe) which essentially examines the text content of twb files and replaces with desired values at those spots. If you are distributing a publishing routine, the routine needs to include the bit to manipulate the twb files. That's my approach.
"How to publish one dashboard to different clients without using Tableau Desktop?"
You may try this one.
tabcmd login -u admin -p admin --site Client1
tabcmd publish sample1.twbx -o
tabcmd publish sample2.twbx -o
There is one solution where right click on the workbook (.twb) and open with notepad then it will show the XML code in that replace the servername, username and password with the production details and save the file and publish the .twb file from tabcmd and give the --db-username & --db-password and --save-db-password so it will successfully publish the workbook to production.
Please check it and tell.