💾 Archived View for freeshell.de › tldr › bq.gmi captured on 2023-04-19 at 23:31:31. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
The bq command-line tool is a Python-based command-line tool for BigQuery.
bq query --nouse_legacy_sql 'SELECT COUNT(*) FROM {DATASET_NAME}.{TABLE_NAME}'
bq query --use_legacy_sql=false --parameter='ts_value:TIMESTAMP:2016-12-07 08:00:00' 'SELECT TIMESTAMP_ADD(@ts_value, INTERVAL 1 HOUR)'
bq mk --location=US {dataset_name}.{table_name}
bq ls --filter labels.{key}:{value} --max_results {integer} --format=prettyjson --project_id {project_id}
bq load --location={location} --source_format={CSV|JSON|PARQUET|AVRO} {dataset}.{table} {path_to_source}
bq cp {dataset}.{OLD_TABLE} {dataset}.{new_table}
bq help
Copyright © 2014—present the tldr-pages team and contributors.
This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).