Class Dataset (5.7.1)

Interact with your BigQuery dataset. Create a Dataset instance with or .

Inheritance

ServiceObject > Dataset

Package

@google-cloud/bigquery!

Constructors

(constructor)(bigQuery, id, options)

  constructor 
 ( 
 bigQuery 
 : 
  
 BigQuery 
 , 
  
 id 
 : 
  
 string 
 , 
  
 options 
 ?: 
  
 DatasetOptions 
 ); 
 

Constructs a new instance of the Dataset class

Parameters
Name Description
bigQuery BigQuery
id string
options DatasetOptions

Properties

bigQuery

  bigQuery 
 : 
  
 BigQuery 
 ; 
 
Property Value
Type Description
BigQuery

getModelsStream

  getModelsStream 
 : 
  
 ( 
 options 
 ?: 
  
 GetModelsOptions 
 ) 
  
 = 
>  
 ResourceStream<Model> 
 ; 
 
Property Value
Type Description
(options?: GetModelsOptions ) => ResourceStream < Model >

getRoutinesStream

  getRoutinesStream 
 : 
  
 ( 
 options 
 ?: 
  
 GetRoutinesOptions 
 ) 
  
 = 
>  
 ResourceStream<Routine> 
 ; 
 
Property Value
Type Description
(options?: GetRoutinesOptions ) => ResourceStream < Routine >

getTablesStream

  getTablesStream 
 : 
  
 ( 
 options 
 ?: 
  
 GetTablesOptions 
 ) 
  
 = 
>  
 ResourceStream<Table> 
 ; 
 
Property Value
Type Description
(options?: GetTablesOptions ) => ResourceStream < Table >

location

  location 
 ?: 
  
 string 
 ; 
 
Property Value
Type Description
string

Methods

createQueryJob(options)

  createQueryJob 
 ( 
 options 
 : 
  
 string 
  
 | 
  
 Query 
 ) 
 : 
  
 Promise<JobResponse> 
 ; 
 
Parameter
Name Description
options string | Query
Returns
Type Description
Promise < JobResponse >

