Tableau Server Client (TSC)
中datasources.get
的用法。
用法
datasources.get(req_options=None)
返回站点的所有数据源。
要获取每个数据源的连接信息,您必须首先填充DatasourceItem
使用连接信息populate_connections(datasource_item
)方法。有关详细信息,请参阅填充连接和视图
REST API:Query Datasources
参数
名字 | 说明 |
---|---|
req_options |
(可选)您可以将包含附加参数的请求对象传递给该方法以过滤请求。例如,如果您正在搜索特定的数据源,您可以指定项目的名称或其 ID。 |
返回
返回DatasourceItem
对象和PaginationItem
对象的列表。使用这些值来迭代结果。
示例
import tableauserverclient as TSC
tableau_auth = TSC.TableauAuth('USERNAME', 'PASSWORD')
server = TSC.Server('https://SERVERURL')
with server.auth.sign_in(tableau_auth):
all_datasources, pagination_item = server.datasources.get()
print("\nThere are {} datasources on site: ".format(pagination_item.total_available))
print([datasource.name for datasource in all_datasources])
相关用法
- Python Tableau datasources.get_by_id用法及代码示例
- Python Tableau datasources.publish用法及代码示例
- Python Tableau datasources.refresh用法及代码示例
- Python Tableau datasources.populate_connections用法及代码示例
- Python Tableau datasources.download用法及代码示例
- Python Tableau datasources.update用法及代码示例
- 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.get。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。