A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://tableau.github.io/server-client-python/docs/populate-connections-views below:

Populate Connections and Views

Populate Connections and Views

When you get a workbook with the TSC library, the response from Tableau Server does not include information about the views or connections that make up the workbook. Similarly, when you get a data source, the response does not include information about the connections that make up the data source. This is a result of the design of the Tableau Server REST API, which optimizes the size of responses by only returning what you ask for explicitly.

As a result, if you want to get views and connections, you need to call the populate_views and populate_connections functions.

Populate views for workbooks
workbook = server.workbooks.get_by_id('a1b2c3d4')
print(workbook.id)

server.workbooks.populate_views(workbook)
print([view.name for view in workbook.views])
Populate connections for workbooks
workbook = server.workbooks.get_by_id('a1b2c3d4')
print(workbook.id)

server.workbooks.populate_connections(workbook)
print([connection.datasource_name for connection in workbook.connections])
Populate connections for data sources
datasource = server.datasources.get_by_id('a1b2c3d4')
print(datasource.name)

server.datasources.populate_connections(datasource)
print([connection.datasource_name for connection in datasource.connections])

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4