Adding Local File into Big Query

  • date 29th May, 2021 |
  • by Prwatech |
  • 0 Comments

Prerequisites

GCP account

Open Console.

Open Menu > Bigquery > SQL Workspace

In Resources, select your project.

Click on Create  Dataset

Give the name for Dataset. Rest of it no need to change.

Click Create Dataset.

The dataset will be created.

Download one file by pressing the below link.

https://storage.googleapis.com/cloud-training/OCBL013/nyc_tlc_yellow_trips_2018_subset_1.csv

In the created dataset, click create Table.

Choose the source as upload.

Click Browse and choose the downloaded file.

It will automatically detect the file format. If not, select it as CSV

Give the Project name and Dataset name. Usually it will be auto filled.

Give the table name.

Tick the Auto Detect Schema. Click Create table.

It will create the table with the downloaded file content.

Paste the below query in query editor.

SELECT

     *

FROM

     nyc_taxi.2018_trips

ORDER BY

     fare_amount DESC

LIMIT

     10

And Click run. It will give the output in query results.

 

0
0

Quick Support

image image