Tableau dashboard refresh using Python

微笑、不失礼 提交于 2020-03-03 07:55:29

问题


Is there a way to refresh Tableau dashboards using Python? I need to refresh Tableau dashboards after my data is loaded into DB.


回答1:


The Tableau REST API will allow you to refresh your extracts via Python.

Here is an example of a script which should get you started:

import tableauserverclient as TSC

tableau_auth = TSC.TableauAuth(user, password)
server = TSC.Server('Address')
server.version = '2.3'
resource_id= 6109
with server.auth.sign_in(tableau_auth):
print('connection made')
print(server.version)
#resource = server.workbooks.get_by_id(resource_id)
server.workbooks.refresh(workbook_id='6109')

server.auth.sign_out()
print('connection closed') 


来源:https://stackoverflow.com/questions/55654289/tableau-dashboard-refresh-using-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!