Skip to content

Instantly share code, notes, and snippets.

@timpamungkasudemy
Last active August 23, 2020 03:30
Show Gist options
  • Save timpamungkasudemy/5f7c8765c2b73dda7b9974f06eeb1f1f to your computer and use it in GitHub Desktop.
Save timpamungkasudemy/5f7c8765c2b73dda7b9974f06eeb1f1f to your computer and use it in GitHub Desktop.

Set project id (do this before run the other)

gcloud config set project [project_id]


Show table schema as json, without saving it to file

bq show --schema --format=prettyjson [dataset_name].[table_name]


Export table schema to json file

bq show --schema --format=prettyjson [dataset_name].[table_name] > [file_name]


Show job status

bq show -j [job_id]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment