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): increase logging in bigquery-queries extractor #11774

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Nov 1, 2024

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 1, 2024
Copy link

github-actions bot commented Nov 1, 2024

Hello @hsheth2 😄

Thank you so much for opening a pull request!

Image
You can check out your contributor card and see all your past stats here!

@hsheth2 hsheth2 marked this pull request as ready for review November 1, 2024 04:49
for _, query_instances in queries_deduped.items():
for query in query_instances.values():
if i > 0 and i % 10000 == 0:
now = datetime.now()
if (now - last_log_time).total_seconds() >= 60:
Copy link
Collaborator Author

@hsheth2 hsheth2 Nov 1, 2024

Choose a reason for hiding this comment

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

might be good to have a general abstraction for "do every X seconds", since the modulo stuff just feels like an approximation of that

e.g.

should_report = DoEvery(60)

for ...:
	if should_report.should():
		logger.info(...)

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.

1 participant