fivetran / dbt_facebook_ads

Fivetran data models for Facebook Ads built using dbt.
https://fivetran.github.io/dbt_facebook_ads/
Apache License 2.0
24 stars 27 forks source link

QUESTION - How to Sync all required tables from Ad Reporting Connector #7

Closed fivetran-joemarkiewicz closed 3 years ago

fivetran-joemarkiewicz commented 3 years ago

Your Question

There seems to be confusion with customers in regards to how to exactly obtain the tables needed for this dbt package to work. The Facebook Ads connector does not generate a few of these tables by default and therefore some additional configuration is needed by customers to sync these tables. We should add some additional context within the README (or a different location) about how a customer will be able to sync the required tables necessary to run this package. We should also possibly consider adding similar context to the dbt_ad_reporting package to save users a step if they start at the dbt_ad_reporting package. **Additional context**

dbt Slack thread within #tools-fivetran created by Arni Westh detailing the confusion and roadblocks encountered to get the package working.

Highlights from this thread include the below conclusion message:

"In case other wonders about this, I added a Custom Report with the fields I knew I needed. This generated all the tables above, except basic_ad which I added as a Pre-build Report. This could have been documented a bit more clearly :slightly_smiling_face:"

Please indicate the level of urgency and business impact of this request

Low level urgency and low impact as this would most likely just update the README.

stkbailey commented 3 years ago

I am running into this issue now, and I've not yet figured out the solution. Looks to be an issue with both Facebook and Google Ads (coming in via the ad_reporting package.

Get the following error:

Database Error in model stg_facebook_ads__basic_ad_tmp (models/tmp/stg_facebook_ads__basic_ad_tmp.sql)
  002003 (42S02): SQL compilation error:
  Object 'FIVETRAN.FACEBOOK_AD_ACCOUNT.BASIC_AD' does not exist or not authorized.
  compiled SQL at target/run/facebook_ads_source/models/tmp/stg_facebook_ads__basic_ad_tmp.sqlCompleted with 2 errors and 0 warnings:
fivetran-joemarkiewicz commented 3 years ago

@stkbailey Would you be able to share your dbt_project.yml? Also, can you confirm if you do in fact have the BASIC_AD table within your source?

stkbailey commented 3 years ago

Hey @fivetran-joemarkiewicz -- I did find the error here. I was not initially aware that there was another level of packaging for the ad blocks. When I found out about facebook_ads_source, I saw that there were some custom reports I needed to pull, so we're all good now. 👍

fivetran-joemarkiewicz commented 3 years ago

That is great to hear @stkbailey! I am glad you were able to discover the facebook_ads_source package and determine the custom reports you needed to run the package.

Before I close the ticket I wanted to determine if there should be any documentation updates that come from this Issue. After finding the facebook_ads_source package was there any documentation that you felt our README lacked? If it would be helpful to future users of the package we can add a detailed description of which custom/prebuilt reports are required for the package to run. If you were able to find what you needed relatively easily after finding the source package then I think we can leave the documentation as is.

Thanks!

stkbailey commented 3 years ago

I would suggest adding a line to the effect of:

This package requires the `facebook_ads_source` package and will require the custom reports defined there to work properly.

I had to do a bit of digging before I understood the structure of the packages -- it may make sense to put the requirements documentation at the ad_reporting level, though.

fivetran-joemarkiewicz commented 3 years ago

Thanks for the feedback @stkbailey! We have some documentation around this here but I agree we could be more clear. I will close this ticket and plan to add some clearer documentation to our ad_reporting package come next sprint.