Using Console
Using CLI
<KEYRING_NAME>
with a name of your choice and <LOCATION>
with the location where you want to create the keyring.
4. Create a new key in the keyring by running the following command:<KEY_NAME>
with a name of your choice and <KEYRING_NAME>
and <LOCATION>
with the names you used in step 3.
5. Grant the BigQuery service account the necessary permissions to use the key by running the following command:<KEY_NAME>
, <KEYRING_NAME>
, <LOCATION>
, and <BIGQUERY_SERVICE_ACCOUNT_EMAIL>
with the appropriate values.
6. Update the BigQuery table to use the new key for encryption by running the following command:<KEY_NAME>
, <DATASET_NAME>
, and <TABLE_NAME>
with the appropriate values.
7. Verify that the BigQuery table is now encrypted by running the following command:Using Python
your_dataset_id
, your_project_id
, your_location
, your_key_ring
, and your_crypto_key
placeholders with the actual values.