Closed jarlisle closed 1 year ago
Hi @jarlisle thanks so much for opening this issue.
That is interesting that you are experiencing this issue. Our understanding was that keywords were unique to the ad group and not to the pin promotion. That being said, this may be the case for some pinterest ad accounts for which we may have not accounted.
Would you be able to confirm if the keywords in your pinterest account are tied to an individual pin promotion id? If so, then this may be an adjustment that we should make to our testing philosophy.
@fivetran-joemarkiewicz In the data, there is not a 1:1 relationship between the keyword and the pin_promotion_id. Does that answer your question?
Edit: In our data the keyword is not unique to the ad group. There is a 1:many relationship between the ad group and the keyword.
Hi @jarlisle that does answer my question, thanks for the insight!
The ad group to keyword relationship is alignment with my understanding; however, I am still trying to fully understand the pin promotion relationship to keyword and how we should handle this within our test. 🤔
While I continue digging on my side, I think it would be a good exercise to see what adjusting the test to include pin_promotion_id
would look like for your data. I just made a few changes to the dbt_pinterest_source and dbt_pinterest packages to include this change. If you have a moment, would you be able to use the following in place of your hub package dependency of pinterest and confirm what the results are on your end?
packages:
# Momentarily comment out for testing purposes and use the git version to install
# - package: fivetran/pinterest
# version: [">=0.7.0", "<0.8.0"]
- git: https://github.com/fivetran/dbt_pinterest.git
revision: testfix/keyword-report
warn-unpinned: false
@fivetran-joemarkiewicz, that worked without error. In investigating this I had a hunch that pin_promotion_id needed to be part of the test, but I wasn't able to confirm that anywhere in pinterest's docs.
Thanks so much for the confirmations @jarlisle! This is incredibly helpful and possibly something we will want to move forward with.
FYI I will be on PTO until next Tuesday. I will likely move forward with integrating this into a patch release then. Unless I come across evidence that informs this is not the right approach. Thanks!
Hi @jarlisle I just wanted to share an update here that I am going to have a member on my team take over this issue going forward. I am glad to see the test adjustment in the above branch is working for you! However, I want us to get a better understanding of the behavior of keywords before adjusting the test for all our users.
We hope to get a solid path forward with an official release by the end of next week!
@jarlisle we have released version v0.7.1, which addresses this issue. Closing this issue!
Is there an existing issue for this?
Describe the issue
I've upgraded from 0.5.0 to 0.7.0 and in 0.6.0 you've implemented some new tests. One of which is the unique combination of columns on the stg_pinterest_ads__keyword_report model for the following columns:
In our implementation, that errors out with 466K records. In checking our data it becomes unique when you add in pin_promotion_id. I haven't been able to find any documentation to verify my thought that it's not unique without pin_promotion_id, but I'm curious to know if you found documentation that specifies the 5 fields above as unique.
Relevant error log or model output
No response
Expected behavior
I expect the test to error out if it fails. I'm just curious if the test should include an additional field.
dbt Project configurations
name: 'mathis_brothers_dbt' version: '1.0.0' config-version: 2
profile: 'mathis'
model-paths: ["models"] analysis-paths: ["analyses"] test-paths: ["tests"] seed-paths: ["seeds"] macro-paths: ["macros"] snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files clean-targets: # directories to be removed by
dbt clean
models: mathis_brothers_dbt: reporting: materialized: view +schema: reporting intermediate: +schema: intermediate marts: ga4: events: org_specific: +schema: custom_events staging: ga4: events: org_specific: +schema: stg_custom_events
admind_dbt_ga4: staging: +schema: staging ga4: stg_ga4__events: materialized: table stg_ga4event_params: materialized: table stg_ga4event_user_properties: materialized: table marts: ga4: aggregated_reports: +schema: reporting processed_events: +schema: reporting intermediate: +schema: intermediate events: admind_standard: +schema: custom_events builtin: +schema: standard_events ecommerce: +schema: ecommerce
vars: admind_dbt_ga4: ga4_enums: ui_name: 'Google Analytics 4' db_name: 'ga4' system_type: 'web_analytics' not_set_value: '(not set)'
- name: $1000 Survey
event_params:
- name: URL
- name: User ID
key: int_value
Package versions
packages:
What database are you using dbt with?
bigquery
dbt Version
1.3
Additional Context
No response
Are you willing to open a PR to help address this issue?