當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


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。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。