Skip to main content

Community

Connector Improvement: Facebook_ads secondary table enhancements

Not planned

Please sign in to leave a comment.

Comments

3 comments

  • Official comment

    Hi Raj, 

    Luke from the Product team here. Thanks for submitting this request. 

    Tom's recommendation is correct (thanks, Tom). I'll share more details about why the data is structured this way. These breakdown columns belong to the parent "Insights" entity and not to the child "Action" entity. Including these columns in both parent and child tables would be denormalization. You can read more about why we think it is critical to deliver normalized schemas here.

    Sharing an example query to add to what Tom said:

    SELECT pta.*, pt.PUBLISHER_PLATFORM FROM <PARENT_TABLE>_ACTIONS pta
    join <PARENT_TABLE> pt on pt._fivetran_id = pta._fivetran_id; 


    We explain more about secondary tables in our connector docs here: https://fivetran.com/docs/connectors/applications/facebook-ads#secondarytables. 

    Cheers,
    Luke

    + 1!

    Raj, following some consutation with Fivetran support, this is possible by joining using the _fivetran_id , ad_id and date columns.