Querying Daton created tables on RedShift
How to query RedShift tables
Last updated
How to query RedShift tables
Last updated
RedShift data warehouse does not support nested tables. Hence, Daton creates separate 'child' tables for each nested data present in source schema(or parent table).
For example, if data is present in Listrecommendations.Fulfillmentrecommendations.Member.Itemdimensions.Dimensiondescriptionthen the following tables would be created -
Listrecommendations (Parent Table)
Listrecommendations_Fulfillmentrecommendations (Level 1 Child)
Listrecommendations_Fulfillmentrecommendations_Member (Level 2 Child)
Listrecommendations_Fulfillmentrecommendations_Member_Itemdimensions (Level 3 Child)
Any nested data present in Itemdimesions would be stored at text and any excess data which does not fit into that field would be truncated.
Data between parent and child tables can be mapped or combined using daton_parent_batch_id and daton_batch_runtime meta fields. The same applies for other levels of child tables.
For example, if API response for ListOrderItems contains data in the following structure
then the following tables would be created by Daton on RedShift
Table 1:
ListOrderItem (Parent Table)
Table 2:
ListOrderItem_ItemPrice (Level 1 Child Table)
In order to fetch Item price for an AmazonOrderId, daton_batch_id and daton_batch_runtime must be used for mapping records