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 action result #39

Merged
merged 19 commits into from
Nov 26, 2024
Merged

Conversation

fivetran-catfritz
Copy link
Contributor

@fivetran-catfritz fivetran-catfritz commented Oct 26, 2024

PR Overview

This PR will address the following Issue/Feature:

  • internal ticket

This PR will result in the following new package version:

  • v0.12.0 due to schema change

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

Breaking Changes:

  • The action_result field is now included in the following models, allowing users to filter records based on the action_result value:
    • No grain change:
      • stg_marketo__activity_send_email
      • marketo__email_sends_deduped
      • marketo__email_sends
    • Grain change (now includes action_result):
      • marketo__email_stats__by_email_template
      • marketo__email_stats__by_lead
      • marketo__email_templates
      • marketo__leads

Documentation updates:

  • Add missing definitions to dbt documents.

Under the Hood:

  • Added consistency integration tests for the models listed above.
  • Removed unnecessary tests from intermediate models to optimize resource usage.
  • Updated seed data with action_result

Feature

  • Added the action_result field to the stg_marketo__activity_send_email model to capture the result of email actions and enable filtering in downstream models.

Documentation update

  • Update dbt docs with action_result

Under the hood

  • Updated seed data with action_result
  • Updated macro marketo_activity_send_email_data with action_result

PR Checklist

Basic Validation

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

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

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

  • 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:

  • consistency tests pass for email_sends when excluding the added action_result field.
  • It is expected to fail for email_templates and leads due to grain change.
Screenshot 2024-10-25 at 8 32 38 PM

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

💃

@fivetran-catfritz fivetran-catfritz self-assigned this Oct 26, 2024
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-catfritz thanks for this PR. Please see my requests below in addition to removing the action_result field from the aggregate models like we discussed in our meeting earlier. Thanks!

CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
packages.yml Outdated
Comment on lines 2 to 6
# - package: fivetran/marketo_source
# version: [">=0.12.0", "<0.13.0"]
- git: https://github.com/fivetran/dbt_marketo_source.git
revision: feature/add-action-result
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 swap before release

Copy link
Contributor

Choose a reason for hiding this comment

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

Reminder here again to swap before merge

Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz As we discussed, I removed action_result from the models that would have a grain change and added a DECISIONLOG discussing this.

CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
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-catfritz great job with these updates! I have a few small requests before this is ready for approval.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz Updated and ready for review!

CHANGELOG.md Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
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 a few small comments. Also, would you be able to open a FR on this repo for us to modify the marketo__leads validation test. Currently we are testing to make sure every field matches between the prod and dev. However, this can be over 500 columns for some cases and it can lead to erroneous failures in the test and make it hard to decipher why it's failing. I imagine a straight forward lead row count would do the trick here and help with the massive width of the table.

packages.yml Outdated
Comment on lines 2 to 6
# - package: fivetran/marketo_source
# version: [">=0.12.0", "<0.13.0"]
- git: https://github.com/fivetran/dbt_marketo_source.git
revision: feature/add-action-result
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 here again to swap before merge

# enable when regenerating docs
marketo__enable_campaigns: true
marketo__enable_programs: true

Copy link
Contributor

Choose a reason for hiding this comment

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

I just noticed the models config is not included in here. Can we add that for easier future validation testing.

models:
    +schema: "marketo_{{ var('directed_schema','dev') }}"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz I went ahead and updated the consistency_leads tests since it was straightforward. I gave it a test run too on our test data, and it is working!

# enable when regenerating docs
marketo__enable_campaigns: true
marketo__enable_programs: true

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

@fivetran-reneeli fivetran-reneeli self-requested a review November 26, 2024 17:24
CHANGELOG.md Outdated
- `marketo__email_sends_deduped`
- `marketo__email_sends`
- *Note:* If you have previously added this field via the `marketo__activity_send_email_passthrough_columns` variable, remove or alias it there to prevent duplicate column errors.
- To minimize customer impact, we limited adding `action_result` to models where it does not alter the grain. Users needing `action_result` in aggregate models can derive it from the `marketo__email_sends` model using custom aggregation logic. For more details, refer to the [DECISIONLOG entry](https://github.com/fivetran/dbt_marketo/blob/main/CHANGELOG.md#action-result-field-introduction).
Copy link
Contributor

Choose a reason for hiding this comment

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

No change here, just a note I think the changelog in the PR template is flipped between the models under grain change vs not.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh thank you!

Copy link
Contributor

@fivetran-reneeli fivetran-reneeli left a comment

Choose a reason for hiding this comment

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

Just some very light comments!

README.md Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to update the description for marketo__email_sends in the README since that grain was impacted?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually I checked again, disregard that. The key itself didn't change

Copy link
Contributor

@fivetran-reneeli fivetran-reneeli left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

Thanks @fivetran-reneeli made the updates!

CHANGELOG.md Outdated
- `marketo__email_sends_deduped`
- `marketo__email_sends`
- *Note:* If you have previously added this field via the `marketo__activity_send_email_passthrough_columns` variable, remove or alias it there to prevent duplicate column errors.
- To minimize customer impact, we limited adding `action_result` to models where it does not alter the grain. Users needing `action_result` in aggregate models can derive it from the `marketo__email_sends` model using custom aggregation logic. For more details, refer to the [DECISIONLOG entry](https://github.com/fivetran/dbt_marketo/blob/main/CHANGELOG.md#action-result-field-introduction).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh thank you!

@fivetran-catfritz fivetran-catfritz merged commit 54928cf into main Nov 26, 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