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

Add conversions #34

Merged
merged 20 commits into from
Oct 21, 2024
Merged

Add conversions #34

merged 20 commits into from
Oct 21, 2024

Conversation

fivetran-avinash
Copy link
Contributor

@fivetran-avinash fivetran-avinash commented Aug 16, 2024

PR Overview

This PR will address the following Issue/Feature: Add conversions project.

This PR will result in the following new package version: v0.9.0

Breaking change for users who were not already bringing in conversion fields via passthrough columns. This is designed to be backwards compatible for those cases.

Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:

dbt_microsoft_ads v0.9.0

PR #34 includes the following updates:

Feature Updates: Conversion Support!

  • We have added the following source fields to each microsoft_ads end model:
    • conversions: Number of conversions, measured by completion of an action by a customer after viewing your ad.
    • conversions_value: The revenue reported by the advertiser as a result of the conversions figure.
  • In the event that you were already passing the above fields in via our passthrough columns, the package will dynamically avoid "duplicate column" errors.

The above new field additions are breaking changes for users who were not already bringing in conversion fields via passthrough columns.

Under the Hood

  • Created microsoft_ads_persist_pass_through_columns macro to ensure that the new conversion fields are backwards compatible with users who have already included them via passthrough fields.
  • Added integrity and consistency validation tests within integration_tests folder for the transformation models (to be used by maintainers only).
  • Updated seed files with new fields to test and validate on local data, provided specific casting to numeric (for currency) and integers.

Documentation Update

  • Updated microsoft_ads.yml with new fields mentioned above.

Contributors

PR Checklist

Basic Validation

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

  • dbt run –full-refresh && dbt test
  • [NA] dbt run (if incremental models are present) && dbt test

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

  • [NA] The appropriate issue has been linked, tagged, and properly assigned.
  • All necessary documentation and version upgrades have been applied.
  • docs were regenerated (unless this PR does not include any code or yml updates).
  • BuildKite integration tests are passing.
  • Detailed validation steps have been provided below.

Detailed Validation

Please share any and all of your validation steps:

Using internal data we validated that
(1) data was passing through as expected
(2) customers leveraging passthrough columns were now only grabbing the necessary columns
Screenshot 2024-08-19 at 5 20 53 PM

Screenshot 2024-08-19 at 5 20 39 PM

Screenshot 2024-08-19 at 5 21 03 PM

(3) leveraged devprod on our internal data set to ensure validation tests were matching conversion values on all consistency and integrity tests

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

🖱️

@fivetran-avinash fivetran-avinash self-assigned this Aug 20, 2024
@fivetran-avinash fivetran-avinash marked this pull request as ready for review August 20, 2024 09:10
packages.yml Outdated
revision: feature/add-conversions
warn-unpinned: false
# - package: fivetran/microsoft_ads_source
Copy link
Contributor

Choose a reason for hiding this comment

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

switch

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.

LGTM with one small suggestion in the tests to ensure we don't forget about conversions in future releases.

account_id,
sum(clicks) as clicks,
sum(impressions) as impressions,
sum(spend) as spend
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a requirement before release, but should we consider including the conversion fields in here as well (commented out) so we don't forget to include them in subsequent releases?

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 for other consistency tests

Copy link
Contributor

Choose a reason for hiding this comment

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

added

@fivetran-jamie fivetran-jamie merged commit e64e8a9 into main Oct 21, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants