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] Add conversions #24

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

fivetran-avinash
Copy link

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

PR Overview

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

This PR will result in the following new package version:

See CHANGELOG

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

Feature Updates: Conversion Support!

We have added more robust support for conversions in our data models by doing the following:

  • Created a snapchat_ads__conversion_fields variable to pass through additional conversion metrics in the stg_snapchat_ads__ad_hourly_report,stg_snapchat_ads__ad_squad_hourly_report and stg_snapchat_ads__campaign_hourly_report models.
    • Set variable defaults in the dbt_project.yml to bring in the most used conversion field conversion_purchases.
  • Ensured backwards compatibility with existing passthrough column variables in these models by creating snapchat_ads_add_pass_through_columns and snapchat_ads_fill_pass_through_columns macro checks for whether these fields already are brought in by the existing passthrough variables. This ensures there are no duplicate column errors if both the new conversion variable and the old passthrough variable are leveraged in either stg_snapchat_ads__*_hourly_report* data model.
  • Brought in the conversion_purchases_value field to the above mentioned stg_snapchat_ads__*_hourly_report* model

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

Documentation Update

  • Documents the ability to transform metrics provided to the snapchat_ads__conversion_fields variable in the README.
  • Added new metrics to src and stg yml files.

Under the Hood

  • Updated snapchat_*_hourly_report_data seed files with relevant conversion fields for more robust testing.

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:

Compiled models successfully using various permutations of the passthrough columns/conversion fields vars.

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

🛝

@fivetran-avinash fivetran-avinash self-assigned this Oct 16, 2024
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.

1 participant