pub struct Dataset {Show 30 fields
pub kind: String,
pub etag: String,
pub id: String,
pub self_link: String,
pub dataset_reference: Option<DatasetReference>,
pub friendly_name: Option<String>,
pub description: Option<String>,
pub default_table_expiration_ms: Option<i64>,
pub default_partition_expiration_ms: Option<i64>,
pub labels: BTreeMap<String, String>,
pub access: Vec<Access>,
pub creation_time: i64,
pub last_modified_time: i64,
pub location: String,
pub default_encryption_configuration: Option<EncryptionConfiguration>,
pub satisfies_pzs: Option<bool>,
pub satisfies_pzi: Option<bool>,
pub type: String,
pub linked_dataset_source: Option<LinkedDatasetSource>,
pub linked_dataset_metadata: Option<LinkedDatasetMetadata>,
pub external_dataset_reference: Option<ExternalDatasetReference>,
pub external_catalog_dataset_options: Option<ExternalCatalogDatasetOptions>,
pub is_case_insensitive: Option<bool>,
pub default_collation: Option<String>,
pub default_rounding_mode: i32,
pub max_time_travel_hours: Option<i64>,
pub tags: Vec<GcpTag>,
pub storage_billing_model: i32,
pub restrictions: Option<RestrictionConfig>,
pub resource_tags: BTreeMap<String, String>,
}
Expand description
Represents a BigQuery dataset.
Fields§
§kind: String
Output only. The resource type.
etag: String
Output only. A hash of the resource.
id: String
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.
self_link: String
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.
dataset_reference: Option<DatasetReference>
Required. A reference that identifies the dataset.
friendly_name: Option<String>
Optional. A descriptive name for the dataset.
description: Option<String>
Optional. A user-friendly description of the dataset.
default_table_expiration_ms: Option<i64>
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.
default_partition_expiration_ms: Option<i64>
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.
labels: BTreeMap<String, String>
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 for more information.
access: Vec<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.
creation_time: i64
Output only. The time when this dataset was created, in milliseconds since the epoch.
last_modified_time: i64
Output only. The date when this dataset was last modified, in milliseconds since the epoch.
location: String
The geographic location where the dataset should reside. See https://cloud.google.com/bigquery/docs/locations for supported locations.
default_encryption_configuration: Option<EncryptionConfiguration>
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.
satisfies_pzs: Option<bool>
Output only. Reserved for future use.
satisfies_pzi: Option<bool>
Output only. Reserved for future use.
type: String
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.
linked_dataset_source: Option<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.
linked_dataset_metadata: Option<LinkedDatasetMetadata>
Output only. Metadata about the LinkedDataset. Filled out when the dataset type is LINKED.
external_dataset_reference: Option<ExternalDatasetReference>
Optional. Reference to a read-only external dataset defined in data catalogs outside of BigQuery. Filled out when the dataset type is EXTERNAL.
external_catalog_dataset_options: Option<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.
is_case_insensitive: Option<bool>
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.
default_collation: Option<String>
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.
default_rounding_mode: i32
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.
max_time_travel_hours: Option<i64>
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.
Output only. Tags for the dataset. To provide tags as inputs, use the
resourceTags
field.
storage_billing_model: i32
Optional. Updates storage_billing_model for the dataset.
restrictions: Option<RestrictionConfig>
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 for more details.
Optional. The 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 for more details.
Implementations§
source§impl Dataset
impl Dataset
sourcepub fn storage_billing_model(&self) -> StorageBillingModel
pub fn storage_billing_model(&self) -> StorageBillingModel
Returns the enum value of storage_billing_model
, or the default if the field is set to an invalid enum value.
sourcepub fn set_storage_billing_model(&mut self, value: StorageBillingModel)
pub fn set_storage_billing_model(&mut self, value: StorageBillingModel)
Sets storage_billing_model
to the provided enum value.
sourcepub fn default_rounding_mode(&self) -> RoundingMode
pub fn default_rounding_mode(&self) -> RoundingMode
Returns the enum value of default_rounding_mode
, or the default if the field is set to an invalid enum value.
sourcepub fn set_default_rounding_mode(&mut self, value: RoundingMode)
pub fn set_default_rounding_mode(&mut self, value: RoundingMode)
Sets default_rounding_mode
to the provided enum value.
Trait Implementations§
source§impl Message for Dataset
impl Message for Dataset
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Dataset
impl PartialEq for Dataset
impl StructuralPartialEq for Dataset
Auto Trait Implementations§
impl Freeze for Dataset
impl RefUnwindSafe for Dataset
impl Send for Dataset
impl Sync for Dataset
impl Unpin for Dataset
impl UnwindSafe for Dataset
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request