tableau / document-api-python

Create and modify Tableau workbook and datasource files
https://tableau.github.io/document-api-python/
MIT License
326 stars 178 forks source link

Please add the the feature to update "warehouse" name in database connection #171

Open abinpaul opened 4 years ago

abinpaul commented 4 years ago

Hi

from tableaudocumentapi import Datasource sourceTDS = Datasource.from_file('xyz.tdsx') sourceTDS.connections[0].warehouse = "REPORTING" sourceTDS.connections[0].server = "MY-NEW-SERVER" sourceTDS.connections[0].dbname = "NEW-DATABASE" sourceTDS.connections[0].username = "benl" sourceTDS.save()

In the above code warehouse alone is not getting updated.Could you please help to update the warehouse also.This is useful when working with snowflake cloud database

Thanks in advance Abin

sadhathameed commented 1 week ago

was able to update warehouse successfully implementing below line sourceTDS.connections[0]._connectionXML.attrib["warehouse"] = "warehouse_name"