createQueryJob(options, callback)

  createQueryJob 
 ( 
 options 
 : 
  
 string 
  
 | 
  
 Query 
 , 
  
 callback 
 : 
  
 JobCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
options string | Query
callback JobCallback
Returns
Type Description
void

createQueryStream(options)

  createQueryStream 
 ( 
 options 
 : 
  
 Query 
  
 | 
  
 string 
 ) 
 : 
  
 Duplex 
 ; 
 

Run a query scoped to your dataset as a readable object stream.

See for full documentation of this method.

Parameter
Name Description
options Query | string

See for full documentation of this method.

Returns
Type Description
Duplex

{stream}

createRoutine(id, config)

  createRoutine 
 ( 
 id 
 : 
  
 string 
 , 
  
 config 
 : 
  
 RoutineMetadata 
 ) 
 : 
  
 Promise<RoutineResponse> 
 ; 
 
Parameters
Name Description
id string
config RoutineMetadata
Returns
Type Description
Promise < RoutineResponse >

createRoutine(id, config, callback)

  createRoutine 
 ( 
 id 
 : 
  
 string 
 , 
  
 config 
 : 
  
 RoutineMetadata 
 , 
  
 callback 
 : 
  
 RoutineCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
id string
config RoutineMetadata
callback RoutineCallback
Returns
Type Description
void

createTable(id, options)

  createTable 
 ( 
 id 
 : 
  
 string 
 , 
  
 options 
 : 
  
 TableMetadata 
 ) 
 : 
  
 Promise<TableResponse> 
 ; 
 
Parameters
Name Description
id string
options TableMetadata
Returns
Type Description
Promise < TableResponse >

createTable(id, options, callback)

  createTable 
 ( 
 id 
 : 
  
 string 
 , 
  
 options 
 : 
  
 TableMetadata 
 , 
  
 callback 
 : 
  
 TableCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
id string
options TableMetadata
callback TableCallback
Returns
Type Description
void

createTable(id, callback)

  createTable 
 ( 
 id 
 : 
  
 string 
 , 
  
 callback 
 : 
  
 TableCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
id string
callback TableCallback
Returns
Type Description
void

delete(options)

  delete 
 ( 
 options 
 ?: 
  
 DatasetDeleteOptions 
 ) 
 : 
  
 Promise 
< [ 
 Metadata 
 ]>; 
 
Parameter
Name Description
options DatasetDeleteOptions
Returns
Type Description
Promise <[ Metadata ]>

delete(options, callback)

  delete 
 ( 
 options 
 : 
  
 DatasetDeleteOptions 
 , 
  
 callback 
 : 
  
 DeleteCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
options DatasetDeleteOptions
callback DeleteCallback
Returns
Type Description
void

delete(callback)

  delete 
 ( 
 callback 
 : 
  
 DeleteCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback DeleteCallback
Returns
Type Description
void

getModels(options)

  getModels 
 ( 
 options 
 ?: 
  
 GetModelsOptions 
 ) 
 : 
  
 Promise<GetModelsResponse> 
 ; 
 
Parameter
Name Description
options GetModelsOptions
Returns
Type Description
Promise < GetModelsResponse >

getModels(options, callback)

  getModels 
 ( 
 options 
 : 
  
 GetModelsOptions 
 , 
  
 callback 
 : 
  
 GetModelsCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
options GetModelsOptions
callback GetModelsCallback
Returns
Type Description
void

getModels(callback)

  getModels 
 ( 
 callback 
 : 
  
 GetModelsCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback GetModelsCallback
Returns
Type Description
void

getRoutines(options)

  getRoutines 
 ( 
 options 
 ?: 
  
 GetRoutinesOptions 
 ) 
 : 
  
 Promise<GetRoutinesResponse> 
 ; 
 
Parameter
Name Description
options GetRoutinesOptions
Returns
Type Description
Promise < GetRoutinesResponse >

getRoutines(options, callback)

  getRoutines 
 ( 
 options 
 : 
  
 GetRoutinesOptions 
 , 
  
 callback 
 : 
  
 GetRoutinesCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
options GetRoutinesOptions
callback GetRoutinesCallback
Returns
Type Description
void

getRoutines(callback)

  getRoutines 
 ( 
 callback 
 : 
  
 GetRoutinesCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback GetRoutinesCallback
Returns
Type Description
void

getTables(options)

  getTables 
 ( 
 options 
 ?: 
  
 GetTablesOptions 
 ) 
 : 
  
 Promise<GetTablesResponse> 
 ; 
 
Parameter
Name Description
options GetTablesOptions
Returns
Type Description
Promise < GetTablesResponse >

getTables(options, callback)

  getTables 
 ( 
 options 
 : 
  
 GetTablesOptions 
 , 
  
 callback 
 : 
  
 GetTablesCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
options GetTablesOptions
callback GetTablesCallback
Returns
Type Description
void

getTables(callback)

  getTables 
 ( 
 callback 
 : 
  
 GetTablesCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameter
Name Description
callback GetTablesCallback
Returns
Type Description
void

model(id)

  model 
 ( 
 id 
 : 
  
 string 
 ) 
 : 
  
 Model 
 ; 
 

Create a Model object.

Parameter
Name Description
id string

The ID of the model. {Model}

Returns
Type Description
Model

query(options)

  query 
 ( 
 options 
 : 
  
 Query 
 ) 
 : 
  
 Promise<QueryRowsResponse> 
 ; 
 

Run a query scoped to your dataset.

See for full documentation of this method.

Parameter
Name Description
options Query

See for full documentation of this method.

Returns
Type Description
Promise < QueryRowsResponse >

{Promise} See for full documentation of this method.

query(options, callback)

  query 
 ( 
 options 
 : 
  
 Query 
 , 
  
 callback 
 : 
  
 SimpleQueryRowsCallback 
 ) 
 : 
  
 void 
 ; 
 
Parameters
Name Description
options Query
callback SimpleQueryRowsCallback
Returns
Type Description
void

routine(id)

  routine 
 ( 
 id 
 : 
  
 string 
 ) 
 : 
  
 Routine 
 ; 
 

Create a Routine object.

Parameter
Name Description
id string

The ID of the routine.

Returns
Type Description
Routine

{Routine}

table(id, options)

  table 
 ( 
 id 
 : 
  
 string 
 , 
  
 options 
 ?: 
  
 TableOptions 
 ) 
 : 
  
 Table 
 ; 
 

Create a Table object.

Parameters
Name Description
id string

The ID of the table.

options TableOptions

Table options.

Returns
Type Description
Table
Design a Mobile Site
View Site in Mobile | Classic
Share by: