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

v5 API support #26

Merged
merged 21 commits into from
Jul 26, 2023
Merged

v5 API support #26

merged 21 commits into from
Jul 26, 2023

Conversation

fivetran-reneeli
Copy link
Contributor

PR Overview

This PR will address the following Issue/Feature:
fivetran/dbt_pinterest_source#24
This PR will result in the following new package version: v0.8.0

Removal of deprecated fields
Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:

  • Following Pinterest Ads deprecating the v4 API on June 30, 2023 in place of v5, the Pinterest Ads Fivetran connector now leverages the Pinterest v5 API. The following fields have been deprecated/ introduced:
Model Removed New
pinterest_ads__advertiser_report billing_type, status
  • In the v5 upgrade, advertiser_id has been replaced by ad_account_id. However, to keep our Pinterest Ads package standard with our other ad packages, we have kept it as advertiser_id.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt compile
  • dbt run –full-refresh
  • dbt run
  • dbt test
  • [n/a] dbt run –vars (if applicable)

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked and tagged
  • You are assigned to the corresponding issue and this PR
  • [ n/a] BuildKite integration tests are passing

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

  • You have validated these changes and assure this PR will address the respective Issue/Feature.
  • You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
  • You have provided details below around the validation steps performed to gain confidence in these changes.

dbt run and review github docs to ensure fields have been removed

Standard Updates

Please acknowledge that your PR contains the following standard updates:

  • Package versioning has been appropriately indexed in the following locations:
    • indexed within dbt_project.yml
    • indexed within integration_tests/dbt_project.yml
  • CHANGELOG has individual entries for each respective change in this PR
  • [ n/a] README updates have been applied (if applicable)
  • [ n/a] DECISIONLOG updates have been updated (if applicable)
  • Appropriate yml documentation has been added (if applicable)

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

  • docs were regenerated (unless this PR does not include any code or yml updates)

If you had to summarize this PR in an emoji, which would it be?

💃

@fivetran-reneeli
Copy link
Contributor Author

I think the reason buildkite is failing is because we don't have the new data, therefore I haven't replaced the seed data used for integration testing. Which means on the joins to advertiser_id (which is the ad_account_id in source tables), are null

@fivetran-reneeli
Copy link
Contributor Author

holding off on docs regen til PR is complete

Copy link
Contributor

@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.

@fivetran-reneeli I just have a few comments to be applied before this is good to go.

Additionally, I wanted to get your thoughts on possibly leveraging the advertiser_id (what is ad_account_id in the source) in the transform model joins. For example, in the pin_promotion_report we currently bring in the advertiser details via a connections from the pin_promotion_report -> campaigns -> advertiser.

In theory, we could leverage this new advertiser_id brought in from the source to perform the joins for the advertiser table. However, I am a bit wary to do this as we do not currently have data to fully validate. Therefore, I am a bit hesitant to make this update although it may be more optimized. What are your thoughts?

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated
|---|---|---|
| [pinterest_ads__advertiser_report](https://fivetran.github.io/dbt_pinterest/#!/model/model.pinterest.pinterest_ads__advertiser_report) | `billing_type`, `status` | |

- In the v5 upgrade, `advertiser_id` has been replaced by `ad_account_id`. However, to keep our Pinterest Ads package standard with our other ad packages, we have kept it as `advertiser_id`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment from the source. I think this should be reworded to be more in line with the updates applied.

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!

Copy link
Contributor

Choose a reason for hiding this comment

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

Same small note from the source package review about updating this to be more in line with the actual updates.

packages.yml Outdated
Comment on lines 2 to 4
revision: feature/pinterest_v5_API_support
warn-unpinned: false
Copy link
Contributor

Choose a reason for hiding this comment

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

Reminder to switch before merge and release.

Copy link
Contributor

Choose a reason for hiding this comment

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

@fivetran-reneeli in addition to updating this before merging I realized the README has not been updated with this package new version as well as the dependency matrix needs to be updated to point to the new source package range. Please update those before merging or kicking off the release process.

@fivetran-reneeli
Copy link
Contributor Author

@fivetran-reneeli I just have a few comments to be applied before this is good to go.

Additionally, I wanted to get your thoughts on possibly leveraging the advertiser_id (what is ad_account_id in the source) in the transform model joins. For example, in the pin_promotion_report we currently bring in the advertiser details via a connections from the pin_promotion_report -> campaigns -> advertiser.

In theory, we could leverage this new advertiser_id brought in from the source to perform the joins for the advertiser table. However, I am a bit wary to do this as we do not currently have data to fully validate. Therefore, I am a bit hesitant to make this update although it may be more optimized. What are your thoughts?

Hey @fivetran-joemarkiewicz I think I see what you mean-- now that ad group history and pin promotion history have advertiser_id, it would make more sense to bring it in through those tables as opposed to from the advertiser_history table. Since advertiser_history is joined in a more roundabout way than x_report and x_history.

While we don't have the data to test this, I think this makes the more logical sense, so I'm happy with making the change

Copy link
Contributor

@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.

@fivetran-reneeli thanks for working through these updates! This almost looks good to go! I have one remaining comment here, as well as a final comment where I didn't realize the README wasn't updated to point to the new version of the package and also update the dependency matrix. Please update those before kicking off the release process.

As those are small changes, I am comfortable approving this PR!

packages.yml Outdated
Comment on lines 2 to 4
revision: feature/pinterest_v5_API_support
warn-unpinned: false
Copy link
Contributor

Choose a reason for hiding this comment

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

@fivetran-reneeli in addition to updating this before merging I realized the README has not been updated with this package new version as well as the dependency matrix needs to be updated to point to the new source package range. Please update those before merging or kicking off the release process.

@fivetran-reneeli fivetran-reneeli added enhancement New feature or request update_type:models Primary focus requires model updates update_type:feature Primary focus is to add new functionality labels Jul 19, 2023
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
@fivetran-reneeli fivetran-reneeli merged commit dd72ff9 into main Jul 26, 2023
@fivetran-reneeli fivetran-reneeli deleted the feature/pinterest_v5_API_support branch July 26, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request update_type:feature Primary focus is to add new functionality update_type:models Primary focus requires model updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants