Skip to content

Latest commit

 

History

History
1726 lines (678 loc) · 43.1 KB

README.md

File metadata and controls

1726 lines (678 loc) · 43.1 KB

Google Cloud Platform logo

Open in Cloud Shell

Table of Contents

Before you begin

Before running the samples, make sure you've followed the steps outlined in Using the client library.

cd samples

npm install

cd ..

Samples

Add Column Load Append

View the source code.

Open in Cloud Shell

Usage:

node samples/addColumnLoadAppend.js


Add Column Query Append

View the source code.

Open in Cloud Shell

Usage:

node samples/addColumnQueryAppend.js


Add Empty Column

View the source code.

Open in Cloud Shell

Usage:

node samples/addEmptyColumn.js


Auth View Tutorial

View the source code.

Open in Cloud Shell

Usage:

node samples/authViewTutorial.js


Browse Table

View the source code.

Open in Cloud Shell

Usage:

node samples/browseTable.js


Cancel Job

View the source code.

Open in Cloud Shell

Usage:

node samples/cancelJob.js


Client JSON Credentials

View the source code.

Open in Cloud Shell

Usage:

node samples/clientJSONCredentials.js


Copy Table

View the source code.

Open in Cloud Shell

Usage:

node samples/copyTable.js


Copy Table Multiple Source

View the source code.

Open in Cloud Shell

Usage:

node samples/copyTableMultipleSource.js


Create Dataset

View the source code.

Open in Cloud Shell

Usage:

node samples/createDataset.js


Create Job

View the source code.

Open in Cloud Shell

Usage:

node samples/createJob.js


Create Model

Creates a model in a dataset.

View the source code.

Open in Cloud Shell

Usage:

node createModel.js <DATASET_ID> <MODEL_ID>


Create Routine

View the source code.

Open in Cloud Shell

Usage:

node samples/createRoutine.js


Create Routine DDL

View the source code.

Open in Cloud Shell

Usage:

node samples/createRoutineDDL.js


Create Table

View the source code.

Open in Cloud Shell

Usage:

node samples/createTable.js


Create Table Partitioned

View the source code.

Open in Cloud Shell

Usage:

node samples/createTablePartitioned.js


Create Table Range Partitioned

View the source code.

Open in Cloud Shell

Usage:

node samples/createTableRangePartitioned.js


Create View

View the source code.

Open in Cloud Shell

Usage:

node samples/createView.js


Ddl Create View

View the source code.

Open in Cloud Shell

Usage:

node samples/ddlCreateView.js


Delete Dataset

View the source code.

Open in Cloud Shell

Usage:

node samples/deleteDataset.js


Delete Label Dataset

Deletes a label on a dataset.

View the source code.

Open in Cloud Shell

Usage:

node deleteLabelDataset.js <DATASET_ID>


Delete Label Table

View the source code.

Open in Cloud Shell

Usage:

node samples/deleteLabelTable.js


Delete Model

View the source code.

Open in Cloud Shell

Usage:

node samples/deleteModel.js


Delete Routine

View the source code.

Open in Cloud Shell

Usage:

node samples/deleteRoutine.js


Delete Table

View the source code.

Open in Cloud Shell

Usage:

node samples/deleteTable.js


Extract Table Compressed

View the source code.

Open in Cloud Shell

Usage:

node samples/extractTableCompressed.js


Extract Table JSON

View the source code.

Open in Cloud Shell

Usage:

node samples/extractTableJSON.js


Extract Table To GCS

View the source code.

Open in Cloud Shell

Usage:

node samples/extractTableToGCS.js


Get Dataset

View the source code.

Open in Cloud Shell

Usage:

node samples/getDataset.js


Get Dataset Labels

Gets labels on a dataset.

View the source code.

Open in Cloud Shell

Usage:

node getDatasetLabels.js <DATASET_ID>


Get Job

View the source code.

Open in Cloud Shell

Usage:

node samples/getJob.js


BigQuery Get Model

Retrieves an existing model from a dataset.

View the source code.

Open in Cloud Shell

Usage:

node getModel.js <DATASET_ID> <MODEL_ID>


Get Routine

View the source code.

Open in Cloud Shell

Usage:

node samples/getRoutine.js


BigQuery Get Table

Retrieves an existing table from a dataset.

View the source code.

Open in Cloud Shell

Usage:

node getTable.js <DATASET_ID> <TABLE_ID>


Get Table Labels

Gets labels on a dataset.

View the source code.

Open in Cloud Shell

Usage:

node getTableLabels.js <DATASET_ID> <TABLE_ID>


Get View

View the source code.

Open in Cloud Shell

Usage:

node samples/getView.js


Insert Rows As Stream

View the source code.

Open in Cloud Shell

Usage:

node samples/insertRowsAsStream.js


Inserting Data Types

View the source code.

Open in Cloud Shell

Usage:

node samples/insertingDataTypes.js


BigQuery Label Dataset

Updates a label on a dataset.

View the source code.

Open in Cloud Shell

Usage:

node labelDataset.js <DATASET_ID>


Label Table

View the source code.

Open in Cloud Shell

Usage:

node samples/labelTable.js


List Datasets

View the source code.

Open in Cloud Shell

Usage:

node samples/listDatasets.js


List Datasets By Label

View the source code.

Open in Cloud Shell

Usage:

node samples/listDatasetsByLabel.js


List Jobs

View the source code.

Open in Cloud Shell

Usage:

node samples/listJobs.js


BigQuery List Models

Lists all existing models in the dataset.

View the source code.

Open in Cloud Shell

Usage:

node listModels.js <DATASET_ID>


BigQuery List Models Streaming

Lists all existing models in the dataset using streaming method.

View the source code.

Open in Cloud Shell

Usage:

