Reputation: 80
I am working on Tableau Server where I have say, three solution environments viz. Development
Staging
and Production
.
I have created workbooks in Development
environment and each workbook use many data sources.
For instance lets say I created the workbook
Account Workbook
and I have used these two data sourcesDev-DataSource1
andDev-DataSource2
. I have other data sources available likeStage-DataSource1
,Stage-DataSource2
,Dev-DataSource3
,Stage-DataSource3
etc.
The problem I am facing is while moving workbooks from Development
to Staging
environment, the data sources remains the same.
So continuing with the same instance if I move
Account Workbook
toStaging
fromDevelopment
environment,Account Workbook
still uses the same data sourcesDev-DataSource1
andDev-DataSource2
. I want it to use theStage-DataSource1
andStage-DataSource2
.
This might be a very trivial question or maybe a bad design, but I have created so many workbooks such that creating them again might take loads of time, so please refrain from asking me to recreate those workbooks again. If there is no other way other than that then do tell me.
Thanks in advance
Upvotes: 1
Views: 137
Reputation: 2242
It may also be worth your time to look into the Tableau Python document API: https://github.com/tableau/document-api-python
This would allow you to do (some/all?) of what are describing programmatically.
Upvotes: 0
Reputation: 279
Can you not just edit the data sources, for instance from Dev-DataSource1 to Stage-DataSource1? I assume they have the exact same structures, field names, etc? Right click on the data source and click "Edit". When in the data source page, pull in table(s) from the new datasource and replace the one(s) that are there. If you have joins you may need to recreate them. If you have custom sql you just need to change your sql to point to the new table(s).
You will need to refresh your data sources. It should recognize the fields assuming they are exactly the same as before. If you need to edit the connection, you can do that as well (if you need to point to a different server, etc.) Make sure you have a backup of your workbook in case something goes wrong.
Upvotes: 1