Tableau Server Client (TSC)
中views.populate_csv
的用法。
用法
views.populate_csv(view_item, req_options=None)
填充指定視圖的 CSV 數據。
此方法使用id
字段查詢CSV 數據,並將數據填充為csv
字段。
REST API:Query View Data
版本
此端點適用於 REST API 版本 2.7 及更高版本。
參數
名字 | 說明 |
---|---|
view_item |
指定要填充的視圖。 |
req_options |
(可選)您可以傳入請求選項以指定緩存在服務器上的 CSV 的最長期限。有關詳細信息,請參閱CSVRequestOptions class。 |
異常
錯誤 | 說明 |
---|---|
View item missing ID |
如果缺少視圖的 ID,則會引發錯誤。 |
返回
沒有任何。 CSV 數據被添加到view_item
並且可以通過其csv
字段訪問。
示例
# Sign in, get view, etc.
# Populate and save the CSV data in a file
server.views.populate_csv(view_item)
with open('./view_data.csv', 'wb') as f:
# Perform byte join on the CSV data
f.write(b''.join(view_item.csv))
相關用法
- Python Tableau views.populate_pdf用法及代碼示例
- Python Tableau views.populate_preview_image用法及代碼示例
- 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_csv。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。