Querying Daton created child tables for nested data
Last updated
Last updated
Daton creates separate 'child' tables for each nested data present in source schema(or parent table). Users can control this behavior using the advanced loading options during the source configuration.
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
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