1 Reply Latest reply on Dec 3, 2018 10:01 AM by Sam McKnight

    Bulk change Tableau server datasource

    Nick Paramonov

      Hello experts,


      We're migrating our biggest database to a different datacenter and its alias changes.

      Many workbooks on our Tableau Server use it as embedded datasource, some of them use it as separately published DS.


      I'm trying to find a solution (Python?) to automate the procedure of replacing DB server in our embedded/non-embedded datasources.

      Currently i only came up with a very simple script to change server in the embedded datasource of a locally stored (downloaded) .twb.


      Does anyone have any experience with a script that could query all the sites/projects for workbooks with a certain DataSource, download them, change the server and then upload to the same location with the same name?


      Thanks in advance,


        • 1. Re: Bulk change Tableau server datasource
          Sam McKnight

          You could use the REST API to download each data source, update the XML, and republish. Personally, I would try three simpler options first.


          Option 1: Create a DNS alias so that the alias is the old server name and it points to the new server.

          Option 2: Change the hosts file on Tableau Server to do the same thing as option 1.

          Option 3: In Server, click on the Data Sources tab. Filter to show only data sources that use the old connection. Select them, and then under Actions, click Edit Connection. This will allow you to bulk update the connection string. See Edit Connections on Tableau Server - Tableau