Tableau Server Client (TSC)
中datasources.update
的用法。
用法
datasource.update(datasource_item)
更新指定的数据源。
REST API:Update Data Source
参数
名字 | 说明 |
---|---|
datasource_item |
datasource_item 指定要更新的数据源。 |
异常
错误 | 说明 |
---|---|
Datasource item missing ID. Datasource must be retrieved from server first. |
如果未指定 datasource_item,则会引发错误。使用Datasources.get() 方法检索服务器上数据源的标识。 |
返回
更新的 DatasourceItem
。
示例
# import tableauserverclient as TSC
# server = TSC.Server('https://SERVERURL')
# sign in ...
# get the data source item to update
datasource = server.datasources.get_by_id('1a2a3b4b-5c6c-7d8d-9e0e-1f2f3a4a5b6b')
# do some updating
datasource.owner_id = 'New Owner ID'
# call the update method with the data source item
updated_datasource = server.datasources.update(datasource)
相关用法
- Python Tableau datasources.get用法及代码示例
- Python Tableau datasources.publish用法及代码示例
- Python Tableau datasources.refresh用法及代码示例
- Python Tableau datasources.get_by_id用法及代码示例
- Python Tableau datasources.populate_connections用法及代码示例
- Python Tableau datasources.download用法及代码示例
- Python dataclasses.asdict用法及代码示例
- Python dataclasses.dataclass用法及代码示例
- Python dataclasses.astuple用法及代码示例
- Python dataclasses.KW_ONLY用法及代码示例
- Python dataclasses.field用法及代码示例
- Python dataclasses.make_dataclass用法及代码示例
- Python datetime timetuple()用法及代码示例
- Python datetime astimezone()用法及代码示例
- Python datetime.time.fromisoformat用法及代码示例
- Python datetime timetz()用法及代码示例
- Python datetime.utcoffset()用法及代码示例
- Python date isoformat()用法及代码示例
- Python datetime.datetime.fromisoformat用法及代码示例
- Python datetime isocalendar()用法及代码示例
- Python date toordinal()用法及代码示例
- Python datetime转date用法及代码示例
- Python datetime.tzinfo()用法及代码示例
- Python date strftime()用法及代码示例
- Python datetime date()用法及代码示例
注:本文由纯净天空筛选整理自tableau.github.io大神的英文原创作品 datasources.update。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。