Adding BigQuery data through cloud shell

Prerequisites

GCP account

Open Cloud shell.

Paste the Below Code in Console.

bq load \

–source_format=CSV \

–autodetect \

–noreplace \

nyc_taxi.2018_trips \

gs://cloud-training/OCBL013/nyc_tlc_yellow_trips_2018_subset_1.csv

It will add the file into the Bigquery.

Open the Table and check the details.

Paste the below code.

CREATE TABLE

     nyc_taxi.january_trips AS

SELECT

     *

FROM

     nyc_taxi.2018_trips

WHERE

     EXTRACT(Month

     FROM

          pickup_datetime)=1;

Click Run.

 It will create a new table named January_trips.

It will create a new table named January_trips.

Popular Tags:

BigQuery bigquery console bigquery documentation BigQuery in Cloud BigQuery SQL bigquery tutorial GCP GCP BigQuery gcp certification gcp cloud console gcp course Google BigQuery Google Cloud google cloud certification google cloud console google cloud courses Google Cloud Platform google cloud platform tutorial google cloud training