How to refresh tableau extract via python API ?

In this blog , I am going share with you how to refresh extact using API calls.

  1. Install tableau python api packages
  2. also via pip: ” pip install tableauserverclient “
  3. use the this example python
  4. you are going to need: user, password, tableau sever ip address and workbook id.
  5. 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

the tableau api call full example is committed in out git

from tableausdk import *
from tableausdk.HyperExtract import *
import tableauserverclient as TSC
tableau_auth = TSC.TableauAuth(user, password)
server = TSC.Server('')
server.version = '3.6'
resource_id= 6109
with server.auth.sign_in(tableau_auth):
        print('connection made')
        #resource = server.workbooks.get_by_id(resource_id)
print('connection closed')
© 2020 GitHub, Inc.)

enable repository
command :tsm data-access repository-access enable –repository-username readonly –repository-password

Some other useful tableau related blogs:

How to install tableau on GCP

Tableau Demystified | Quick introduction in 10 minutes


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:

Leave a Reply