server-client-python icon indicating copy to clipboard operation
server-client-python copied to clipboard

Publish DataSource with multiple database connections - need multiple connection credentials

Open bis4fun opened this issue 4 years ago • 7 comments

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.

bis4fun avatar Feb 04 '21 22:02 bis4fun

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

shinchris avatar Feb 22 '21 21:02 shinchris

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.

bis4fun avatar Feb 22 '21 22:02 bis4fun

Bump

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

andymiller-og avatar Mar 05 '21 14:03 andymiller-og

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.

bis4fun avatar May 28 '21 18:05 bis4fun

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

s-ahuja avatar Sep 13 '21 12:09 s-ahuja

I think this will also be fixable with #1057

jacalata avatar Jun 28 '22 20:06 jacalata

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.

lerda01 avatar Aug 05 '23 20:08 lerda01