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(ingest): utilities for query logs #10036

Merged
merged 7 commits into from
Mar 13, 2024
Merged

feat(ingest): utilities for query logs #10036

merged 7 commits into from
Mar 13, 2024

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Mar 12, 2024

  • Make it configurable via an env variable
  • Add a CLI for extracting the query logs from the sqlite db
  • Add a test for the stored query logs
  • Fix broken data lake profiling test
  • Bump acryl-sqlglot

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 Mar 12, 2024
@hsheth2 hsheth2 added the merge-pending-ci A PR that has passed review and should be merged once CI is green. label Mar 12, 2024
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.

Nice bug fixes on file backed data structures. One question


assert dataclasses.is_dataclass(LoggedQuery)

shared_connection = ConnectionWrapper(pathlib.Path(query_log_file))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to get closed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

probably would be nicer to do it explicitly, but it'll get done in __del__ so it's fine

Comment on lines +316 to +317
def close(self) -> None:
self._exit_stack.close()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice

@@ -126,6 +126,7 @@ def executemany(
def close(self) -> None:
for obj in self._dependent_objects:
obj.close()
self._dependent_objects.clear()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice

@hsheth2 hsheth2 merged commit b0163c4 into master Mar 13, 2024
53 checks passed
@hsheth2 hsheth2 deleted the query-logs branch March 13, 2024 06:20
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 merge-pending-ci A PR that has passed review and should be merged once CI is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants