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

test(ingest/dbt): add test for column meta match #7673

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Mar 23, 2023

This was working previously as well. The other changes are simply refactoring.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

This was working previously as well. The other changes are simply
refactoring.
@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Mar 23, 2023
@hsheth2 hsheth2 enabled auto-merge (squash) March 23, 2023 20:20
if (
operation_type == Constants.ADD_TAG_OPERATION
and operation_config[Constants.TAG]
):
tag = operation_config[Constants.TAG]
tag_id = _get_best_match(match, "tag")
if isinstance(tag_id, str):
Copy link
Collaborator

Choose a reason for hiding this comment

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

This if condition is missing in refractored code but also it does not seem required, as match object essentially returns a string if single argument is passed - https://docs.python.org/3/library/re.html#re.Match.group

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep the get_best_match method always returned a string so it wasn't necessary

Copy link
Collaborator

@mayurinehate mayurinehate left a comment

Choose a reason for hiding this comment

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

LGTM

@hsheth2 hsheth2 merged commit b2689b7 into datahub-project:master Mar 28, 2023
@hsheth2 hsheth2 deleted the dbt-test-column-match branch March 28, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants