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

bugfix/incremental-mar-filter-removal #72

Merged
merged 4 commits into from
Feb 15, 2023

Conversation

fivetran-joemarkiewicz
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz commented Feb 9, 2023

Are you a current Fivetran customer?

Fivetran created PR

What change(s) does this PR introduce?

Bug Fixes

  • Modified the logic within the fivetran_log__mar_table_history model to no longer filter out previous historical MAR records. Previously, these fields were filtered out as the active_volume source (since deprecated and replaced with incremental_mar) produced a cumulative daily MAR total. However, the incremental_mar source is not cumulative and will need to include all historical records.

Under the Hood

  • Added coalesce statements to the paid_monthly_active_rows and free_monthly_active_rows fields within the fivetran_log__mar_table_history model to coalesce to 0.

Did you update the CHANGELOG?

  • Yes

Does this PR introduce a breaking change?

  • Yes (please provide breaking change details below.)
  • No (please provide an explanation as to how the change is non-breaking below.)

This PR is only removing an erroneous filter and will not cause a breaking change.

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

  • Yes

Is this PR in response to a previously created Bug or Feature Request

How did you test the PR changes?

  • BuildKite
  • Local (please provide additional testing details below)
    Tested on the customers data to confirm the totals matched following this update.

Select which warehouse(s) were used to test the PR

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • Databricks
  • Other (provide details below)

Provide an emoji that best describes your current mood

🧁

Feedback

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.

@fivetran-joemarkiewicz fivetran-joemarkiewicz marked this pull request as ready for review February 9, 2023 20:54
Copy link
Contributor

@fivetran-sheringuyen fivetran-sheringuyen left a comment

Choose a reason for hiding this comment

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

Hey @fivetran-joemarkiewicz, this PR looks good to me.

Just a couple questions but approving as they are not critical for release.

CHANGELOG.md Outdated
- Modified the logic within the `fivetran_log__mar_table_history` model to no longer filter out previous historical MAR records. Previously, these fields were filtered out as the `active_volume` source (since deprecated and replaced with `incremental_mar`) produced a cumulative daily MAR total. However, the `incremental_mar` source is not cumulative and will need to include all historical records. ([#72](https://github.com/fivetran/dbt_fivetran_log/pull/72))

## Under the Hood
- Added coalesce statements to the `paid_monthly_active_rows` and `free_monthly_active_rows` fields within the [fivetran_log__mar_table_history](https://github.com/fivetran/dbt_fivetran_log/blob/226deff6d4f10b19bad5ccff1a6bc6813e809fe7/models/fivetran_log__mar_table_history.sql) model to coalesce to 0. ([#72](https://github.com/fivetran/dbt_fivetran_log/pull/72))
Copy link
Contributor

Choose a reason for hiding this comment

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

General question - I know there were some convos regarding referencing the github code vs the dbt Docs models, what are your opinions here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I will update to point to the docs.

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.

@@ -57,7 +54,6 @@ latest_mar as (
(free_monthly_active_rows + paid_monthly_active_rows) as total_monthly_active_rows
Copy link
Contributor

Choose a reason for hiding this comment

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

for date(measured_date) as last_measured_at, do you think last_measured_at is a good name here? Or should it be measured_at? or just date_day?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For this release I would recommend we keep it to measured_at otherwise this will be a breaking change and we should get the update out in a patch release.

This is something we can open an FR for to clarify in the next breaking change.

@fivetran-joemarkiewicz fivetran-joemarkiewicz merged commit 6e5fbe7 into main Feb 15, 2023
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.

2 participants