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

feat(ingestion/bigquery): Use sqlglot_lineage for usage and add more perf timers #9247

Conversation

shubhamjagtap639
Copy link
Contributor

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

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

@asikowitz asikowitz left a comment

Choose a reason for hiding this comment

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

Can you break this down by both? i.e. one timer for sql parsing, another for store_usage_event?

asikowitz
asikowitz previously approved these changes Nov 18, 2023
@asikowitz asikowitz changed the title refactor(ingestion/bigquery): Investigate BigQuery usage from exported metadata slowness feat(ingestion/bigquery): Use sqlglot_lineage for usage and add more perf timers Nov 20, 2023
@asikowitz asikowitz dismissed their stale review November 20, 2023 10:06

Added more changes

@@ -395,7 +398,10 @@ def resolve_table(self, table: _TableName) -> Tuple[str, Optional[SchemaInfo]]:
if schema_info:
return urn_lower, schema_info

return urn_lower, None
if self.platform in CASE_SENSITIVE_PLATFORMS:
Copy link
Collaborator

Choose a reason for hiding this comment

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

rename to TABLE_CASE_SENSITIVE_PLATFORMS

sql_query,
flags=re.IGNORECASE,
)
class BigQuerySQLParser:
Copy link
Collaborator

Choose a reason for hiding this comment

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

add a comment that this is unused and purely for tests for now

maybe move to the tests/ directory?

@hsheth2
Copy link
Collaborator

hsheth2 commented Dec 28, 2023

@asikowitz would love to get this merged since the changes are good and I don't want them to get stale

@asikowitz
Copy link
Collaborator

Thanks for the reminder

@asikowitz asikowitz merged commit 3635c1c into datahub-project:master Dec 28, 2023
53 checks passed
@asikowitz asikowitz deleted the Investigate-BigQuery-usage-from-exported-metadata-slowness branch December 28, 2023 09:54
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