-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bug/databricks sql incremental #49
Conversation
* Update mixpanel_lookback.sql * update changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-catfritz these changes look great! Just a few suggestions and one code update request which is the same as my HubSpot comment. Let me know if you have any questions.
Once these updates are applied the re-review should be good for approval!
CHANGELOG.md
Outdated
@@ -1,3 +1,26 @@ | |||
# dbt_mixpanel v0.10.0 | |||
|
|||
[PR #48](https://github.com/fivetran/dbt_mixpanel/pull/48) includes the following updates: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update to the PR link reference
[PR #48](https://github.com/fivetran/dbt_mixpanel/pull/48) includes the following updates: | |
[PR #49](https://github.com/fivetran/dbt_mixpanel/pull/49) includes the following updates: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 😅. Updated.
CHANGELOG.md
Outdated
- For Databricks SQL Warehouses, incremental materialization will not be used due to the incompatibility of the `insert_overwrite` strategy. | ||
|
||
## Under the Hood | ||
- The `is_incremental_compatible` macro has been added to return `true` if the target warehouse supports our chosen incremental strategy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The `is_incremental_compatible` macro has been added to return `true` if the target warehouse supports our chosen incremental strategy. | |
- The `is_incremental_compatible` macro has been added and will return `true` if the target warehouse supports our chosen incremental strategy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated!
macros/mixpanel_lookback.sql
Outdated
@@ -6,30 +6,13 @@ | |||
|
|||
{% macro default__mixpanel_lookback(from_date, datepart, interval, safety_date='2010-01-01') %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Fivetran Log I noticed we provide default values for datepart and interval. Should we do the same here or is that not necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh good callout. It's not necessary in this package because I defined those variables, but it would make sense to keep things consistent, and I think having the defaults is the better version. Updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-joemarkiewicz This one is ready for re-review as well!
CHANGELOG.md
Outdated
@@ -1,3 +1,26 @@ | |||
# dbt_mixpanel v0.10.0 | |||
|
|||
[PR #48](https://github.com/fivetran/dbt_mixpanel/pull/48) includes the following updates: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 😅. Updated.
CHANGELOG.md
Outdated
- For Databricks SQL Warehouses, incremental materialization will not be used due to the incompatibility of the `insert_overwrite` strategy. | ||
|
||
## Under the Hood | ||
- The `is_incremental_compatible` macro has been added to return `true` if the target warehouse supports our chosen incremental strategy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated!
macros/mixpanel_lookback.sql
Outdated
@@ -6,30 +6,13 @@ | |||
|
|||
{% macro default__mixpanel_lookback(from_date, datepart, interval, safety_date='2010-01-01') %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh good callout. It's not necessary in this package because I defined those variables, but it would make sense to keep things consistent, and I think having the defaults is the better version. Updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-catfritz great work on this PR and thanks for addressing my review notes. This PR looks good for release review! I did encounter a few issues when running the validations with internal data, but they were pretty small and we have an easy workaround. Please take a look and address my remaining notes, but no need for those to be a blocker from initiating the release review process.
Great work!
integration_tests/tests/consistency/row_comparisons/consistency_sessions.sql
Outdated
Show resolved
Hide resolved
integration_tests/tests/consistency/row_comparisons/consistency_event.sql
Outdated
Show resolved
Hide resolved
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I have updated the tests, so now proceeding with release!
integration_tests/tests/consistency/row_comparisons/consistency_event.sql
Outdated
Show resolved
Hide resolved
integration_tests/tests/consistency/row_comparisons/consistency_sessions.sql
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
PR Overview
This PR will address the following Issue/Feature:
This PR will result in the following new package version:
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
Before marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please share any and all of your validation steps:
Consistency tests pass
Parquet file format
Before addressing the insert_overwrite incompatibility, our Databricks SQL instance is "managed", so I was getting the below error for the parquet file format.
Updating to delta format resolves this issue.
Insert-overwrite incremental strategy
Once the file format issue was resolved, I was able to reproduce the reported issue and get the below error.
Updating with the
materialized='incremental' if is_incremental_compatible() else 'table'
approach resolved this issue. When running a non-full-refresh run with a target of Databricks SQL, confirm there is no error and tables are created instead of and incremental run.If you had to summarize this PR in an emoji, which would it be?
💃