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: Adding conversions #28

Merged
merged 12 commits into from
Oct 29, 2024
Merged

Feature: Adding conversions #28

merged 12 commits into from
Oct 29, 2024

Conversation

fivetran-avinash
Copy link
Contributor

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

PR Overview

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

This PR will result in the following new package version: 0.7.0

See CHANGELOG for why changes are breaking.

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:

  • Adds a conversion_purchases_value field to each _report end model, representing the value of conversions that occurred on each day for each account, ad, ad squad, campaign and url.
    • Set current variable defaults in the dbt_project.yml to bring in the most used conversion field conversion_purchases by default.
  • Adds a total_conversions metric in our end models to track all conversions being brought in by the snapchat_ads_conversion_fields variable.

IMPORTANT: The above new field additions are breaking changes.

Documentation Update

  • Documents how to set your own passthrough fields with the variable snapchat_ads__conversion_fields in the README.

Under the Hood

  • Added a new version of the persist_pass_through_columns() macro in which we can include coalesces and properly check between conversion field values and the existing passthrough column.

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:

Validated the new tests worked on both dev and integration tests

Integration tests run
Screenshot 2024-10-16 at 1 38 43 PM
Screenshot 2024-10-16 at 1 38 26 PM

Dev run
Screenshot 2024-10-16 at 2 04 18 PM
Screenshot 2024-10-16 at 2 04 00 PM

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

📱

@fivetran-avinash fivetran-avinash self-assigned this Oct 16, 2024
packages.yml Outdated
# - package: fivetran/snapchat_ads_source
# version: [">=0.7.0", "<0.8.0"]

- git: https://github.com/fivetran/dbt_snapchat_ads_source.git
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 just one question and a request to remove some commented out code.

dbt-databricks>=1.3.0,<2.0.0

oscrypto @ git+https://github.com/wbond/oscrypto.git@d5f3437
dbt-databricks>=1.6.0,<2.0.0
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 if there is a reason we had to use 1.6.0 and not 1.3.0

Copy link
Contributor

Choose a reason for hiding this comment

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

Same response from source, this is fine to keep

models/snapchat_ads__url_report.sql Outdated Show resolved Hide resolved
@fivetran-jamie fivetran-jamie merged commit f7f9558 into main Oct 29, 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