EldadT
EldadT

Reputation: 932

BigQuery Dataset/Table expiration by Policy

I'm trying to figure out if I can create multiple service accounts and for each service account create a different Policy (or even a generic policy). In this policy I want to set the default retention for a dataset/table. Only I (admin) can change the retention after table creation.

This is very important to control costs.

Did anyone managed to do this?

Upvotes: 0

Views: 8685

Answers (1)

juferafo
juferafo

Reputation: 556

In Google Cloud Platform (GCP) it is possible to create different service accounts with distinct roles. These roles give access to specific resources across different services. In addition to the already existing roles in Bigquery, GCP allows to set service accounts with customized roles.

To control costs, the Project Admin or BigQuery Admin can establish a particular expiration date for a dataset and grant access to other service accounts with restricted permissions like BigQuery Job User or BigQuery Data Viewer, for example. This way, all the tables included in the dataset will have a default expiration date (set by the administrator) that all the other service accounts could not modify.

Upvotes: 1

Related Questions