XERO- ETL - one source table is not one destination table?

xero
#1

Hello,

I am a first time user of STICH and I’m currently amazed by how easy to use it is …only until i found an issue

I’m trying to ETL data from Xero Accounting to a PostgreSQL. So the first time trying, I try to replicate 1 table and hit the issues that cannot be solved or got a clue why
Here is the problem:

  1. I chose only 1 table (invoices) to extract from source
  2. It ends up in 7 tables in the Destination ( Invoice __lineitems…,etc …)
  3. There is no Primary key for me to link/join these tables (at least I dont know how and which one).

You may see the picture for your reference.

Best Regards

Duc

#2

Hey there, Duc.

Data is loaded in this way because some data warehouses (such as Redshift, PostgreSQL, Panoply, Azure SQL Data Warehouse) don’t natively support nested data structures. To ensure data can be loaded successfully, Stitch will “de-nest” the data and create subtables like the ones in your post.

Our documentation contains a more detailed explanation and examples about this specific loading situation. It also contains instructions about connecting these tables to their top-level parent via their Primary Keys.

Please refer to the documentation I’ve linked, and let us know if you have any other questions! I’m happy to help.