-
Notifications
You must be signed in to change notification settings - Fork 2
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/add legacy support #27
Conversation
lever_using_posting_tag: true | ||
lever_using_requisitions: true |
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.
These are true by default, so should not be included here.
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 @fivetran-catfritz ! Just had some comments
Co-authored-by: Renee Li <[email protected]>
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 @fivetran-reneeli! I have 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.
Just remembered one thing-- to uncollapse the dropdowns in the README. Other than that, looks good to go!
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 working through this PR! I have a few change requests and comments before this is ready to go. Let me know if you have any questions. Thanks!
- name: opportunity_id | ||
description: Unique ID of the opportunity. | ||
tests: |
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.
Is there a reason the not_null test was removed for this field? The unique combo of columns doesn't test if the field is not null. We should probably add that back in.
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.
Same comment for the other fields that had the not_null test removed.
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 these back.
{{ | ||
fivetran_utils.union_data( | ||
table_identifier='interviewer_user', | ||
database_variable='lever_database', | ||
schema_variable='interview_user' if var('lever__using_interview_user', lever_source.does_table_exist('interview_user')) else 'interviewer_user', | ||
default_database=target.database, | ||
default_schema='lever', | ||
default_variable='interview_user' if var('lever__using_interview_user', lever_source.does_table_exist('interview_user')) else 'interviewer_user', | ||
union_schema_variable='lever_union_schemas', | ||
union_database_variable='lever_union_databases' | ||
) | ||
}} |
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.
For some reason this isn't working as I would expect when testing on two different schemas (one with interviewer_user
and one with interview_user
. It seems to work when interviewer_user
is present, but not interview_user
.
Strangely enough, the users
vs user
works without an issue. Would you be able to look into this and see what could be the cause or if I may be missing something.
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.
Oh boy I finally figured out I pasted the switch logic into the wrong line... updated!
Co-authored-by: Joe Markiewicz <[email protected]>
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 review. Made the updates!
{{ | ||
fivetran_utils.union_data( | ||
table_identifier='interviewer_user', | ||
database_variable='lever_database', | ||
schema_variable='interview_user' if var('lever__using_interview_user', lever_source.does_table_exist('interview_user')) else 'interviewer_user', | ||
default_database=target.database, | ||
default_schema='lever', | ||
default_variable='interview_user' if var('lever__using_interview_user', lever_source.does_table_exist('interview_user')) else 'interviewer_user', | ||
union_schema_variable='lever_union_schemas', | ||
union_database_variable='lever_union_databases' | ||
) | ||
}} |
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.
Oh boy I finally figured out I pasted the switch logic into the wrong line... 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.
LGTM
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 added the null tests back!
- name: opportunity_id | ||
description: Unique ID of the opportunity. | ||
tests: |
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 these back.
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 @fivetran-catfritz! Approved with one last request to add an additional entry to the CHANGELOG for the test modification/updates.
## Under the hood | ||
- Turned off freshness tests for `USER`/`USERS` and `INTERVIEW_USER`/`INTERVIEWER_USER` to avoid possible conflicts. | ||
- Updated temporary models to union source data using the `fivetran_utils.union_data` macro. | ||
- Added the `source_relation` column in each staging model to identify the origin of each field, utilizing the `fivetran_utils.source_relation` macro. |
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.
Some staging models had the not_null
test added when it was previously being tested. Can we include a callout in here to mention this. No need to be explicit, but an blanket statement saying we made sure to add not_null
tests for the relevant fields within each staging model.
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!
PR Overview
This PR will address the following Issue/Feature:
user
tousers
andinterviewer_user
tointerview_user
#23contact_link
is missing #25This 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:
dbt run (if incremental models are present) && dbt testBefore marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please share any and all of your validation steps:
Missing contact_link
CONTACT_LINK
as a missing source, and the null table is properly created.user
vsusers
andinterviewer_user
vsinterview_user
If you had to summarize this PR in an emoji, which would it be?
💃