dbt_ad_reporting icon indicating copy to clipboard operation
dbt_ad_reporting copied to clipboard

Pinterest advertiser addition

Open fivetran-joemarkiewicz opened this issue 4 years ago • 4 comments

Are you a current Fivetran customer?

Fivetran created PR

What change(s) does this PR introduce?

This PR adds the advertiser_id and advertiser_name to the stg_pinterest_ads staging model to be rolled downstream into the ad_reporting model as the account_id and account_name fields.

Does this PR introduce a breaking change?

  • [ ] Yes (please provide breaking change details below.)
  • [X] No (please provide explanation how the change is non breaking below.) This will only add the advertiser information for Pinterest users as the account information. This will not result in a breaking change.

Is this PR in response to a previously created Issue

  • [X] Yes, Issue #16
  • [ ] No

How did you test the PR changes?

  • [X] CircleCi
  • [ ] Other (please provide additional testing details below)

Select which warehouse(s) were used to test the PR

  • [X] BigQuery
  • [X] Redshift
  • [X] Snowflake
  • [X] Postgres
  • [X] Databricks
  • [ ] Other (provide details below)

Provide an emoji that best describes your current mood

🔢

Feedback

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.

fivetran-joemarkiewicz avatar Dec 29 '21 21:12 fivetran-joemarkiewicz

ran dbt run from local dev directory -- these errors probably aren't relevant to these exact changes but curious if you saw them on your end: 21:20:18 3 of 112 START view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__ad_history_tmp [RUN] 21:20:18 3 of 112 ERROR creating view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__ad_history_tmp [ERROR in 0.37s] 21:20:18 4 of 112 START view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__ad_set_history_tmp [RUN] 21:20:19 4 of 112 ERROR creating view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__ad_set_history_tmp [ERROR in 0.42s] 21:20:19 5 of 112 START view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__basic_ad_tmp [RUN] 21:20:19 5 of 112 ERROR creating view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__basic_ad_tmp [ERROR in 0.34s] 21:20:19 6 of 112 START view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__campaign_history_tmp [RUN] 21:20:19 6 of 112 ERROR creating view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__campaign_history_tmp [ERROR in 0.41s] 21:20:19 7 of 112 START view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__creative_history_tmp [RUN] 21:20:20 7 of 112 ERROR creating view model dbt_sheri_stg_facebook_ads.stg_facebook_ads__creative_history_tmp [ERROR in 0.32s]

21:23:21 Completed with 5 errors and 0 warnings: 21:23:21 21:23:21 Runtime Error in model stg_facebook_ads__ad_history_tmp (models/tmp/stg_facebook_ads__ad_history_tmp.sql) 21:23:21 404 Not found: Table dbt-package-testing:facebook_ads.ad_history was not found in location US 21:23:21 21:23:21 (job ID: 60f637a5-513a-43c5-a8dd-85e91d86cd52) 21:23:21 21:23:21 Runtime Error in model stg_facebook_ads__ad_set_history_tmp (models/tmp/stg_facebook_ads__ad_set_history_tmp.sql) 21:23:21 404 Not found: Table dbt-package-testing:facebook_ads.ad_set_history was not found in location US 21:23:21 21:23:21 (job ID: eac868bf-5033-4e31-95a8-509fd66e0e8d) 21:23:21 21:23:21 Runtime Error in model stg_facebook_ads__basic_ad_tmp (models/tmp/stg_facebook_ads__basic_ad_tmp.sql) 21:23:21 404 Not found: Table dbt-package-testing:facebook_ads.basic_ad was not found in location US 21:23:21 21:23:21 (job ID: 1fc7022a-4ca4-40b6-8e62-97481011c0f7) 21:23:21 21:23:21 Runtime Error in model stg_facebook_ads__campaign_history_tmp (models/tmp/stg_facebook_ads__campaign_history_tmp.sql) 21:23:21 404 Not found: Table dbt-package-testing:facebook_ads.campaign_history was not found in location US 21:23:21 21:23:21 (job ID: 26fc7678-fb99-40ac-8efe-548425f9a1d6) 21:23:21 21:23:21 Runtime Error in model stg_facebook_ads__creative_history_tmp (models/tmp/stg_facebook_ads__creative_history_tmp.sql) 21:23:21 404 Not found: Table dbt-package-testing:facebook_ads.creative_history was not found in location US 21:23:21 21:23:21 (job ID: b17b4c9c-a7f2-47ed-a9ab-e831bfda7fb2) 21:23:21 21:23:21 Done. PASS=89 WARN=0 ERROR=5 SKIP=18 TOTAL=112

What were the contents of your dbt_project.yml? It looks like there was a mis-config with facebook ads

fivetran-joemarkiewicz avatar Jan 04 '22 21:01 fivetran-joemarkiewicz

I just used the dbt init <project> dbt_project.yml template - with: profile: 'fivetran'

fivetran-sheringuyen avatar Jan 04 '22 22:01 fivetran-sheringuyen

Ah yeah the facebook schema used by default is facebook_ads, but we actually would want to override the facebook_ads_schema variable to be facebook_ads_dbt since that is where the complete set of our facebook data lives.

fivetran-joemarkiewicz avatar Jan 04 '22 22:01 fivetran-joemarkiewicz

Before merging this I want to 100% confirm that Advertisers share the same functionality as Accounts in the other ad platforms. With the data we have tested this seems to be the case. However, I want to confirm this is before we move forward with this PR.

fivetran-joemarkiewicz avatar Jan 05 '22 20:01 fivetran-joemarkiewicz

The updates from this PR are now available in the latest release (v1.0.0)! This PR is no longer needed.

fivetran-joemarkiewicz avatar Sep 07 '22 15:09 fivetran-joemarkiewicz