BI

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
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.)

Resources:

https://help.tableau.com/current/pro/desktop/en-us/examples_postgresql.htm
enable repository
https://help.tableau.com/current/server/en-us/perf_collect_server_repo.htm
command :tsm data-access repository-access enable –repository-username readonly –repository-password

https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_versions.htm

https://community.tableau.com/thread/287767

https://help.tableau.com/current/api/extract_api/en-us/Extract/extract_api_installing.htm

https://help.tableau.com/current/api/extract_api/en-us/Extract/extract_api_using_python.htm

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:

https://www.linkedin.com/in/omid-vahdaty/

BI, GCP

Tableau Demystified | Install Tableau Server on GCP

This is a straight forward “Cut the bulltshit and give me what I need” manual to install Tableau on windows machine on GCP. Naturally, added my personal tips.

  1. Be sure to install Windows with Desktop (I may try later with linux, and more complex HW environments , stay tuned)
  2. Machine type – minimum 8 cores (to maximize network bandwidth), 30 GB ram, 1024 GB SSD to maximize IO. Be sure to install the machine in a region close to your GCP BigQuery dataset region. assuming public IP 1.2.3.4
  3. Assign password to the user
  4. Download chrome RDP plugin for GCP (optional)
  5. make sure you added port 3389 to your network ingress ports.
  6. RDP to the machine, Turn Off Windows Firewall.
  7. download the tableau server and Run it.
  8. login to TSM requires a windows user in admin group. I created a new user with an easier password for this installation.
  9. You need a license for tableau server, usually , you can use it once for PROD and twice for NON PROD. Note you have a 14 day trial options for days. you have an option to offline license activation for air gapped environment.
  10. Once installation is done, you are going to configure admin user, and open port 80 to the instance. access the server from your desktop using web browser and you server IP. eg. https://1.2.3.4
  11. from Tableau desktop, sign to tableau server using the credentials from step 10. you should be able to publish now.
  12. Notice when you create a scheduled extract expected metrics are 40% cpu utilization(!) and about 15 GB RAM. Network will unlikely be bottleneck, but will ossicalte from 0 to 5Mbps (about 10000 per second). This blog is about extract optimization. also log into to TSM and add more instances based on the amount of CPU cores.
  13. Notice after restart, login to the TSM and start tableau server.

Below is example of CPU core allocation for Tableau

Video Blog on getting started on Tableau Desktop:

Tableau Demystified | Quick introduction in 10 minutes

Resources to improve performance of Tableau extracts :

https://help.tableau.com/current/server/en-us/install_config_top.htm

https://www.tableau.com/about/blog/2018/4/zulilys-top-10-tips-self-service-analytics-google-bigquery-and-tableau-84969

https://community.tableau.com/docs/DOC-23150

https://community.tableau.com/docs/DOC-23161

——————————————————————————————————————————

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:

https://www.linkedin.com/in/omid-vahdaty/

BI

Tableau Demystified | Quick introduction in 10 minutes


A 10 minutes  video demonstration – introduction to Tableau

——————————————————————————————————————————

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:

https://www.linkedin.com/in/omid-vahdaty/