Automating Typical Tableau Tasks: Part 2

Maxim Mityutko
1 min readFeb 11, 2021

In a previous part we demonstrated how to create a simple TableauHelper class that handles authentication and can be extended with different useful methods, e.g. refresh data sources or get job statuses.

Lets add a few more useful pieces…

Update Embedded Connection Credentials

Most of the companies regularly rotate passwords for the service accounts that are used within the data source connections. Updating those manually could be tedious and time consuming task. With the below example, the change can be done in seconds.

Please note, that the code snippet below assumes that the method is going to be an extension of TableauHelper class.

Similar to refresh_datasources method, that was discussed in a previous part, this one also uses a list of data source names to interact with the actual objects on the server, and uses the same filtering logic. Ideally this logic should be moved to a separate public or private method and reused, but for the sake of the example, I just copy-pasted it.

By default connections property of the data source item is empty and should be populated first.

After that, setting connection username and password, is straightforward.

--

--

No responses yet