Suppose I created a workbook for a graph (column is called y while x for the row), which is connected to data source A (i.e. a.xlsx)
Can the workbook be connected to another data source (b.hyper), so that the graph can be changed??? I want to perform this by REST API or Document API using python...
Like the following codes:
from tableaudocumentapi import Workbook
sourceWB = Workbook('wb.twb')
sourceWB.datasources[0].connections[0].extract = "b.hyper"
sourceWB.save_as('updated_wb.twb')
Thanks a lot!
Would you consider including both data sources in your workbook and use 2 worksheets?
By the way, if you still want to do this by rest API, by my guess, you may consider this:
Make 2 hypers and use rest api to overwrite the existing data source.
After refresh the data source in the view in server, should be able to refresh the chart.
Become a Viz Whiz on the Forums! Support the Community and master Tableau.