Tableau Server Client (TSC)
中workbooks.populate_views
的用法。
用法
workbooks.populate_views(workbook_item)
填充(或獲取)工作簿的視圖列表。
您必須先調用此方法來填充視圖,然後才能遍曆視圖。
此方法檢索指定工作簿的視圖信息。 REST API 旨在僅返回您明確要求的信息。查詢所有數據源時,不包括視圖信息。使用此方法檢索視圖。該方法將視圖列表添加到工作簿項 (workbook_item.views
)。這是 ViewItem
的列表。
REST API:Query Views for Workbook
參數
名字 | 說明 |
---|---|
workbook_item |
workbook_item 指定要使用視圖信息填充的工作簿。見WorkbookItem class。 |
異常
錯誤 | 說明 |
---|---|
Workbook item missing ID. Workbook must be retrieved from server first. |
如果未指定 workbook_item ,則會引發錯誤。您可以使用workbooks.get() 和workbooks.get_by_id() 方法檢索工作簿項。 |
返回
沒有任何。 ViewItem
對象列表將添加到工作簿 (workbook_item.views
)。
示例
# 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 view information
server.workbooks.populate_views(workbook)
# print information about the views for the work item
print("\nThe views for {0}: ".format(workbook.name))
print([view.name for view in workbook.views])
...
相關用法
- Python Tableau workbooks.populate_preview_image用法及代碼示例
- Python Tableau workbooks.populate_connections用法及代碼示例
- 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_views。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。