Skip to content

Latest commit

 

History

History
 
 

bigquery

Google Cloud Platform logo

Google BigQuery Node.js Samples

BigQuery is Google's fully managed, petabyte scale, low cost analytics data warehouse.

Table of Contents

Setup

  1. Read Prerequisites and How to run a sample first.

  2. Install dependencies:

     npm install
    

Samples

Create A Simple Application With the API

View the documentation or the source code.

Run the sample:

node getting_started

Calculate size of dataset

View the source code.

Run the sample:

Usage: node dataset_size <projectId> <datasetId>

Example:

node dataset_size bigquery-public-data hacker_news

Loading Data with a POST Request

View the documentation or the source code.

Run the sample:

Usage: node load_data_from_csv <path-to-file> <dataset-id> <table-name>

Example:

node load_data_from_csv resources/data.csv my-dataset my-table

Loading Data from Cloud Storage

View the documentation or the source code.

Run the sample:

Usage: node load_data_from_gcs <bucket-name> <filename> <dataset-id> <table-name>

Example:

node load_data_from_gcs my-bucket data.csv my-dataset my-table