When running the following code:
fromgoogle.cloudimportbigquerygbq_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 (mostrecentcalllast):
File"iam.py", line5, in<module>print(len(dataset.access_entries))
File"/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/dataset.py", line376, inaccess_entriesreturn [AccessEntry.from_api_repr(entry) forentryinentries]
File"/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/dataset.py", line376, in<listcomp>return [AccessEntry.from_api_repr(entry) forentryinentries]
File"/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/dataset.py", line183, infrom_api_reprreturncls(role, entity_type, entity_id)
File"/usr/local/lib/python3.7/site-packages/google/cloud/bigquery/dataset.py", line115, in__init__raiseValueError(message)
ValueError: Entitytype'iamMember'notamong: 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
When running the following code:
the following error will happen about 25% of the time:
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