samy
samy

Reputation: 37

BigQuery Table creation options

When we create a table under a particular dataset, we have 5 options like empty table , Google cloud storage and upload etc.My question is if it is a Cloud storage , where does this table gets created in BigQuery or Cloud storage ? as my intention is to dump the data in cloud storage and then load in to BigQuer. Same goes for empty table also as we explicitly define schema , I understand the table will reside in BQ. enter image description here I have load the data by below script:

bq load --source_format=CSV --skip_leading_rows=1 --autodetect --ignore_unknown_values \ commerce.balltoball gs://balltoballbucket/head_usa_names.csv

I suppose the balltoballbucket is referred to storage bucket where as commerce.balltoball is BigQuery refrence.

Apologies for newbie question. Thanks for your help.

Upvotes: 0

Views: 422

Answers (1)

Yun Zhang
Yun Zhang

Reputation: 5503

If your bq load works, then UI should work for you. The documentation is here: https://cloud.google.com/bigquery/docs/loading-data-cloud-storage-csv#loading_csv_data_into_a_table (then pick Console tab)

  • Select file from GCS bucket: gs://balltoballbucket/head_usa_names.csv
  • File Format: CSV
  • Dataset Name: commerce
  • Table Name: balltoball
  • Other options see on the page:

(Optional) Click Advanced options.

As to where the table is stored, if you pick Native table as Table type, it is stored inside BigQuery storage, and External table for letting the data stay on GCS and only read from GCS when there is a query hitting the table. enter image description here

Upvotes: 1

Related Questions