Global

Methods

setLogFunction(logger)

Sets or disables the log function for all active BigQuery instances.

Parameters:
Name Type Description
logger

A log function that takes a message (such as console.log) or null to turn off logging.

Type Definitions

BigQueryOptions

Properties:
Name Type Attributes Description
projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option above is not necessary. NOTE: .pem and .p12 require you to specify the email option as well.

token string <optional>

An OAUTH access token. If provided, we will not manage fetching, re-using, and re-minting access tokens.

email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
promise Constructor <optional>

Custom promise module to use instead of native Promises.

scopes Array.<string> <optional>

Additional OAuth scopes to use in requests. For example, to access an external data source, you may need the https://www.googleapis.com/auth/drive.readonly scope.

CreateDatasetCallback(errnullable, dataset, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

dataset Dataset

The newly created dataset.

apiResponse object

The full API response.

CreateDatasetResponse

Properties:
Name Type Description
0 Dataset

The newly created dataset.

1 object

The full API response body.

CreateTableCallback(errnullable, table, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

table Table

The table.

apiResponse object

The full API response body.

CreateTableResponse

Properties:
Name Type Description
0 Table

The table.

1 object

The full API response body.

DatasetExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Indicates if the dataset exists.

DatasetExistsResponse

Properties:
Name Type Description
0 boolean

Indicates if the dataset exists.

DeleteJobCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

DeleteJobResponse

Properties:
Name Type Description
0 object

The full API response.

DeleteModelCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

DeleteRoutineCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

DeleteRoutineResponse

Properties:
Name Type Description
0 object

The full API response.

DeleteTableCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

DeleteTableResponse

Properties:
Name Type Description
0 object

The full API response.

GetDatasetCallback(errnullable, dataset, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

dataset Dataset

The dataset.

apiResponse object

The full API response body.

GetDatasetMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The dataset metadata.

apiResponse object

The full API response.

GetDatasetMetadataResponse

Properties:
Name Type Description
0 object

The dataset metadata.

1 object

The full API response.

GetDatasetResponse

Properties:
Name Type Description
0 Dataset

The dataset.

1 object

The full API response body.

GetJobCallback(errnullable, model, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

model Model

The job.

apiResponse object

The full API response body.

GetJobMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The job metadata.

apiResponse object

The full API response.

GetJobMetadataResponse

Properties:
Name Type Description
0 object

The job metadata.

1 object

The full API response.

GetJobResponse

Properties:
Name Type Description
0 Model

The job.

1 object

The full API response body.

GetModelCallback(errnullable, model, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

model Model

The model.

apiResponse object

The full API response body.

GetModelMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The model metadata.

apiResponse object

The full API response.

GetModelMetadataResponse

Properties:
Name Type Description
0 object

The model metadata.

1 object

The full API response.

GetModelResponse

Properties:
Name Type Description
0 Model

The model.

1 object

The full API response body.

GetRoutineCallback(errnullable, routine, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

routine Routine

The routine.

apiResponse object

The full API response body.

GetRoutineMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The routine metadata.

apiResponse object

The full API response.

GetRoutineMetadataResponse

Properties:
Name Type Description
0 object

The routine metadata.

1 object

The full API response.

GetRoutineResponse

Properties:
Name Type Description
0 Routine

The routine.

1 object

The full API response body.

GetTableCallback(errnullable, table, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

table Table

The table.

apiResponse object

The full API response body.

GetTableMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The table metadata.

apiResponse object

The full API response.

GetTableMetadataResponse

Properties:
Name Type Description
0 object

The table metadata.

1 object

The full API response.

GetTableResponse

Properties:
Name Type Description
0 Table

The table.

1 object

The full API response body.

JobExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Indicates if the job exists.

JobExistsResponse

Properties:
Name Type Description
0 boolean

Indicates if the job exists.

ManualQueryResultsCallback(errnullable, rows, nextQuerynullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

An error returned while making this request.

rows array

The results of the job.

nextQuery object <nullable>

A pre-made configuration object for your next request. This will be null if no additional results are available. If the query is not yet complete, you may get empty rows and non-null nextQuery that you should use for your next request.

apiResponse object

The full API response.

ModelExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Indicates if the model exists.

ModelExistsResponse

Properties:
Name Type Description
0 boolean

Indicates if the model exists.

QueryResultsCallback(errnullable, rows)

Parameters:
Name Type Attributes Description
err Error <nullable>

An error returned while making this request.

rows array

The results of the job.

RoutineExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Indicates if the routine exists.

RoutineExistsResponse

Properties:
Name Type Description
0 boolean

Indicates if the routine exists.

SetDatasetMetadataCallback(errnullable, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

apiResponse object

The full API response.

SetDatasetMetadataResponse

Properties:
Name Type Description
0 object

The full API response.

SetModelMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The model metadata.

apiResponse object

The full API response.

SetModelMetadataResponse

Properties:
Name Type Description
0 object

The model metadata.

1 object

The full API response.

SetRoutineMetadataCallback(errnullable, metadata, apiResponse)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

metadata object

The routine metadata.

apiResponse object

The full API response.

SetRoutineMetadataResponse

Properties:
Name Type Description
0 object

The routine metadata.

1 object

The full API response.

TableExistsCallback(errnullable, exists)

Parameters:
Name Type Attributes Description
err Error <nullable>

Request error, if any.

exists boolean

Indicates if the table exists.

TableExistsCallback

Properties:
Name Type Description
0 boolean

Indicates if the table exists.