Back

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

I am currently experimenting with Tableau Extract API to generate some TDE from the tables I have in a PostgreSQL database. I was able to write a code to generate the TDE from a single table, but I would like to do this for multiple joined tables. To be more specific, if I have two tables that are inner joined by some field, how would I generate the TDE for this?

I can see that if I am working with a small number of tables, I could use a SQL query with JOIN clauses to create one gigantic table and generate the TDE from that table.

>> SELECT * FROM table_1 INNER JOIN table_2 

   INTO new_table_1 

   ON table_1.id_1 = table_2.id_2;

>> SELECT * FROM new_table_1 INNER JOIN TABLE_3

   INTO new_table_2

   ON new_table_1.id_1 = table_3.id_3

and then generate the TDE from new_table_2.

However, I have some tables that have over 40 different fields, so this could get messy.

Is this even a possibility with the current version of the API? 

1 Answer

0 votes
by (47.2k points)

  • You can read from as many tables or other sources as you want. Orelse use complex query with lots of joins, or create a view and read from that. However, creating a view is helpful when you have a complex query joining many tables.

  • The data extract API is totally agnostic about how or where you get the data to feed it -- the whole point is to allow you to grab data from unusual sources that do not have pre-built drivers for Tableau.

  • As Tableau has a Postgres driver and can read from it directly, you don't need to write a program with the data extract API at all. You can define your extract with Tableau Desktop. If you want to schedule automated refreshes of the extract, you can use Tableau Server or its tabcmd command.

Browse Categories

...