08 May 20 · npack · #Bigquery ·   Bookmark   ×

Export a BigQuery table's schema definition into JSON ?

You can retrieve the Bigquery Table definition as a JSON file by using the below command:

bq show --schema --format=prettyjson mydataset.mytable > /tmp/myschema.json


  • mydataset - Is the name of the Bigquery Dataset
  • mytable - Is the name of your Bigquery Table
  • myschema.json - is the resultant JSON file that contains the table definition


posted on 08 May 20

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds