Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/v2-updates #18

Merged
merged 15 commits into from
Sep 1, 2022
Merged

feature/v2-updates #18

merged 15 commits into from
Sep 1, 2022

Conversation

fivetran-joemarkiewicz
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz commented Jun 30, 2022

Are you a current Fivetran customer?

Fivetran created PR

What change(s) does this PR introduce?

🚨 Breaking Changes 🚨

The pin_promotion_report_pass_through_metric variable has been renamed to pinterest__pin_promotion_report_passthrough_metrics.

🎉 Feature Enhancements 🎉

This PR includes the following changes:

  • Addition of the following staging models which pull from the source counterparts. The inclusion of the additional _report source tables is to generate a more accurate representation of the Pinterest Ads data. For example, not all Ad types are included within the pin_promotion_report table. Therefore, the addition of the further grain reports will allow for more flexibility and accurate Pinterest Ad reporting.

    • stg_pinterest_ads__ad_group_report
    • stg_pinterest_ads__advertiser_report
    • stg_pinterest_ads__campaign_report
    • stg_pinterest_ads__keyword_report
    • stg_pinterest_ads__advertiser_history
    • stg_pinterest_ads__keyword_history
  • Inclusion of additional passthrough metrics:

    • pinterest__ad_group_report_passthrough_metrics
    • pinterest__campaign_report_passthrough_metrics
    • pinterest__advertiser_report_passthrough_metrics
    • pinterest__keyword_report_passthrough_metrics
  • README updates for easier navigation and use of the package.

  • Addition of identifier variables for each of the source tables to allow for further flexibility in source table direction within the dbt project.

  • Included grain uniqueness tests for each staging table.

Did you update the CHANGELOG?

  • Yes

Does this PR introduce a breaking change?

  • Yes (please provide breaking change details below.)
  • No (please provide an explanation as to how the change is non-breaking below.)

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

  • Yes

Is this PR in response to a previously created Bug or Feature Request

How did you test the PR changes?

  • CircleCi
  • Local (please provide additional testing details below)

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

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • 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 fivetran-joemarkiewicz added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 30, 2022
@fivetran-joemarkiewicz fivetran-joemarkiewicz marked this pull request as ready for review July 5, 2022 16:10
Copy link
Contributor

@fivetran-sheringuyen fivetran-sheringuyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @fivetran-joemarkiewicz, great work on the PR. I left some in-line comments I'd like for you to check out, let me know if you have any questions.

This looks like it also takes care of PR #15 and allows us to remove the feature/spark branch for this repo! Additionally, did you still want to file feature requests for a video related model in the future?


- name: ad_group_report
description: source table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we improve on the description for this table?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.


- name: advertiser_history
description: source table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we improve on the description for this table?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.


- name: advertiser_report
description: source table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we improve on the description for this table?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.


- name: campaign_report
description: source table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we improve on the description for this table?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.


- name: keyword_history
description: source table
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we improve on the description for this table?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date_day
- ad_group_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a similar note here, are ad_group_ids unique within advertiser/campaigns?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our ERD I have added the advertiser_id to the grain testing.

- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date_day
- campaign_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And a similar note here, are campaign_ids unique within advertisers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our ERD I updated this to include the advertiser_id to the grain testing.

combination_of_columns:
- date_day
- keyword_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And a similar note here, are keyword_ids unique within advertiser/campaigns/ad groups/pin promotions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our ERD I updated this to include the ad_group_id, campaign_id, and advertiser_id for the grain testing.

models/docs.md Outdated

{% docs advertiser_id %} The ID of the related Advertiser. {% enddocs %}

{% docs impressions %} The number of impressions that occurred on the day of the record. {% enddocs %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth to specify that this is both paid and earned.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely should include this. Thanks for calling it out!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

models/docs.md Outdated

{% docs impressions %} The number of impressions that occurred on the day of the record. {% enddocs %}

{% docs clicks %} The number of clicks that occurred on the day of the record. {% enddocs %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth to specify that this is both paid and earned.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto! Updated.

Copy link
Contributor Author

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @fivetran-sheringuyen! I just applied the updates from your comments. Please let me know if you have any questions regarding my updates 😄

description: "{{ doc('campaign_id') }}"
- name: advertiser_id
description: "{{ doc('advertiser_id') }}"
- name: _fivetran_synced
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great point. I will remove since it isn't used downstream.

description: "{{ doc('campaign_id') }}"
- name: advertiser_id
description: "{{ doc('advertiser_id') }}"
- name: _fivetran_synced
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Just updated

description: Unique identifier of the owner user.
- name: updated_at
description: "{{ doc('updated_at') }}"
- name: _fivetran_synced
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, just updated

description: "{{ doc('advertiser_id') }}"
tests:
- not_null
- name: _fivetran_synced
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, just updated!

- name: advertiser_id
description: The ID of the related Advertiser.
description: "{{ doc('advertiser_id') }}"
- name: _fivetran_synced
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, just updated

- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date_day
- campaign_id
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our ERD I updated this to include the advertiser_id to the grain testing.

combination_of_columns:
- date_day
- keyword_id
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per our ERD I updated this to include the ad_group_id, campaign_id, and advertiser_id for the grain testing.

models/docs.md Outdated

{% docs advertiser_id %} The ID of the related Advertiser. {% enddocs %}

{% docs impressions %} The number of impressions that occurred on the day of the record. {% enddocs %}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely should include this. Thanks for calling it out!

models/docs.md Outdated

{% docs advertiser_id %} The ID of the related Advertiser. {% enddocs %}

{% docs impressions %} The number of impressions that occurred on the day of the record. {% enddocs %}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

models/docs.md Outdated

{% docs impressions %} The number of impressions that occurred on the day of the record. {% enddocs %}

{% docs clicks %} The number of clicks that occurred on the day of the record. {% enddocs %}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto! Updated.

Copy link
Contributor

@fivetran-sheringuyen fivetran-sheringuyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for the updates @fivetran-joemarkiewicz !

@fivetran-sheringuyen fivetran-sheringuyen merged commit c29faa1 into main Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants