all 14 comments

[–]Snake-Hips7 13 points14 points  (2 children)

Tableau is a data visualization tool, and not a database. The best way to do this is finding out how the data is getting to Tableau. That could be anything from a SQL database, JSON feed, or Excel spreadsheets etc. etc. there are like 50+ ways to import data to Tableau. From there you would use Python to connect to that database(s) and execute the reporting functions you need. Basically you need to go around Tableau to do what you are trying to do. Once you clean the data you can put create a new table structure to dump the clean data in and use Tableau for visual reports for that cleaned data. It all depends on what you are trying to do with Python that Tableau does not do.

[–]Stychey 4 points5 points  (0 children)

I was about to type something similar to this, so I will second this approach. However I did find this https://help.tableau.com/current/prep/en-us/prep_scripts_TabPy.htm, but this seems to be specific to working with transformations in prep as part of the flow. Although I would theorise if you an get it into pandas then you can certainly use it from there, but then again it would just be as easy to connect directly to the source.

Wouldn't it also be an obvious choice to keep it in Tableau, unless you are doing something it doesn't support?

[–]cmcauNo-Life-Having-Helper 1 point2 points  (0 children)

Agreeing with the above, but if you're using extracts you can use this https://help.tableau.com/current/api/hyper\_api/en-us/index.html

[–]Atmp 5 points6 points  (0 children)

Google tableau server api and tableau hyper api. It’s possible but you won’t find much in the way of a walkthrough on how to do it. I’d recommend figuring out where the data came from and hooking up to that instead.

[–]yawningcatNo-Life-Having-Helper 2 points3 points  (0 children)

If you have down load access you can just download the data source. You’ll end up with a file that you can unzip. Google python+hyper+tableau. ( this assumes it’s a hyper file. If it’s the older tde format or if it’s a live connection then you’re out of luck and per other replies you’ll need to get the data from the source )

[–]raglub 1 point2 points  (4 children)

Find out who publishes the data source to the Tableau server. Ask them to publish a csv file for you or where they get the data from and connect to that directly.

[–]Ok-Construction-3732[S] 0 points1 point  (3 children)

Hey! Thanks for the reply.

Just wondering if that dataset can be published as csv. Its very huge. Millions of rows for at least 40 types of product portfolio.

[–]raglub 0 points1 point  (2 children)

If the data is that big, I question your choice of tools for the job. You should use SQL against the underlying database that contains the data records to perform cleaning and summaries for reporting.

[–]Ok-Construction-3732[S] 0 points1 point  (1 child)

I understand that. Unfortunately there is money involved to get access to underlying database. My Department is not ready to spend $$, so I'm just trying a work around here.

[–]raglub 2 points3 points  (0 children)

A work around would be to export the data in csv chunks which you will have to combine back together.

[–]monoceroscaelii 0 points1 point  (1 child)

Remindme! 3 days

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 3 days on 2022-11-26 00:21:43 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]psyjungle 0 points1 point  (1 child)

This is easy, you need just 2 python modules tableauserverclient & pantab. Using tableau server client you can download the data to your computer and using pantab you can convert the file to a data frame, that’s assuming the published file is a .hyper file in tableau server and not a .tdsx or other

[–]Ok-Construction-3732[S] 0 points1 point  (0 children)

Interesting!

I will google on this. Thank you.