Send feedback
Class Dataset (5.7.1) Stay organized with collections
Save and categorize content based on your preferences.
Version 5.7.1 keyboard_arrow_down
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
Properties
bigQuery
Property Value
getModelsStream
getModelsStream
:
(
options
?:
GetModelsOptions
)
=
>
ResourceStream<Model>
;
Property Value
getRoutinesStream
getRoutinesStream
:
(
options
?:
GetRoutinesOptions
)
=
>
ResourceStream<Routine>
;
Property Value
getTablesStream
getTablesStream
:
(
options
?:
GetTablesOptions
)
=
>
ResourceStream<Table>
;
Property Value
location
Property Value
Methods
createQueryJob(options)
createQueryJob
(
options
:
string
|
Query
)
:
Promise<JobResponse>
;
Parameter Name
Description
options
string | Query
Returns
createQueryJob(options, callback)
createQueryJob
(
options
:
string
|
Query
,
callback
:
JobCallback
)
:
void
;
Parameters Name
Description
options
string | Query
callback
JobCallback
Returns
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
createRoutine(id, config)
createRoutine
(
id
:
string
,
config
:
RoutineMetadata
)
:
Promise<RoutineResponse>
;
Parameters
Returns
createRoutine(id, config, callback)
createRoutine
(
id
:
string
,
config
:
RoutineMetadata
,
callback
:
RoutineCallback
)
:
void
;
Parameters
Returns
createTable(id, options)
createTable
(
id
:
string
,
options
:
TableMetadata
)
:
Promise<TableResponse>
;
Parameters
Returns
createTable(id, options, callback)
createTable
(
id
:
string
,
options
:
TableMetadata
,
callback
:
TableCallback
)
:
void
;
Parameters
Returns
createTable(id, callback)
createTable
(
id
:
string
,
callback
:
TableCallback
)
:
void
;
Parameters
Returns
delete(options)
delete
(
options
?:
DatasetDeleteOptions
)
:
Promise
< [
Metadata
]>;
Parameter
Returns
delete(options, callback)
delete
(
options
:
DatasetDeleteOptions
,
callback
:
DeleteCallback
)
:
void
;
Parameters
Returns
delete(callback)
delete
(
callback
:
DeleteCallback
)
:
void
;
Parameter
Returns
getModels(options)
getModels
(
options
?:
GetModelsOptions
)
:
Promise<GetModelsResponse>
;
Parameter
Returns
getModels(options, callback)
getModels
(
options
:
GetModelsOptions
,
callback
:
GetModelsCallback
)
:
void
;
Parameters
Returns
getModels(callback)
getModels
(
callback
:
GetModelsCallback
)
:
void
;
Parameter
Returns
getRoutines(options)
getRoutines
(
options
?:
GetRoutinesOptions
)
:
Promise<GetRoutinesResponse>
;
Parameter
Returns
getRoutines(options, callback)
getRoutines
(
options
:
GetRoutinesOptions
,
callback
:
GetRoutinesCallback
)
:
void
;
Parameters
Returns
getRoutines(callback)
getRoutines
(
callback
:
GetRoutinesCallback
)
:
void
;
Parameter
Returns
getTables(options)
getTables
(
options
?:
GetTablesOptions
)
:
Promise<GetTablesResponse>
;
Parameter
Returns
getTables(options, callback)
getTables
(
options
:
GetTablesOptions
,
callback
:
GetTablesCallback
)
:
void
;
Parameters
Returns
getTables(callback)
getTables
(
callback
:
GetTablesCallback
)
:
void
;
Parameter
Returns
model(id)
model
(
id
:
string
)
:
Model
;
Parameter Name
Description
id
string
The ID of the model. {Model}
Returns
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
routine(id)
routine
(
id
:
string
)
:
Routine
;
Parameter Name
Description
id
string
The ID of the routine.
Returns
table(id, options)
table
(
id
:
string
,
options
?:
TableOptions
)
:
Table
;
Parameters Name
Description
id
string
The ID of the table.
options
TableOptions
Table options.
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,[]]