-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
When running the following code:
from google.cloud import bigquery
gbq_client = bigquery.Client(project='project-name')
dataset_ref = gbq_client.dataset(dataset_id='dataset1', project='project-name')
dataset = gbq_client.get_dataset(dataset_ref=dataset_ref)
print(len(dataset.access_entries))
the following error will happen about 25% of the time:
Traceback (most recent call last):
File "iam.py", line 5, in <module>
print(len(dataset.access_entries))
File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/dataset.py", line 376, in access_entries
return [AccessEntry.from_api_repr(entry) for entry in entries]
File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/dataset.py", line 376, in <listcomp>
return [AccessEntry.from_api_repr(entry) for entry in entries]
File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/dataset.py", line 183, in from_api_repr
return cls(role, entity_type, entity_id)
File "/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/dataset.py", line 115, in __init__
raise ValueError(message)
ValueError: Entity type 'iamMember' not among: domain, groupByEmail, specialGroup, userByEmail, view
It seems the Google API is returning a new 'iamMember' entity type that is not in the hard coded list of allowed entity types in dataset.py
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.