Search code examples
google-bigquerygoogle-cloud-composergoogle-cloud-iam

iam permission required to read table metadata from information schema


I am new in GCP and I came across one requirement. I want to compare DDLs of the table in dev and production environment but I don't have production access. I want to run below query's,

select table_name   FROM  `my-project`.my_prod_db.INFORMATION_SCHEMA.TABLES
select table_name   FROM  `my-project`.my_prod_db.INFORMATION_SCHEMA.COLUMNS

now I don't have any acess in prod db so not able to run these. I found that to run above queries I need to have bigquery.metadataViewer role but I also want to know is there any specific permission within this role which I can ask ? as getting prod access is very difficult and I just want permission to run above 2 queries. can any one help here to know the exact permission required to run above queries.


Solution

  • The required permissions are listed

    here for TABLES:

    bigquery.tables.get
    bigquery.tables.list
    bigquery.routines.get
    bigquery.routines.list

    and here for COLUMNS:

    bigquery.tables.get
    bigquery.tables.list