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

fix(ingest/bigquery): Fix shard regexp to match without underscore as well #8934

Merged
merged 10 commits into from
Oct 12, 2023

Conversation

treff7es
Copy link
Contributor

@treff7es treff7es commented Oct 3, 2023

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

@vercel
Copy link

vercel bot commented Oct 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2023 2:15pm

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Oct 3, 2023
Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

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

assuming all the regexes are correct, this looks good to me

# Cases with Just the table name as input
("table", "table", None),
("table20231215", "table20231215", None),
("table20231215", "table", "20231215"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

wow all these tests for a single regex

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Haha, yes, it is super crazy but very well-detailed

Copy link
Collaborator

@hsheth2 hsheth2 left a comment

Choose a reason for hiding this comment

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

assuming all the regexes are correct, this looks good to me

@hsheth2
Copy link
Collaborator

hsheth2 commented Oct 4, 2023

@treff7es there's a test error

FAILED tests/unit/test_bigqueryv2_usage_source.py::test_bigquery_table_sanitasitation - AssertionError: assert False
 +  where False = <bound method BigqueryTableIdentifier.is_sharded_table of BigqueryTableIdentifier(project_id='project-1234', dataset='dataset-4567', table='foo_20222110', _BQ_SHARDED_TABLE_SUFFIX='_yyyymmdd')>()
 +    where <bound method BigqueryTableIdentifier.is_sharded_table of BigqueryTableIdentifier(project_id='project-1234', dataset='dataset-4567', table='foo_20222110', _BQ_SHARDED_TABLE_SUFFIX='_yyyymmdd')> = BigqueryTableIdentifier(project_id='project-1234', dataset='dataset-4567', table='foo_20222110', _BQ_SHARDED_TABLE_SUFFIX='_yyyymmdd').is_sharded_table

@treff7es
Copy link
Contributor Author

treff7es commented Oct 6, 2023

test_bigqueryv2_usage_source

thanks, the test was not correct (earlier it was an invalid data and we properly check it)

@treff7es treff7es merged commit dd418de into datahub-project:master Oct 12, 2023
54 checks passed
@maggiehays maggiehays added the hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants