I had a need to have an automated method to update connections for specific extracts. I created the attached utility to do this using Python, and you are free to leverage it. BTW, I haven't put it yet out on GITHUB.
Here's how it's called within a shell script:
c:\python27\python x:\scripts\python\conn_update_for_embed_conn.py SERVERNAME SERVER_ACCOUNT SERVER_PASSWORD DB_SERVER DB_PORT DB_USER DB_PASSWORD Workbook_name > where_to_write_log
It takes in 8 parameters and with the redirect writes out to a log file.
Parameter 1: SERVERNAME - what Tableau Server to login to
Parameter 2: SERVER_ACCOUNT - what id to login with to TS
Parameter 3: SERVER_PASSWORD - what password to login with to TS
Parameter 4: DB_SERVER - The target db server
Parameter 5: DB_PORT - The target port
Parameter 6: DB_USER - The target user
Parameter 7: DB_PASSWORD - The target password
Parameter 8: What workbook to update the connection for
The connection will only be updated for embedded connections (in other words, not published sqlproxy connections), and it will only be updated if the current connection does not match to the target connection
REST API methods:
2. Find the workbook id
3. Find the connection id
4. Update the connections that are necessary to update
Right now, the REST API version number is hardcoded, I tried using the version library as in what was supplied in the sample Python scripts rest-api-samples/python at master · tableau/rest-api-samples · GitHub , but it didn't work.
This document was generated from the following discussion: The specified item was not found.