2 Replies Latest reply on Oct 28, 2013 4:01 PM by Lee Graber

    Tableau Extract API with multiple tables

    Young Song



         I have multiple tables in a postgreSQL.  I was able to write a python code to extract the information from one of these tables, but I would like to do this for multiple tables (i.e. like using multiple tables with JOIN in tableau Desktop).  Is this possible with current version of the API?  Thanks in advance.

        • 1. Re: Tableau Extract API with multiple tables
          Kevin MacDonell

          The answer to this is yes. The code you would use is not specific to the API, however. You can use any code libraries available for Python. I use pandas, which is an excellent code library for data analysis and data preparation. One of the primary data structures in pandas is the DataFrame, which can be thought of as just like a table in a database. The options for joins (called 'merges' in pandas) mimic those of SQL.

          • 2. Re: Tableau Extract API with multiple tables
            Lee Graber

            The current Tableau extract api only supports a single table. To import multiple tables, you would have to denormalize them as part of extracting your data (ie (simplified) instead of "SELECT * FROM Foo" you might have "SELECT * FROM Foo JOIN Bar on Foo.x = Bar.y". Then insert the denormalized resultset into the tde. Hope that helps clarify things for you. Thanks