Tableau Server Client (TSC)
中views.populate_preview_image
的用法。
用法
views.populate_preview_image(view_item)
填充指定視圖的預覽圖像。
此方法獲取指定視圖項的預覽圖像(縮略圖)。該方法使用id
和workbook_id
字段來查詢預覽圖像。該方法為視圖填充preview_image
。
REST API:Query View Preview Image
版本
此端點適用於 REST API 版本 2.0 及更高版本。
參數
名字 | 說明 |
---|---|
view_item |
指定要填充的視圖。 |
異常
錯誤 | 說明 |
---|---|
View item missing ID or workbook ID |
如果缺少視圖或工作簿的 ID,則會引發錯誤。 |
返回
沒有任何。預覽圖像被添加到view_item
並且可以通過其preview_image
字段訪問。
示例
# Sign in, get view, etc.
# Populate and save the preview image as 'view_preview_image.png'
server.views.populate_preview_image(view_item)
with open('./view_preview_image.png', 'wb') as f:
f.write(view_item.preview_image)
相關用法
- Python Tableau views.populate_pdf用法及代碼示例
- Python Tableau views.populate_csv用法及代碼示例
- Python Tableau views.populate_image用法及代碼示例
- Python Tableau views.get用法及代碼示例
- Python Tableau views.get_by_id用法及代碼示例
- Python statistics variance()用法及代碼示例
- Python venv.EnvBuilder.create用法及代碼示例
- Python vars()用法及代碼示例
- 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用法及代碼示例
- Python numpy.less()用法及代碼示例
- Python Matplotlib.figure.Figure.add_gridspec()用法及代碼示例
- Python tf.compat.v1.distribute.MirroredStrategy.experimental_distribute_dataset用法及代碼示例
- Python Sympy Permutation.list()用法及代碼示例
- Python dask.dataframe.Series.apply用法及代碼示例
- Python networkx.algorithms.shortest_paths.weighted.all_pairs_dijkstra_path用法及代碼示例
- Python scipy.ndimage.binary_opening用法及代碼示例
- Python pyspark.pandas.Series.dropna用法及代碼示例
- Python torchaudio.transforms.Fade用法及代碼示例
- Python dask.dataframe.to_records用法及代碼示例
- Python arcgis.gis._impl._profile.ProfileManager.save_as用法及代碼示例
注:本文由純淨天空篩選整理自tableau.github.io大神的英文原創作品 views.populate_preview_image。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。