Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.12 KB

google-cloud-biqquery.md

File metadata and controls

44 lines (34 loc) · 1.12 KB

Big Query Console/API calls

Create Dataset

https://cloud.google.com/bigquery/docs/datasets

michael@cloudshell:~/bquery (biometric-ol)$ bq --location us-central1 mk --dataset biometric-ol:dataset1
Dataset 'biometric-ol:dataset1' successfully created.

Create table via json schema

https://cloud.google.com/bigquery/docs/tables

michael@cloudshell:~/bquery (biometric-ol)$ bq mk --table biometric-ol:dataset1.table1 sample-schema.json
Table 'biometric-ol:dataset1.table1' successfully created.

Screen Shot 2023-01-24 at 21 24 27

Populate table

Export schema from existing table

michael@cloudshell:~/bquery (biometric-ol)$ bq show --schema --format=prettyjson biometric-ol:dataset1.table1
[
  {
    "description": "quarter",
    "mode": "REQUIRED",
    "name": "qtr",
    "type": "STRING"
  },
  
  michael@cloudshell:~/bquery (biometric-ol)$ cat sample-schema.json
[
  {
    "name": "qtr",
    "type": "STRING",
    "mode": "REQUIRED",
    "description": "quarter"
  },