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

I have a python code that exports data into a CSV, then I load that CSV into Tableau. I don't want to load a CSV into tableau.

Is there a way I can just take the return value of my python script and put it directly into tableau?

Question is similar to Export data from Python into Tableau using JSON? , but they inquire about JSON format and the answer was to use CSV. I want to skip the CSV step if possible. The data is returning will be in a tabular format.

1 Answer

0 votes
by (47.2k points)
edited by

  • If you can use TabPy. It returns values created by scripts as calculated fields within a workbook.

  • Otherwise, Tableau purely operates as a layer on top of a source of data. There is no such thing, unfortunately, as loading data directly into it.

  • The way I typically handle jobs like this is to have Python load data directly into a data store of some sort. All new information - or overwritten information - is then viewable with the existing data connection of your Tableau workbook.

  • A simple way to do this, without having to use a formal database is to consistently load the CSV into the same place with the same name. Then once Tableau is opened with the pre-existing connection, all that is needed is a click of 'refresh.'

  • Though your goal is to have Tableau populate your data directly from Python, there is some backend work that needs to be done. If done properly, though, the end effect to any user could appear to render directly from Python.

Make the right move by enrolling now in Tableau Online Course to learn it.

Related questions

Browse Categories