for changing the datasource type (e.g. excel to SQL) you will need to use replace datasource, from within Tableau Desktop. If you are using a datasource published on Tableau Server, you could alter some of the connection properties - e.g. server, database, login info, but that's it. I do not know of a way that you could do this by tabcmd.
Hope this helps,
No, you cannot do it from TabCmd.
You technically could parse your TWB file (which is Xml) and remap to a SQL Server connection. Depending on the complexity of your data structure, it could be quite challenging.
As Vladislav Grigorov pointed out, the best option is to open the workbook in Desktop, add your connection to SQL Server, and use the "Replace Connection".
Concerning the 2nd part of your question, if you used Desktop, you can re-publish your workbook and override it. If you want to make it programmatically, you'd need to download the workbook, update the connection (manually with desktop, or programmatically through Xml parsing), and use TabCmd to re-publish your workbook.
Thanks for the info.
I just wanted to know if i connected Live via in Tableau to different excel files, how to automate the process after publishing it to Tableau server, so whenever the data changes in Excel it will effect in workbook in tableau server.
also locally i connected to SQL server in local machine via live connection in tableau later i want to do it in virtual machine, so can i only edit the connection in XML after copying the workbook to virtual machine and change the database connections via XML?? is it the solution or any other workaround is there when i dont have tableau desktop in virtual machine..
pls help. thanks
This is a quite different need than the original questions.
You might be interested in this article: Automatically Updating Data in a Tableau Server Workbook That Uses a Live Connection to Excel | Tableau Software
The idea is you make a live connection to a file accessible by Tableau Server (on the network). Whenever there is new data in the file, refreshing the data will show the new records.
As for SQL Server, you can edit the connection on the server if the datasource is published:
If it is packaged in your workbook, then I think you'll need to edit the Xml.
Hope I answer your questions,
Ah, so this is what it is all about.
TabCmd will allow you to publish DataSources or Workbooks. As such, your datasource needs to exist as a TDE first. What you publish is not the Excel sheet, it's a Tableau connection to an Excel sheet. To get there, you either need Desktop or the connection (file TDE).
I can think of 2 options; I'm pretty sure there are more:
1) The simplest and best way would be to use Desktop using the method identified in the suggested thread. You need to do this only once; then the server will always pick up the latest data from that network file. If you can't do it yourself, maybe someone else can do it for you? This is a one-timer.
2) If you do not have access to desktop at all, which is somewhat strange, you could look into the Data Extract API. You could write a program that would read from whatever excel sheet you want, generate an extract, and publish it to the server. You would need to schedule this task periodically to do the refresh.
There are most probably other/better solutions, but they may be unsupported / undocumented. Or I might just not know about them.
Honestly - for what you need, get someone to do #1 for you.
I hope this helps,