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 - Setting partition id for profiling data and project_id fix #6558

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

treff7es
Copy link
Contributor

  • Setting partition id for profiling data
  • Don't list projects if project_id is set to eliminate the need for resourcemanager.projects.list permission

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

Don't list projects if project_id is set to eliminate the need for resourcemanager.projects.list permission
@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Nov 28, 2022
@github-actions
Copy link

Unit Test Results (metadata ingestion)

       8 files  ±0         8 suites  ±0   1h 1m 35s ⏱️ + 6m 1s
   764 tests ±0     761 ✔️ ±0  2 💤 ±0  1 ±0 
1 530 runs  ±0  1 524 ✔️ ±0  5 💤 ±0  1 ±0 

For more details on these failures, see this check.

Results for commit 00a4939. ± Comparison against base commit 278c38c.

@github-actions
Copy link

Unit Test Results (build & test)

621 tests  ±0   617 ✔️ ±0   16m 6s ⏱️ +27s
157 suites ±0       4 💤 ±0 
157 files   ±0       0 ±0 

Results for commit 00a4939. ± Comparison against base commit 278c38c.

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.

lgtm

as discussed, we should move to using AllowDenyPattern.is_fully_specified_allow_list and get_allowed_list so we can actually deprecate the project_id config

projects = BigQueryDataDictionary.get_projects(conn)
if len(projects) == 0:
logger.warning(
"Get projects didn't return any project. Maybe resourcemanager.projects.get permission is missing for the service account. You can assign predefined roles/bigquery.metadataViewer role to your service account."
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice!

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1- this is much more useful!

@treff7es treff7es merged commit 28a61bc into datahub-project:master Nov 28, 2022
@@ -186,6 +186,13 @@ def get_workunits(

request = cast(BigqueryProfilerRequest, request)
profile.sizeInBytes = request.table.size_in_bytes
# If table is partitioned we profile only one partition (if nothing set then the last one)
Copy link
Collaborator

Choose a reason for hiding this comment

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

thank you! very good comments..

cccs-Dustin pushed a commit to CybercentreCanada/datahub that referenced this pull request Feb 1, 2023
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.

None yet

3 participants