tableau / server-client-python

A Python library for the Tableau Server REST API
https://tableau.github.io/server-client-python/
MIT License
657 stars 422 forks source link

Publish DataSource with multiple database connections - need multiple connection credentials #792

Open bis4fun opened 3 years ago

bis4fun commented 3 years ago

It appears the datasources.publish method does not have functionality to use multiple connection_credentials objects. We have several sources that connect to different databases, and while the source will publish and you can connect a workbook with no issues, you cannot refresh the source without manually entering the credentials.

shinchris commented 3 years ago

The publish_workbook sample has an example of using multiple connections. Have you tried publishing with multiple connection items this way?

bis4fun commented 3 years ago

I looked at this logic, but it is for a workbook with multiple data source connections. After working with the logic I determined that it wouldn't work due to the errors I recieved. The datasources.publish method does not work the same as publish_workbook method did not work the same.

andymiller-og commented 3 years ago

Bump

Anyone out there have a solution for publishing datasources that have multiple connections?

bis4fun commented 3 years ago

Found a workaround for this using the update_connection method. The only issue here is that you need the connection id in order to make it work. You can obtain the id from the rest API, but couldn't locate it elsewhere. It would be great if it could be part of the payload from the datasources method.

s-ahuja commented 3 years ago

I tried today and I wasn't able to publish a datasource file with multiple connections. Does anyone have any suggestions?

jacalata commented 2 years ago

I think this will also be fixable with #1057

lerda01 commented 1 year ago

Just to validate until this bug is addressed the only option is to update the datasource after is has been published? I have found no way to pass multiple connection credentials when using the Publish method via TSC or the Rest API.