Skip to content

Instantly share code, notes, and snippets.

@allanbatista
Created October 30, 2018 17:59
Show Gist options
  • Select an option

  • Save allanbatista/e2230f02f0ae376d40e365cdc84abd37 to your computer and use it in GitHub Desktop.

Select an option

Save allanbatista/e2230f02f0ae376d40e365cdc84abd37 to your computer and use it in GitHub Desktop.
Create BigQuery table with time expirationa and custom field
bq mk \
--require_partition_filter \
--time_partitioning_type=DAY \
--time_partitioning_expiration=604800 \
--time_partitioning_field=bucket \
--schema=account_id:STRING,sku:STRING,variation_sku:STRING,action:STRING,promise:STRING,done:BOOLEAN,status:STRING,created_at:TIMESTAMP,bucket:DATE \
dataset_name.table_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment