Tableau Server Client (TSC)
中workbooks.populate_connections
的用法。
用法
workbooks.populate_connections(workbook_item)
填充指定工作簿的数据源连接列表。
您必须先填充连接,然后才能迭代连接。
此方法检索指定工作簿的数据源连接信息。 REST API 旨在仅返回您明确要求的信息。查询所有工作簿时,不包括数据源连接信息。使用此方法检索工作簿使用的任何数据源的连接信息。该方法将数据连接列表添加到工作簿项 (workbook_item.connections
)。这是 ConnectionItem
的列表。
REST API:Query Workbook Connections
参数
名字 | 说明 |
---|---|
workbook_item |
workbook_item 指定要使用数据连接信息填充的工作簿。 |
异常
错误 | 说明 |
---|---|
Workbook item missing ID. Workbook must be retrieved from server first. |
如果未指定 workbook_item ,则会引发错误。 |
返回
没有任何。 ConnectionItem
对象列表添加到数据源 (workbook_item.connections
)。
示例
# import tableauserverclient as TSC
# server = TSC.Server('https://SERVERURL')
#
...
# get the workbook item
workbook = server.workbooks.get_by_id('1a1b1c1d-2e2f-2a2b-3c3d-3e3f4a4b4c4d')
# get the connection information
server.workbooks.populate_connections(workbook)
# print information about the data connections for the workbook item
print("\nThe connections for {0}: ".format(workbook.name))
print([connection.id for connection in workbook.connections])
...
相关用法
- Python Tableau workbooks.populate_preview_image用法及代码示例
- Python Tableau workbooks.populate_views用法及代码示例
- Python Tableau workbooks.populate_pdf用法及代码示例
- Python Tableau workbooks.publish用法及代码示例
- Python Tableau workbooks.get_by_id用法及代码示例
- Python Tableau workbooks.update用法及代码示例
- Python Tableau workbooks.update_connection用法及代码示例
- Python Tableau workbooks.download用法及代码示例
- Python Tableau workbooks.get用法及代码示例
- Python Tableau workbooks.delete用法及代码示例
- Python Tableau workbooks.refresh用法及代码示例
- Python wsgiref.simple_server.make_server用法及代码示例
- Python wsgiref.util.FileWrapper用法及代码示例
- Python wsgiref.util.setup_testing_defaults用法及代码示例
- Python OpenCV waitKeyEx()用法及代码示例
- Python winsound.SND_ALIAS用法及代码示例
- Python weakref.WeakMethod用法及代码示例
- Python wsgiref.validate.validator用法及代码示例
- Python OpenCV waitKey()用法及代码示例
- Python cudf.core.column.string.StringMethods.is_vowel用法及代码示例
- Python torch.distributed.rpc.rpc_async用法及代码示例
- Python torch.nn.InstanceNorm3d用法及代码示例
- Python sklearn.cluster.MiniBatchKMeans用法及代码示例
- Python pandas.arrays.IntervalArray.is_empty用法及代码示例
- Python tf.compat.v1.distributions.Multinomial.stddev用法及代码示例
注:本文由纯净天空筛选整理自tableau.github.io大神的英文原创作品 workbooks.populate_connections。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。