Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Architect practice bank has 2,335 more like it. Try 10 free: instant score, no account.
An organization ingests streaming telemetry data into a Google Cloud BigQuery dataset for real-time monitoring and reporting. The incoming records are stored in a table named telemetry_logs partitioned daily by ingestion timestamp.
The data architecture team establishes the following retention and operational requirements:
telemetry_logs table structure, schema, and current partition data must remain continuously available for analytical queries and streaming ingestion.Which statement should you execute to satisfy these requirements?
In several traditional relational and data warehousing systems (such as Oracle or Hive), an ALTER TABLE ... DROP PARTITION DDL statement is used to remove specific partition slices from a physical table layout.
ALTER TABLE ... DROP PARTITION DDL syntax. Attempting to execute this statement produces a syntax parsing error.DELETE statement (DELETE FROM ... WHERE _PARTITIONDATE < ...), it would require continuous maintenance, scheduled query orchestrators, and slot consumption, violating the requirement for declarative, automated lifecycle management.EXCHANGE PARTITION or DROP PARTITION.DELETE queries to clean partitions consumes query execution slots and creates redundant time-travel history metadata.BigQuery offered direct DDL partition dropping statements and the requirement demanded a one-time, ad-hoc purge rather than automated continuous rolling retention.
The max_time_travel_hours option on a BigQuery dataset schema defines the retention period for point-in-time recovery (time travel). Time travel allows users to query historic states of modified or deleted data and recover accidentally dropped tables.
max_time_travel_hours option strictly accepts values between 48 hours (2 days) and 168 hours (7 days) in multiples of 24. A value of 1440 hours (60 days) is rejected by BigQuery with a validation error.You needed to reduce the time travel window on a dataset from the default 7 days (168 hours) down to 2 days (48 hours) to reduce historical time-travel storage billing.
BigQuery partition expiration defines a time-to-live (TTL) for individual partitions within an ingestion-time or column-partitioned table. When partition expiration is configured, BigQuery automatically evaluates the age of each partition and deletes partitions whose age exceeds the specified threshold, without affecting the table schema or newer partitions.
partition_expiration_days = 60 ensures that any daily partition older than 60 days from its UTC date is automatically removed by BigQuery background processes.telemetry_logs table metadata, schema definition, permissions, and active partitions remain completely intact and available for ongoing streaming inserts and queries.ALTER TABLE ... SET OPTIONS applies the change directly to an existing table in standard GoogleSQL DDL without requiring scheduled queries, cloud functions, or pipeline orchestrators.DELETE operations.This approach natively achieves partition-level lifecycle management directly within BigQuery's storage engine, minimizing administrative overhead, avoiding query slot consumption for manual deletion queries, and preventing accidental destruction of the underlying table entity.
The expiration_timestamp option in BigQuery defines a table-level expiration (often referred to as table TTL). It instructs BigQuery to permanently delete the entire table entity, including all historical and current partitions, schema definitions, and metadata at that designated point in time.
telemetry_logs table to be dropped 60 days from execution.telemetry_logs will fail with object-not-found errors.The goal was to stage a temporary or intermediate working table that should be completely dropped after a 60-day testing or migration period.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated