You can apply access controls during dataset creation by calling the datasets.insert API method.
Access controls cannot be applied during dataset creation in the GCP Console, the classic BigQuery web UI, or the command-line tool.
To assign access controls to a dataset using the console:
-
Select a dataset from Resources, then click Share dataset near the right side of the window.
-
In the Share dataset panel, in the Dataset permissions tab, click Add members.
-
In the Add members panel, enter the entity you want to add into the New members text box. You can add any of the following entities:
-
Google account e-mail: Grants an individual Google account access to the dataset
-
Google Group: Grants all members of a Google group access to the dataset
-
Google Apps Domain: Grants all users and groups in a Google domain access to the dataset
-
Service account: Grants a service account access to the dataset
-
Anybody: Enter "allUsers" to grant access to the general public
-
All Google accounts: Enter "allAuthenticatedUsers" to grant access to any user signed in to a Google Account
-
For Select a role, select BigQuery and choose an appropriate pre-defined IAM role for the new members.
-
Click Done.