public class Dataset extends DatasetInfo
Objects of this class are immutable. Operations that modify the dataset like update(com.google.cloud.bigquery.BigQuery.DatasetOption...)
return a new object. To get a Dataset object with the most recent information use
reload(com.google.cloud.bigquery.BigQuery.DatasetOption...). Dataset adds a layer of service-related functionality over
DatasetInfo.
| Modifier and Type | Class and Description |
|---|---|
static class |
Dataset.Builder
A builder for
Dataset objects. |
| Modifier and Type | Method and Description |
|---|---|
BigQuery |
bigquery()
Returns the dataset's
BigQuery object used to issue requests. |
Table |
create(String table,
TableDefinition definition,
BigQuery.TableOption... options)
Creates a new table in this dataset.
|
boolean |
delete()
Deletes this dataset.
|
boolean |
equals(Object obj) |
boolean |
exists()
Checks if this dataset exists.
|
Table |
get(String table,
BigQuery.TableOption... options)
Returns the requested table in this dataset or
null if not found. |
int |
hashCode() |
Page<Table> |
list(BigQuery.TableListOption... options)
Returns the paginated list of tables in this dataset.
|
Dataset |
reload(BigQuery.DatasetOption... options)
Fetches current dataset's latest information.
|
Dataset.Builder |
toBuilder()
Returns a builder for the dataset object.
|
Dataset |
update(BigQuery.DatasetOption... options)
Updates the dataset's information with this dataset's information.
|
acl, builder, builder, builder, creationTime, datasetId, defaultTableLifetime, description, etag, friendlyName, generatedId, lastModified, location, selfLink, toStringpublic boolean exists()
true if this dataset exists, false otherwiseBigQueryException - upon failurepublic Dataset reload(BigQuery.DatasetOption... options)
null if the dataset does not
exist.options - dataset optionsDataset object with latest information or null if not foundBigQueryException - upon failurepublic Dataset update(BigQuery.DatasetOption... options)
Dataset object is returned.options - dataset optionsDataset object with updated informationBigQueryException - upon failurepublic boolean delete()
true if dataset was deleted, false if it was not foundBigQueryException - upon failurepublic Page<Table> list(BigQuery.TableListOption... options)
options - options for listing tablesBigQueryException - upon failurepublic Table get(String table, BigQuery.TableOption... options)
null if not found.table - user-defined id of the requested tableoptions - table optionsBigQueryException - upon failurepublic Table create(String table, TableDefinition definition, BigQuery.TableOption... options)
table - the table's user-defined iddefinition - the table's definitionoptions - options for table creationTable object for the created tableBigQueryException - upon failurepublic BigQuery bigquery()
BigQuery object used to issue requests.public Dataset.Builder toBuilder()
DatasetInfotoBuilder in class DatasetInfopublic final boolean equals(Object obj)
equals in class DatasetInfopublic final int hashCode()
hashCode in class DatasetInfoCopyright © 2016 Google. All rights reserved.