Question 1
IntermediateData Management · Configure lifecycle management
A financial analytics firm is migrating its data warehouse to BigQuery. A critical requirement is that all new tables created within the finance_reports dataset must automatically enforce a 365-day data retention policy based on an ingestion-time partition. Any attempt to create a table without this specific partitioning and expiration setting should fail. Which bq command should be used to configure the dataset to meet this requirement?
Answer and explanation
Correct answer: D
To enforce that all new tables in a dataset require partitioning, you must set the --require_partition_filter flag to true when updating the dataset. The --default_table_expiration sets the lifetime for new tables (31536000 seconds = 365 days), and --time_partitioning_type DAY specifies ingestion-time partitioning. This command updates an existing dataset (bq update) with all the required enforcement settings. The other options either use the wrong command (mk for create instead of update), miss the --require_partition_filter flag, or use --default_partition_expiration which applies to partitions within a table, not the table itself.
