当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python Tableau workbooks.refresh用法及代码示例


Tableau Server Client (TSC)workbooks.refresh的用法。

用法

workbooks.refresh(workbook_item)

刷新现有工作簿的提取。

REST API:Update Workbook Now

参数

名字 说明
workbook_item workbook_item 指定您正在刷新的工作簿的设置。

异常

错误 说明
Workbook item missing ID. Workbook must be retrieved from server first. 如果未指定 workbook_item,则会引发错误。使用 workbooks.get()workbooks.get_by_id() 方法从服务器检索工作簿项。

import tableauserverclient as TSC
tableau_auth = TSC.TableauAuth('username', 'password', site_id='site')
server = TSC.Server('https://servername')

with server.auth.sign_in(tableau_auth):

    # get the workbook item from the site
    workbook = server.workbooks.get_by_id('1a1b1c1d-2e2f-2a2b-3c3d-3e3f4a4b4c4d')

    # call the update method
    workbook = server.workbooks.refresh(workbook)
    print("\nThe data of workbook {0} is refreshed.".format(workbook.name))




相关用法


注:本文由纯净天空筛选整理自tableau.github.io大神的英文原创作品 workbooks.refresh。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。