Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)

I used python scripting to do a series of complex queries from 3 different RDS's and then exported the data into a CSV file. I am now trying to find a way to automate publishing a dashboard that uses this data into Tableau server on a weekly basis, such that when I run my python code, it will generate new data, and subsequently, the dashboard on Tableau server will be updated as well.

I already tried several options, including using the full UNC path to the CSV file as the live connection, but Tableau server had trouble reading this path. Now I'm thinking about just creating a PowerShell script that can be run weekly that calls the python script to create the dataset and then refreshes tableau desktop, then finally re-publishes/overwrites the dashboard to tableau server.

Any ideas on how to proceed with this?

1 Answer

0 votes
by (47.2k points)
  • Getting data from excel to Tableau Server:

  1. UNC path can be set up so that it is accessible from your server. By doing this, you can then set up an extract refresh to read in the UNC path at the frequency desired.

  2. Create an extract with the Tableau SDK. In order to read in the CSV file and generate a file, Use the Tableau SDK.

  • In our experience, #2 is not very fast. While generating the extract, Tableau SDK seems very slow and then the extract has to be pushed to the server. I would recommend transferring the file to a location accessible to the server. Even a daily file copy to a shared drive on the server could be used if you're struggling with UNC paths. Tableau does support UNC paths so you just have to make sure to use them rather than a mapped drive in your setup.

  • It can also be transferred as a file and then pushed (which may be fastest) or it can be pushed remotely.

  • As far as scheduling two steps (python and data extract refresh), I use a poor man's solution myself, where I update a csv file at one point. Task scheduler or cron are some of the tools which can be used. Then setup the extract schedule at a slightly later point in time. While it does not have the linkage of running the python script and then causing the extract refresh (surely there is a tabcmd for this), it works just fine for my purposes to put 30 minutes in between as my processes are reliable and the app is not mission critical.

I would recommend sign up for Tableau Desktop Specialist Certification classes from Intellipaat, they will also help you get a job. 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...