How to Encrypt Existing BigQuery Data at Rest with CMEK?
You have a BigQuery table that ingests data directly from a Pub/Sub subscription. The ingested data is encrypted with a Google-managed encryption key. You need to meet a new organization policy that requires you to use keys from a centralized Cloud Key Management Service (Cloud KMS) project to encrypt data at rest. What should you do?
Community Votes
58% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests the precise scope of data at rest encryption policies versus streaming data pipelines, with the common trap being the assumption that all components in the ingestion chain must be reconfigured.
Migrating BigQuery tables to Customer-Managed Encryption Keys (CMEK) requires provisioning a new table with CMEK and copying historical data. Community consensus emphasizes that since the organization policy explicitly targets data at rest, only the BigQuery storage component needs re-encryption, while the Pub/Sub ingestion pipeline remains unchanged.
Option D is the most frequent incorrect choice, as candidates incorrectly apply CMEK to the Pub/Sub topic, misunderstanding that Pub/Sub functions primarily as a streaming ingestion mechanism rather than a long-term data-at-rest store.
Community Discussion (21 comments)
- New BigQuery Table with CMEK: This option involves creating a new BigQuery table configured to use a CMEK from Cloud KMS. It directly addresses the need to use a CMEK for data at rest in BigQuery. - Migrate Data: Migrating data from the old table (encrypted with a Google-managed key) to the new table (encrypted with CMEK) ensures that all existing data complies with the new policy.
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Creating a new BigQuery table with CMEK and migrating existing data directly satisfies the organization requirement to encrypt data at rest using a centralized Cloud KMS key. BigQuery natively supports CMEK, and once the new table is configured, any future data ingested via the existing Pub/Sub subscription will automatically be stored with the new encryption key. Migration ensures compliance for historical records without disrupting the live ingestion pipeline.Why the Other Options Are Wrong
Option A unnecessarily introduces Dataflow, adding complexity when native BigQuery COPY or standard SQL migration tools suffice. Option C attempts to encrypt the Pub/Sub topic but leaves BigQuery unencrypted, failing the core requirement. Option D over-engineers the solution by applying CMEK to Pub/Sub, which is designed for real-time message streaming rather than persistent storage, making it redundant for this specific compliance mandate.Community Comment Notes
Several users correctly highlighted that Pub/Sub handles data in motion, not data at rest, making option B the most efficient path (Comments 6, 10). Others noted that while Pub/Sub does support CMEK, the prompt explicit focus on storage encryption points directly to BigQuery (Comment 7). The discussion reinforces that exam questions often test whether you can identify the exact resource bound by a compliance constraint.Official Reference
Exam Strategy
Always align your solution strictly with the compliance keywords in the prompt; data at rest targets persistent storage, while in transit or streaming would point to network or messaging layers. Resist the urge to over-engineer by modifying upstream services unless explicitly required by the scenario.