target.apidocs.com.google.api.services.bigquery.model.Dataset.html Maven / Gradle / Ivy
Dataset (BigQuery API v2-rev20240727-2.0.0)
com.google.api.services.bigquery.model
Class Dataset
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.bigquery.model.Dataset
-
public final class Dataset
extends com.google.api.client.json.GenericJson
Represents a BigQuery dataset.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the BigQuery API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
Nested Classes
Modifier and Type
Class and Description
static class
Dataset.Access
An object that defines dataset access for an entity.
static class
Dataset.Tags
A global tag managed by Resource Manager.
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
Dataset()
-
Method Summary
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAccess
public List<Dataset.Access> getAccess()
Optional. An array of objects that define dataset access for one or more entities. You can set
this property when inserting or updating a dataset in order to control who is allowed to access
the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the
following entities: access.specialGroup: projectReaders; access.role: READER;
access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners;
access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER; If you
patch a dataset, then this field is overwritten by the patched dataset's access field. To add
entities, you must supply the entire existing access array in addition to any new entities that
you want to add.
- Returns:
- value or
null
for none
-
setAccess
public Dataset setAccess(List<Dataset.Access> access)
Optional. An array of objects that define dataset access for one or more entities. You can set
this property when inserting or updating a dataset in order to control who is allowed to access
the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the
following entities: access.specialGroup: projectReaders; access.role: READER;
access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners;
access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER; If you
patch a dataset, then this field is overwritten by the patched dataset's access field. To add
entities, you must supply the entire existing access array in addition to any new entities that
you want to add.
- Parameters:
access
- access or null
for none
-
getCreationTime
public Long getCreationTime()
Output only. The time when this dataset was created, in milliseconds since the epoch.
- Returns:
- value or
null
for none
-
setCreationTime
public Dataset setCreationTime(Long creationTime)
Output only. The time when this dataset was created, in milliseconds since the epoch.
- Parameters:
creationTime
- creationTime or null
for none
-
getDatasetReference
public DatasetReference getDatasetReference()
Required. A reference that identifies the dataset.
- Returns:
- value or
null
for none
-
setDatasetReference
public Dataset setDatasetReference(DatasetReference datasetReference)
Required. A reference that identifies the dataset.
- Parameters:
datasetReference
- datasetReference or null
for none
-
getDefaultCollation
public String getDefaultCollation()
Optional. Defines the default collation specification of future tables created in the dataset.
If a table is created in this dataset without table-level default collation, then the table
inherits the dataset default collation, which is applied to the string fields that do not have
explicit collation specified. A change to this field affects only tables created afterwards,
and does not alter the existing tables. The following values are supported: * 'und:ci':
undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.
- Returns:
- value or
null
for none
-
setDefaultCollation
public Dataset setDefaultCollation(String defaultCollation)
Optional. Defines the default collation specification of future tables created in the dataset.
If a table is created in this dataset without table-level default collation, then the table
inherits the dataset default collation, which is applied to the string fields that do not have
explicit collation specified. A change to this field affects only tables created afterwards,
and does not alter the existing tables. The following values are supported: * 'und:ci':
undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior.
- Parameters:
defaultCollation
- defaultCollation or null
for none
-
getDefaultEncryptionConfiguration
public EncryptionConfiguration getDefaultEncryptionConfiguration()
The default encryption key for all tables in the dataset. After this property is set, the
encryption key of all newly-created tables in the dataset is set to this value unless the table
creation request or query explicitly overrides the key.
- Returns:
- value or
null
for none
-
setDefaultEncryptionConfiguration
public Dataset setDefaultEncryptionConfiguration(EncryptionConfiguration defaultEncryptionConfiguration)
The default encryption key for all tables in the dataset. After this property is set, the
encryption key of all newly-created tables in the dataset is set to this value unless the table
creation request or query explicitly overrides the key.
- Parameters:
defaultEncryptionConfiguration
- defaultEncryptionConfiguration or null
for none
-
getDefaultPartitionExpirationMs
public Long getDefaultPartitionExpirationMs()
This default partition expiration, expressed in milliseconds. When new time-partitioned tables
are created in a dataset where this property is set, the table will inherit this value,
propagated as the `TimePartitioning.expirationMs` property on the new table. If you set
`TimePartitioning.expirationMs` explicitly when creating a table, the
`defaultPartitionExpirationMs` of the containing dataset is ignored. When creating a
partitioned table, if `defaultPartitionExpirationMs` is set, the `defaultTableExpirationMs`
value is ignored and the table will not be inherit a table expiration deadline.
- Returns:
- value or
null
for none
-
setDefaultPartitionExpirationMs
public Dataset setDefaultPartitionExpirationMs(Long defaultPartitionExpirationMs)
This default partition expiration, expressed in milliseconds. When new time-partitioned tables
are created in a dataset where this property is set, the table will inherit this value,
propagated as the `TimePartitioning.expirationMs` property on the new table. If you set
`TimePartitioning.expirationMs` explicitly when creating a table, the
`defaultPartitionExpirationMs` of the containing dataset is ignored. When creating a
partitioned table, if `defaultPartitionExpirationMs` is set, the `defaultTableExpirationMs`
value is ignored and the table will not be inherit a table expiration deadline.
- Parameters:
defaultPartitionExpirationMs
- defaultPartitionExpirationMs or null
for none
-
getDefaultRoundingMode
public String getDefaultRoundingMode()
Optional. Defines the default rounding mode specification of new tables created within this
dataset. During table creation, if this field is specified, the table within this dataset will
inherit the default rounding mode of the dataset. Setting the default rounding mode on a table
overrides this option. Existing tables in the dataset are unaffected. If columns are defined
during that table creation, they will immediately inherit the table's default rounding mode,
unless otherwise specified.
- Returns:
- value or
null
for none
-
setDefaultRoundingMode
public Dataset setDefaultRoundingMode(String defaultRoundingMode)
Optional. Defines the default rounding mode specification of new tables created within this
dataset. During table creation, if this field is specified, the table within this dataset will
inherit the default rounding mode of the dataset. Setting the default rounding mode on a table
overrides this option. Existing tables in the dataset are unaffected. If columns are defined
during that table creation, they will immediately inherit the table's default rounding mode,
unless otherwise specified.
- Parameters:
defaultRoundingMode
- defaultRoundingMode or null
for none
-
getDefaultTableExpirationMs
public Long getDefaultTableExpirationMs()
Optional. The default lifetime of all tables in the dataset, in milliseconds. The minimum
lifetime value is 3600000 milliseconds (one hour). To clear an existing default expiration with
a PATCH request, set to 0. Once this property is set, all newly-created tables in the dataset
will have an expirationTime property set to the creation time plus the value in this property,
and changing the value will only affect new tables, not existing ones. When the expirationTime
for a given table is reached, that table will be deleted automatically. If a table's
expirationTime is modified or removed before the table expires, or if you provide an explicit
expirationTime when creating a table, that value takes precedence over the default expiration
time indicated by this property.
- Returns:
- value or
null
for none
-
setDefaultTableExpirationMs
public Dataset setDefaultTableExpirationMs(Long defaultTableExpirationMs)
Optional. The default lifetime of all tables in the dataset, in milliseconds. The minimum
lifetime value is 3600000 milliseconds (one hour). To clear an existing default expiration with
a PATCH request, set to 0. Once this property is set, all newly-created tables in the dataset
will have an expirationTime property set to the creation time plus the value in this property,
and changing the value will only affect new tables, not existing ones. When the expirationTime
for a given table is reached, that table will be deleted automatically. If a table's
expirationTime is modified or removed before the table expires, or if you provide an explicit
expirationTime when creating a table, that value takes precedence over the default expiration
time indicated by this property.
- Parameters:
defaultTableExpirationMs
- defaultTableExpirationMs or null
for none
-
getDescription
public String getDescription()
Optional. A user-friendly description of the dataset.
- Returns:
- value or
null
for none
-
setDescription
public Dataset setDescription(String description)
Optional. A user-friendly description of the dataset.
- Parameters:
description
- description or null
for none
-
getEtag
public String getEtag()
Output only. A hash of the resource.
- Returns:
- value or
null
for none
-
setEtag
public Dataset setEtag(String etag)
Output only. A hash of the resource.
- Parameters:
etag
- etag or null
for none
-
getExternalCatalogDatasetOptions
public ExternalCatalogDatasetOptions getExternalCatalogDatasetOptions()
Optional. Options defining open source compatible datasets living in the BigQuery catalog.
Contains metadata of open source database, schema or namespace represented by the current
dataset.
- Returns:
- value or
null
for none
-
setExternalCatalogDatasetOptions
public Dataset setExternalCatalogDatasetOptions(ExternalCatalogDatasetOptions externalCatalogDatasetOptions)
Optional. Options defining open source compatible datasets living in the BigQuery catalog.
Contains metadata of open source database, schema or namespace represented by the current
dataset.
- Parameters:
externalCatalogDatasetOptions
- externalCatalogDatasetOptions or null
for none
-
getExternalDatasetReference
public ExternalDatasetReference getExternalDatasetReference()
Optional. Reference to a read-only external dataset defined in data catalogs outside of
BigQuery. Filled out when the dataset type is EXTERNAL.
- Returns:
- value or
null
for none
-
setExternalDatasetReference
public Dataset setExternalDatasetReference(ExternalDatasetReference externalDatasetReference)
Optional. Reference to a read-only external dataset defined in data catalogs outside of
BigQuery. Filled out when the dataset type is EXTERNAL.
- Parameters:
externalDatasetReference
- externalDatasetReference or null
for none
-
getFriendlyName
public String getFriendlyName()
Optional. A descriptive name for the dataset.
- Returns:
- value or
null
for none
-
setFriendlyName
public Dataset setFriendlyName(String friendlyName)
Optional. A descriptive name for the dataset.
- Parameters:
friendlyName
- friendlyName or null
for none
-
getId
public String getId()
Output only. The fully-qualified unique name of the dataset in the format projectId:datasetId.
The dataset name without the project name is given in the datasetId field. When creating a new
dataset, leave this field blank, and instead specify the datasetId field.
- Returns:
- value or
null
for none
-
setId
public Dataset setId(String id)
Output only. The fully-qualified unique name of the dataset in the format projectId:datasetId.
The dataset name without the project name is given in the datasetId field. When creating a new
dataset, leave this field blank, and instead specify the datasetId field.
- Parameters:
id
- id or null
for none
-
getIsCaseInsensitive
public Boolean getIsCaseInsensitive()
Optional. TRUE if the dataset and its table names are case-insensitive, otherwise FALSE. By
default, this is FALSE, which means the dataset and its table names are case-sensitive. This
field does not affect routine references.
- Returns:
- value or
null
for none
-
setIsCaseInsensitive
public Dataset setIsCaseInsensitive(Boolean isCaseInsensitive)
Optional. TRUE if the dataset and its table names are case-insensitive, otherwise FALSE. By
default, this is FALSE, which means the dataset and its table names are case-sensitive. This
field does not affect routine references.
- Parameters:
isCaseInsensitive
- isCaseInsensitive or null
for none
-
getKind
public String getKind()
Output only. The resource type.
- Returns:
- value or
null
for none
-
setKind
public Dataset setKind(String kind)
Output only. The resource type.
- Parameters:
kind
- kind or null
for none
-
getLabels
public Map<String,String> getLabels()
The labels associated with this dataset. You can use these to organize and group your datasets.
You can set this property when inserting or updating a dataset. See [Creating and Updating
Dataset Labels](https://cloud.google.com/bigquery/docs/creating-managing-
labels#creating_and_updating_dataset_labels) for more information.
- Returns:
- value or
null
for none
-
setLabels
public Dataset setLabels(Map<String,String> labels)
The labels associated with this dataset. You can use these to organize and group your datasets.
You can set this property when inserting or updating a dataset. See [Creating and Updating
Dataset Labels](https://cloud.google.com/bigquery/docs/creating-managing-
labels#creating_and_updating_dataset_labels) for more information.
- Parameters:
labels
- labels or null
for none
-
getLastModifiedTime
public Long getLastModifiedTime()
Output only. The date when this dataset was last modified, in milliseconds since the epoch.
- Returns:
- value or
null
for none
-
setLastModifiedTime
public Dataset setLastModifiedTime(Long lastModifiedTime)
Output only. The date when this dataset was last modified, in milliseconds since the epoch.
- Parameters:
lastModifiedTime
- lastModifiedTime or null
for none
-
getLinkedDatasetMetadata
public LinkedDatasetMetadata getLinkedDatasetMetadata()
Output only. Metadata about the LinkedDataset. Filled out when the dataset type is LINKED.
- Returns:
- value or
null
for none
-
setLinkedDatasetMetadata
public Dataset setLinkedDatasetMetadata(LinkedDatasetMetadata linkedDatasetMetadata)
Output only. Metadata about the LinkedDataset. Filled out when the dataset type is LINKED.
- Parameters:
linkedDatasetMetadata
- linkedDatasetMetadata or null
for none
-
getLinkedDatasetSource
public LinkedDatasetSource getLinkedDatasetSource()
Optional. The source dataset reference when the dataset is of type LINKED. For all other
dataset types it is not set. This field cannot be updated once it is set. Any attempt to update
this field using Update and Patch API Operations will be ignored.
- Returns:
- value or
null
for none
-
setLinkedDatasetSource
public Dataset setLinkedDatasetSource(LinkedDatasetSource linkedDatasetSource)
Optional. The source dataset reference when the dataset is of type LINKED. For all other
dataset types it is not set. This field cannot be updated once it is set. Any attempt to update
this field using Update and Patch API Operations will be ignored.
- Parameters:
linkedDatasetSource
- linkedDatasetSource or null
for none
-
getLocation
public String getLocation()
The geographic location where the dataset should reside. See
https://cloud.google.com/bigquery/docs/locations for supported locations.
- Returns:
- value or
null
for none
-
setLocation
public Dataset setLocation(String location)
The geographic location where the dataset should reside. See
https://cloud.google.com/bigquery/docs/locations for supported locations.
- Parameters:
location
- location or null
for none
-
getMaxTimeTravelHours
public Long getMaxTimeTravelHours()
Optional. Defines the time travel window in hours. The value can be from 48 to 168 hours (2 to
7 days). The default value is 168 hours if this is not set.
- Returns:
- value or
null
for none
-
setMaxTimeTravelHours
public Dataset setMaxTimeTravelHours(Long maxTimeTravelHours)
Optional. Defines the time travel window in hours. The value can be from 48 to 168 hours (2 to
7 days). The default value is 168 hours if this is not set.
- Parameters:
maxTimeTravelHours
- maxTimeTravelHours or null
for none
-
getResourceTags
public Map<String,String> getResourceTags()
Optional. The [tags](/bigquery/docs/tags) attached to this dataset. Tag keys are globally
unique. Tag key is expected to be in the namespaced format, for example
"123456789012/environment" where 123456789012 is the ID of the parent organization or project
resource for this tag key. Tag value is expected to be the short name, for example
"Production". See [Tag definitions](/iam/docs/tags-access-control#definitions) for more
details.
- Returns:
- value or
null
for none
-
setResourceTags
public Dataset setResourceTags(Map<String,String> resourceTags)
Optional. The [tags](/bigquery/docs/tags) attached to this dataset. Tag keys are globally
unique. Tag key is expected to be in the namespaced format, for example
"123456789012/environment" where 123456789012 is the ID of the parent organization or project
resource for this tag key. Tag value is expected to be the short name, for example
"Production". See [Tag definitions](/iam/docs/tags-access-control#definitions) for more
details.
- Parameters:
resourceTags
- resourceTags or null
for none
-
getRestrictions
public RestrictionConfig getRestrictions()
Optional. Output only. Restriction config for all tables and dataset. If set, restrict certain
accesses on the dataset and all its tables based on the config. See [Data
egress](/bigquery/docs/analytics-hub-introduction#data_egress) for more details.
- Returns:
- value or
null
for none
-
setRestrictions
public Dataset setRestrictions(RestrictionConfig restrictions)
Optional. Output only. Restriction config for all tables and dataset. If set, restrict certain
accesses on the dataset and all its tables based on the config. See [Data
egress](/bigquery/docs/analytics-hub-introduction#data_egress) for more details.
- Parameters:
restrictions
- restrictions or null
for none
-
getSatisfiesPzi
public Boolean getSatisfiesPzi()
Output only. Reserved for future use.
- Returns:
- value or
null
for none
-
setSatisfiesPzi
public Dataset setSatisfiesPzi(Boolean satisfiesPzi)
Output only. Reserved for future use.
- Parameters:
satisfiesPzi
- satisfiesPzi or null
for none
-
getSatisfiesPzs
public Boolean getSatisfiesPzs()
Output only. Reserved for future use.
- Returns:
- value or
null
for none
-
setSatisfiesPzs
public Dataset setSatisfiesPzs(Boolean satisfiesPzs)
Output only. Reserved for future use.
- Parameters:
satisfiesPzs
- satisfiesPzs or null
for none
-
getSelfLink
public String getSelfLink()
Output only. A URL that can be used to access the resource again. You can use this URL in Get
or Update requests to the resource.
- Returns:
- value or
null
for none
-
setSelfLink
public Dataset setSelfLink(String selfLink)
Output only. A URL that can be used to access the resource again. You can use this URL in Get
or Update requests to the resource.
- Parameters:
selfLink
- selfLink or null
for none
-
getStorageBillingModel
public String getStorageBillingModel()
Optional. Updates storage_billing_model for the dataset.
- Returns:
- value or
null
for none
-
setStorageBillingModel
public Dataset setStorageBillingModel(String storageBillingModel)
Optional. Updates storage_billing_model for the dataset.
- Parameters:
storageBillingModel
- storageBillingModel or null
for none
-
getTags
public List<Dataset.Tags> getTags()
Output only. Tags for the dataset. To provide tags as inputs, use the `resourceTags` field.
- Returns:
- value or
null
for none
-
setTags
public Dataset setTags(List<Dataset.Tags> tags)
Output only. Tags for the dataset. To provide tags as inputs, use the `resourceTags` field.
- Parameters:
tags
- tags or null
for none
-
getType
public String getType()
Output only. Same as `type` in `ListFormatDataset`. The type of the dataset, one of: * DEFAULT
- only accessible by owner and authorized accounts, * PUBLIC - accessible by everyone, * LINKED
- linked dataset, * EXTERNAL - dataset with definition in external metadata catalog.
- Returns:
- value or
null
for none
-
setType
public Dataset setType(String type)
Output only. Same as `type` in `ListFormatDataset`. The type of the dataset, one of: * DEFAULT
- only accessible by owner and authorized accounts, * PUBLIC - accessible by everyone, * LINKED
- linked dataset, * EXTERNAL - dataset with definition in external metadata catalog.
- Parameters:
type
- type or null
for none
-
set
public Dataset set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public Dataset clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.