-
Notifications
You must be signed in to change notification settings - Fork 39
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 #144
Conversation
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 thanks for quickly turning around this PR! I have a few comments and requests in my review. Additionally, would you be able to add consistency tests for the end models modified in this review. Thanks!
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 Thanks for the suggestions. I have applied them and also added the consistency tests, which I also added a screencap that they pass. This is ready for re-review!
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! I ran through the changes and your validations look great. No notes around the functionality of the PR, but I did come across one request that I realized when taking a look at your Mixpanel PR. I would like us to apply to the macro moving forward (adding the adapter.dispatch and the alias to when we call the macro).
Let me know once that update is applied and that re-review should be good for approval!
packages.yml
Outdated
# - package: fivetran/hubspot_source | ||
# version: [">=0.15.0", "<0.16.0"] | ||
- git: https://github.com/fivetran/dbt_hubspot_source.git | ||
revision: update/get-ticket-property-history-columns | ||
warn-unpinned: false |
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.
Reminder to swap before release
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.
@fivetran-joemarkiewicz I have updated with your suggestions, and this is ready for re-review.
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 for addressing my review notes. This PR looks good to go! I do have one open question that can be addressed as a team, but curious if you have any insight into it.
This will be good for release review! Be sure to swap the package dep before merging.
@@ -0,0 +1,35 @@ | |||
{% macro is_incremental_compatible() -%} | |||
{{ return(adapter.dispatch('is_incremental_compatible', 'hubspot') ()) }} |
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.
I know we will sometimes provide the return here, but other times we will not. Do you know what the difference is (if there is any)?
Looking at dbt_utils I can see they always provide a return here. However, a spot check on other package maintainers and our own Fivetran Utils I see that a mix of versions are provided. 🤔
Since we can see this is what is used by dbt_utils I would prefer we keep your code. However, I would like to explore what the difference between having return
and not causes.
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 I recall having discussing this as a team a while back, and that the conclusion was we should use it, but I'm not sure what the reason was nor can I find a reference to it. I also realize that several of our macros don't use it and seem to function fine, and I've forgotten to use it recently as well.
export CI_DATABRICKS_DBT_CATALOG=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_DBT_CATALOG" --project="dbt-package-testing-363917") | ||
export CI_DATABRICKS_SQL_DBT_HTTP_PATH=$(gcloud secrets versions access latest --secret="CI_DATABRICKS_SQL_DBT_HTTP_PATH" --project="dbt-package-testing-363917") |
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.
Lines 26/27 are not present in the equivalent source package pre-command, should they be added or is this outside scope.
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.
Added
bash .buildkite/scripts/run_models.sh databricks | ||
|
||
- label: ":databricks: :database: Run Tests - Databricks SQL Warehouse" |
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.
Should we add this support to the source package as well or is this out of scope?
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.
Added
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 This looks mostly good! A few comments before approving.
(cc: @fivetran-joemarkiewicz if you are taking this on.)
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 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
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?
🤖