1

Objective: I want to create a batch script that can re-publish a data extract (.TDE) file to Tableau Server so that I can automate a report. I generated some Python Code to interact with a couple distinct RDS's and then export the data to a csv file. Then, I import this csv file and convert it to TDE.

Code:

  1. I have a Python 3.5 script that converts data from relational databases to csv file
  2. I have a Python 2.7 script that converts csv file to TDE file since Python's TableauSDK is only compatible with Python 2.7.
  3. I have some tabcmd commands that can re-publish the TDE file to server

What I've done so far? This seems to work and then I use Windows Task Scheduler to re-run the script daily. But is there a better way to doing this?

cd C:/Users/riley/PycharmProjects/BankandCreditBureauReport
python3 ReportGenerator.py

cd C:/Users/riley/PycharmProjects/TableauExtract
python2 DataExtractCBBR.py

cd C:\Program Files\Tableau\Tableau Server\10.0\extras\Command Line Utility\
tabcmd login -s <server> -u <user> -p <pass>
tabcmd publish "C:\Users\riley\PycharmProjects\TableauExtract\CBBRDashboard.tde" --project "Banking and Credit Bureau" --overwrite

What is the best way to integrate these 3 different scripts so that I accomplish my objective?

Riley Hun
  • 2,541
  • 5
  • 31
  • 77

0 Answers0