In this blog , I am going share with you how to refresh extact using API calls.
- Install tableau python api packages
- also via pip: ” pip install tableauserverclient “
- use the this example python
- you are going to need: user, password, tableau sever ip address and workbook id.
- the workbook id is Luid (Workbooks) – this was the harded this to get. the idea was to connect to the postgress DB of tableau after the command runs enable a read only user and get the ID’s. Credit goes to Tomer Ben Tovim
The python package install :
pip install tableauserverclient
from tableausdk import * from tableausdk.HyperExtract import * import tableauserverclient as TSC user='omid' password='123' tableau_auth = TSC.TableauAuth(user, password) server = TSC.Server('http://10.1.0.1') server.version = '3.6' 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='37A13D3E-64D9-4F9B-ACD5-2FCB0291BF24') server.auth.sign_out() print('connection closed') © 2020 GitHub, Inc.)
command :tsm data-access repository-access enable –repository-username readonly –repository-password
Some other useful tableau related blogs:
I put a lot of thoughts into these blogs, so I could share the information in a clear and useful way. If you have any comments, thoughts, questions, or you need someone to consult with, feel free to contact me: