Class Dataset (5.6.0)

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
NameDescription
bigQuery BigQuery
id string
options DatasetOptions

Properties

bigQuery

bigQuery: BigQuery;
Property Value
TypeDescription
BigQuery

getModelsStream

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

getRoutinesStream

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

getTablesStream

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

location

location?: string;
Property Value
TypeDescription
string

Methods

createQueryJob(options)

createQueryJob(options: string | Query): Promise<JobResponse>;
Parameter
NameDescription
options string | Query
Returns
TypeDescription
Promise<JobResponse>

createQueryJob(options, callback)

createQueryJob(options: string | Query, callback: JobCallback): void;
Parameters
NameDescription
options string | Query
callback JobCallback
Returns
TypeDescription
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
NameDescription
options Query | string

See for full documentation of this method.

Returns
TypeDescription
Duplex

{stream}

createRoutine(id, config)

createRoutine(id: string, config: RoutineMetadata): Promise<RoutineResponse>;
Parameters
NameDescription
id string
config RoutineMetadata
Returns
TypeDescription
Promise<RoutineResponse>

createRoutine(id, config, callback)

createRoutine(id: string, config: RoutineMetadata, callback: RoutineCallback): void;
Parameters
NameDescription
id string
config RoutineMetadata
callback RoutineCallback
Returns
TypeDescription
void

createTable(id, options)

createTable(id: string, options: TableMetadata): Promise<TableResponse>;
Parameters
NameDescription
id string
options TableMetadata
Returns
TypeDescription
Promise<TableResponse>

createTable(id, options, callback)

createTable(id: string, options: TableMetadata, callback: TableCallback): void;
Parameters
NameDescription
id string
options TableMetadata
callback TableCallback
Returns
TypeDescription
void

createTable(id, callback)

createTable(id: string, callback: TableCallback): void;
Parameters
NameDescription
id string
callback TableCallback
Returns
TypeDescription
void

delete(options)

delete(options?: DatasetDeleteOptions): Promise<[Metadata]>;
Parameter
NameDescription
options DatasetDeleteOptions
Returns
TypeDescription
Promise<[Metadata]>

delete(options, callback)

delete(options: DatasetDeleteOptions, callback: DeleteCallback): void;
Parameters
NameDescription
options DatasetDeleteOptions
callback DeleteCallback
Returns
TypeDescription
void

delete(callback)

delete(callback: DeleteCallback): void;
Parameter
NameDescription
callback DeleteCallback
Returns
TypeDescription
void

getModels(options)

getModels(options?: GetModelsOptions): Promise<GetModelsResponse>;
Parameter
NameDescription
options GetModelsOptions
Returns
TypeDescription
Promise<GetModelsResponse>

getModels(options, callback)

getModels(options: GetModelsOptions, callback: GetModelsCallback): void;
Parameters
NameDescription
options GetModelsOptions
callback GetModelsCallback
Returns
TypeDescription
void

getModels(callback)

getModels(callback: GetModelsCallback): void;
Parameter
NameDescription
callback GetModelsCallback
Returns
TypeDescription
void

getRoutines(options)

getRoutines(options?: GetRoutinesOptions): Promise<GetRoutinesResponse>;
Parameter
NameDescription
options GetRoutinesOptions
Returns
TypeDescription
Promise<GetRoutinesResponse>

getRoutines(options, callback)

getRoutines(options: GetRoutinesOptions, callback: GetRoutinesCallback): void;
Parameters
NameDescription
options GetRoutinesOptions
callback GetRoutinesCallback
Returns
TypeDescription
void

getRoutines(callback)

getRoutines(callback: GetRoutinesCallback): void;
Parameter
NameDescription
callback GetRoutinesCallback
Returns
TypeDescription
void

getTables(options)

getTables(options?: GetTablesOptions): Promise<GetTablesResponse>;
Parameter
NameDescription
options GetTablesOptions
Returns
TypeDescription
Promise<GetTablesResponse>

getTables(options, callback)

getTables(options: GetTablesOptions, callback: GetTablesCallback): void;
Parameters
NameDescription
options GetTablesOptions
callback GetTablesCallback
Returns
TypeDescription
void

getTables(callback)

getTables(callback: GetTablesCallback): void;
Parameter
NameDescription
callback GetTablesCallback
Returns
TypeDescription
void

model(id)

model(id: string): Model;

Create a Model object.

Parameter
NameDescription
id string

The ID of the model. {Model}

Returns
TypeDescription
Model

query(options)

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

Run a query scoped to your dataset.

See for full documentation of this method.

Parameter
NameDescription
options Query

See for full documentation of this method.

Returns
TypeDescription
Promise<QueryRowsResponse>

{Promise} See for full documentation of this method.

query(options, callback)

query(options: Query, callback: SimpleQueryRowsCallback): void;
Parameters
NameDescription
options Query
callback SimpleQueryRowsCallback
Returns
TypeDescription
void

routine(id)

routine(id: string): Routine;

Create a Routine object.

Parameter
NameDescription
id string

The ID of the routine.

Returns
TypeDescription
Routine

{Routine}

table(id, options)

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

Create a Table object.

Parameters
NameDescription
id string

The ID of the table.

options TableOptions

Table options.

Returns
TypeDescription
Table