-
Notifications
You must be signed in to change notification settings - Fork 55
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
TDL-20481 Update pks in schema of users stream #95
base: master
Are you sure you want to change the base?
Conversation
tap_jira/__init__.py
Outdated
# Update pk for users stream to key for on prem jira instance | ||
if stream.tap_stream_id == "users" and Context.client.is_on_prem_instance: | ||
stream.pk_fields = ["key"] |
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.
We already do this in generate_metadata()
, can we refactor so we only have 1 place in code in which we generate our schema?
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.
Done
tap_jira/__init__.py
Outdated
""" | ||
if Context.client.is_on_prem_instance: | ||
# ALL_STREAMS contains `Users` object at index 7 | ||
streams_.ALL_STREAMS[7].pk_fields = ["key"] |
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.
We should not be making the ordering of the streams in ALL_STREAMS
matter. Just call discover()
in the sync function to get the catalog instead of loading the schema in 2 different places in code.
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.
We were already calling discovery but not using generated catalog which we updated.
Description of change
users
stream in sync mode.Manual QA steps
key-properties
iskey
of users stream for on-prem Jira instance in the catalog.key-properties
is updated tokey
inschema
message ofusers
stream for on-prem Jira instance.Risks
Rollback steps