server-client-python
server-client-python copied to clipboard
Publish DataSource with multiple database connections - need multiple connection credentials
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.
The publish_workbook sample has an example of using multiple connections. Have you tried publishing with multiple connection items this way?
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.
Bump
Anyone out there have a solution for publishing datasources that have multiple connections?
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.
I tried today and I wasn't able to publish a datasource file with multiple connections. Does anyone have any suggestions?
I think this will also be fixable with #1057
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.