node listModelsStreaming.js <DATASET_ID>


List Routines

View the source code.

Open in Cloud Shell

Usage:

node samples/listRoutines.js


List Tables

View the source code.

Open in Cloud Shell

Usage:

node samples/listTables.js


Load CSV From GCS

View the source code.

Open in Cloud Shell

Usage:

node samples/loadCSVFromGCS.js


Load CSV From GCS Autodetect

View the source code.

Open in Cloud Shell

Usage:

node samples/loadCSVFromGCSAutodetect.js


Load CSV From GCS Truncate

View the source code.

Open in Cloud Shell

Usage:

node samples/loadCSVFromGCSTruncate.js


Load JSON From GCS

View the source code.

Open in Cloud Shell

Usage:

node samples/loadJSONFromGCS.js


Load JSON From GCS Autodetect

View the source code.

Open in Cloud Shell

Usage:

node samples/loadJSONFromGCSAutodetect.js


Load JSON From GCS Truncate

View the source code.

Open in Cloud Shell

Usage:

node samples/loadJSONFromGCSTruncate.js


Load Local File

View the source code.

Open in Cloud Shell

Usage:

node samples/loadLocalFile.js


Load Orc From GCS Truncate

View the source code.

Open in Cloud Shell

Usage:

node samples/loadOrcFromGCSTruncate.js


Load Parquet From GCS Truncate

View the source code.

Open in Cloud Shell

Usage:

node samples/loadParquetFromGCSTruncate.js


Load Table GCS Avro

View the source code.

Open in Cloud Shell

Usage:

node samples/loadTableGCSAvro.js


Load Table GCS Avro Truncate

View the source code.

Open in Cloud Shell

Usage:

node samples/loadTableGCSAvroTruncate.js


Load Table GCSORC

View the source code.

Open in Cloud Shell

Usage:

node samples/loadTableGCSORC.js


Load Table GCS Parquet

View the source code.

Open in Cloud Shell

Usage:

node samples/loadTableGCSParquet.js


Load Table Partitioned

View the source code.

Open in Cloud Shell

Usage:

node samples/loadTablePartitioned.js


Nested Repeated Schema

View the source code.

Open in Cloud Shell

Usage:

node samples/nestedRepeatedSchema.js


Query

View the source code.

Open in Cloud Shell

Usage:

node samples/query.js


Query Batch

View the source code.

Open in Cloud Shell

Usage:

node samples/queryBatch.js


Query Destination Table

View the source code.

Open in Cloud Shell

Usage:

node samples/queryDestinationTable.js


Query Disable Cache

View the source code.

Open in Cloud Shell

Usage:

node samples/queryDisableCache.js


Query Dry Run

View the source code.

Open in Cloud Shell

Usage:

node samples/queryDryRun.js


Query External GCS Perm

View the source code.

Open in Cloud Shell

Usage:

node samples/queryExternalGCSPerm.js


Query Legacy

View the source code.

Open in Cloud Shell

Usage:

node samples/queryLegacy.js


Query Legacy Large Results

View the source code.

Open in Cloud Shell

Usage:

node samples/queryLegacyLargeResults.js


Query Pagination

View the source code.

Open in Cloud Shell

Usage:

node samples/queryPagination.js


Query Params Arrays

View the source code.

Open in Cloud Shell

Usage:

node samples/queryParamsArrays.js


Query Params Named

View the source code.

Open in Cloud Shell

Usage:

node samples/queryParamsNamed.js


Query Params Named Types

View the source code.

Open in Cloud Shell

Usage:

node samples/queryParamsNamedTypes.js


Query Params Positional

View the source code.

Open in Cloud Shell

Usage:

node samples/queryParamsPositional.js


Query Params Positional Types

View the source code.

Open in Cloud Shell

Usage:

node samples/queryParamsPositionalTypes.js


Query Params Structs

View the source code.

Open in Cloud Shell

Usage:

node samples/queryParamsStructs.js


Query Params Timestamps

View the source code.

Open in Cloud Shell

Usage:

node samples/queryParamsTimestamps.js


Query Stack Overflow

View the source code.

Open in Cloud Shell

Usage:

node samples/queryStackOverflow.js


Quickstart

View the source code.

Open in Cloud Shell

Usage:

node samples/quickstart.js


Relax Column

View the source code.

Open in Cloud Shell

Usage:

node samples/relaxColumn.js


Relax Column Load Append

View the source code.

Open in Cloud Shell

Usage:

node samples/relaxColumnLoadAppend.js


Relax Column Query Append

View the source code.

Open in Cloud Shell

Usage:

node samples/relaxColumnQueryAppend.js


Set User Agent

View the source code.

Open in Cloud Shell

Usage:

node samples/setUserAgent.js


Undelete Table

View the source code.

Open in Cloud Shell

Usage:

node samples/undeleteTable.js


Update Dataset Access

View the source code.

Open in Cloud Shell

Usage:

node samples/updateDatasetAccess.js


Update Dataset Description

View the source code.

Open in Cloud Shell

Usage:

node samples/updateDatasetDescription.js


Update Dataset Expiration

View the source code.

Open in Cloud Shell

Usage:

node samples/updateDatasetExpiration.js


BigQuery Update Model

Updates a model's metadata.

View the source code.

Open in Cloud Shell

Usage:

node updateModel.js <DATASET_ID> <MODEL_ID>


Update Routine

View the source code.

Open in Cloud Shell

Usage:

node samples/updateRoutine.js


Update Table Description

View the source code.

Open in Cloud Shell

Usage:

node samples/updateTableDescription.js


Update Table Expiration

View the source code.

Open in Cloud Shell

Usage:

node samples/updateTableExpiration.js


Update View Query

View the source code.

Open in Cloud Shell

Usage:

node samples/updateViewQuery.js