Documentation

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Talk To sales
  • Start Trial

Querying Daton created child tables for nested data

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Saras Pulse

    • Saras Daton

      Need help with something?

      Talk to data expert

      Querying Daton created child tables for nested data

      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. 

      At present Daton creates separate child tables up to three levels. 

      For example, if data is present in Listrecommendations.Fulfillmentrecommendations.Member.Itemdimensions.Dimensiondescriptionthen the following tables would be created - 

      1. Listrecommendations (Parent Table)
      2. Listrecommendations_Fulfillmentrecommendations (Level 1 Child)
      3. Listrecommendations_Fulfillmentrecommendations_Member (Level 2 Child)
      4. 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 Mapping

      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

      Column Name Datatype
      AmazonOrderId STRING
      ASIN STRING
      SellerSKU STRING
      OrderItemId STRING
      ItemPrice RECORD
      ItemPrice.CurrencyCode STRING
      ItemPrice.Amount STRING

      then the following tables would be created by Daton

      Table 1: ListOrderItem (Parent Table)

      Column Name Datatype
      AmazonOrderId STRING
      ASIN STRING
      SellerSKU STRING
      OrderItemId STRING
      daton_user_id NUMERIC
      daton_batch_runtime NUMERIC
      daton_batch_id NUMERIC

      Table 2: ListOrderItem_ItemPrice (Level 1 Child Table)

      Column Name Datatype
      CurrencyCode STRING
      Amount STRING
      daton_user_id NUMERIC
      daton_batch_runtime NUMERIC
      daton_batch_id NUMERIC
      daton_parent_batch_id NUMERIC

      In order to fetch Item price for an AmazonOrderId, daton_batch_id and daton_batch_runtime must be used for mapping records

      select  Amount from listorderitems_itemprice
      where 
      daton_parent_batch_id = (select daton_batch_id from mws_listorderitems where amazonorderid = 'XXX-7370285-XXXX')
      and
      daton_batch_runtime = (select daton_batch_runtime from mws_listorderitems where amazonorderid = 'XXX-7370285-XXXX')

      daton child tables nested data querying

      Was this article helpful?

      Yes
      No
      Give feedback about this article

      Related Articles

      • Google Analytics - FAQs
      • How to get access to FB Ads Business Manager?
      • How to get access to Google Analytics?
      • What are 'FATAL' and 'CANCELLED' report statuses in Amazon Selling Partner?

      Get Started on your Data Journey Today!

      Get a free 14-day trial of Daton today, no credit card is required.

      Start Free Trial
      Talk To Experts
      • Quick & Easy Setup
      • Secure & Reliable
      • No-Code Platform
      • Auto Updates
      • 24/7 Support

      Follow Us

      Linkedin Youtube

      Company

      • Customers
      • Partner With Us
      • Contact Us

      Culture

      • About
      • People
      • Careers

      Offerings

      • Daton
      • For Brands
      • For Agencies

      Policies

      • Terms of Service
      • Privacy Policy
      • MSA

      Follow Us

      Linkedin Youtube

      DISCLAIMER: Various trademarks are held by their respective owners

      © 2023 sarasanalytics.com

      Sitemap

      Get Started on your Data Journey Today!

      Get a free 14-day trial of Daton today, no credit card is required.

      Start Free Trial
      Talk To Sales
      DISCLAIMER: Trademarks are held by their respective owners
      • Quick & Easy Setup
      • Secure & Reliable
      • No-Code Platform
      • Auto Updates
      • 24/7 Support

      Company

      • Customers
      • Partners
      • About
      • People
      • Careers
      • Contact Us

      Offerings

      • Daton
      • Solution for Brands
      • Solution for Agencies
      • Dashboards
      • Founder's Note
      • Status

      Policies

      • Terms of Service
      • Privacy Policy
      • MSA
      • Sitemap

      © 2023 sarasanalytics.com

      Linkedin Youtube

      Knowledge Base Software powered by Helpjuice

      Expand