searain
searain

Reputation: 3301

Google BigQuery Share Dataset Access - how can I know who have been given the shared access to these datasets/tables

We can share individual dataset access, through this step.

https://cloud.google.com/bigquery/docs/dataset-access-controls

We can do this one by one. And we can even share the individual BigQuery table this way.

But how can I know who have been given the shared access to all these datasets/tables of my GCP project?

Instead of go to the each dataset and each table, check "share" link manually?

Thanks!

Upvotes: 0

Views: 761

Answers (2)

aemon4
aemon4

Reputation: 1112

I personally use a python function that shows that information for all datasets.

from google.cloud import bigquery
import os

client = bigquery.Client()
datasets = list(client.list_datasets())  
project = client.project
print("Datasets in project {}:".format(project))
for dataset in datasets:
    os.system('bq show --project_id {}  {}'.format(project,dataset.dataset_id))

Upvotes: 1

Lak
Lak

Reputation: 4166

You can do:

bq show --project_id PROJECT DATASET

Upvotes: 1

Related Questions