2 Replies Latest reply on Jul 31, 2013 9:31 AM by Geoff Matteson

    Is it possible to change a data source via API?

    Geoff Matteson

      I'm considering using Tableau 8 for an upcoming portal project, and it seems like between the two new APIs it should work, but I have one last question that I can't seem to find an answer to anywhere. One of the requirements of the project is that in certain cases a dashboard will need to use a different data set on the fly. It seems like I can create the new TDE using the data extract API, but can I actually get the dashboard to reload using the new data? For example, if the dashboard is using test.tde by default, I need to generate a new file called (for instance) test-2013073001.tde and reload the dashboard using that extract instead of the original one. The difference in filename (or some other distinguishing factor) is important because other users are likely to load the same dashboard around the same time, and it needs to use the default data extract in that case.


      Is this possible?

        • 1. Re: Is it possible to change a data source via API?
          Joshua Milligan



          The file path for the .tde is contained in the XML definition of the tableau workbook, so it is conceivable that you could programatically change the XML to point to different files on the fly (though this would be a rather difficult process on Tableau Server).  Or using a live connection, you could parameterize a custom SQL statement to point to different connections.


          The simplest solution might be to have two duplicate versions of the workbook each pointing to a different data source.  The portal could determine which workbook to use "on the fly".




          • 2. Re: Is it possible to change a data source via API?
            Geoff Matteson

            Thanks Joshua. Unfortunately, we need to cover too many cases to just make alternate copies of the dashboards, but editing the XML file is an interesting possibility that I'm going to look into further. Either way you answered my main question, which was whether or not this was something the API would just handle for me, so huge thanks!