#[non_exhaustive]pub struct Relation {Show 18 fields
pub dependency_targets: Vec<Target>,
pub disabled: bool,
pub tags: Vec<String>,
pub relation_descriptor: Option<RelationDescriptor>,
pub relation_type: RelationType,
pub select_query: String,
pub pre_operations: Vec<String>,
pub post_operations: Vec<String>,
pub incremental_table_config: Option<IncrementalTableConfig>,
pub partition_expression: String,
pub cluster_expressions: Vec<String>,
pub partition_expiration_days: i32,
pub require_partition_filter: bool,
pub additional_options: HashMap<String, String>,
pub connection: String,
pub table_format: TableFormat,
pub file_format: FileFormat,
pub storage_uri: String,
/* private fields */
}Expand description
Represents a database relation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dependency_targets: Vec<Target>A list of actions that this action depends on.
disabled: boolWhether this action is disabled (i.e. should not be run).
Arbitrary, user-defined tags on this action.
relation_descriptor: Option<RelationDescriptor>Descriptor for the relation and its columns.
relation_type: RelationTypeThe type of this relation.
select_query: StringThe SELECT query which returns rows which this relation should contain.
pre_operations: Vec<String>SQL statements to be executed before creating the relation.
post_operations: Vec<String>SQL statements to be executed after creating the relation.
incremental_table_config: Option<IncrementalTableConfig>Configures INCREMENTAL_TABLE settings for this relation. Only set if
relation_type is INCREMENTAL_TABLE.
partition_expression: StringThe SQL expression used to partition the relation.
cluster_expressions: Vec<String>A list of columns or SQL expressions used to cluster the table.
partition_expiration_days: i32Sets the partition expiration in days.
require_partition_filter: boolSpecifies whether queries on this table must include a predicate filter that filters on the partitioning column.
additional_options: HashMap<String, String>Additional options that will be provided as key/value pairs into the options clause of a create table/view statement. See https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language for more information on which options are supported.
connection: StringOptional. The connection specifying the credentials to be used to read
and write to external storage, such as Cloud Storage. The connection can
have the form {project}.{location}.{connection_id} or
projects/{project}/locations/{location}/connections/{connection_id},
or be set to DEFAULT.
table_format: TableFormatOptional. The table format for the BigQuery table.
file_format: FileFormatOptional. The file format for the BigQuery table.
storage_uri: StringOptional. The fully qualified location prefix of the external folder
where table data is stored. The URI should be in the format
gs://bucket/path_to_table/.
Implementations§
Source§impl Relation
impl Relation
pub fn new() -> Self
Sourcepub fn set_dependency_targets<T, V>(self, v: T) -> Self
pub fn set_dependency_targets<T, V>(self, v: T) -> Self
Sets the value of dependency_targets.
§Example
use google_cloud_dataform_v1::model::Target;
let x = Relation::new()
.set_dependency_targets([
Target::default()/* use setters */,
Target::default()/* use (different) setters */,
]);Sourcepub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_relation_descriptor<T>(self, v: T) -> Selfwhere
T: Into<RelationDescriptor>,
pub fn set_relation_descriptor<T>(self, v: T) -> Selfwhere
T: Into<RelationDescriptor>,
Sets the value of relation_descriptor.
§Example
use google_cloud_dataform_v1::model::RelationDescriptor;
let x = Relation::new().set_relation_descriptor(RelationDescriptor::default()/* use setters */);Sourcepub fn set_or_clear_relation_descriptor<T>(self, v: Option<T>) -> Selfwhere
T: Into<RelationDescriptor>,
pub fn set_or_clear_relation_descriptor<T>(self, v: Option<T>) -> Selfwhere
T: Into<RelationDescriptor>,
Sets or clears the value of relation_descriptor.
§Example
use google_cloud_dataform_v1::model::RelationDescriptor;
let x = Relation::new().set_or_clear_relation_descriptor(Some(RelationDescriptor::default()/* use setters */));
let x = Relation::new().set_or_clear_relation_descriptor(None::<RelationDescriptor>);Sourcepub fn set_relation_type<T: Into<RelationType>>(self, v: T) -> Self
pub fn set_relation_type<T: Into<RelationType>>(self, v: T) -> Self
Sets the value of relation_type.
§Example
use google_cloud_dataform_v1::model::compilation_result_action::relation::RelationType;
let x0 = Relation::new().set_relation_type(RelationType::Table);
let x1 = Relation::new().set_relation_type(RelationType::View);
let x2 = Relation::new().set_relation_type(RelationType::IncrementalTable);Sourcepub fn set_select_query<T: Into<String>>(self, v: T) -> Self
pub fn set_select_query<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_pre_operations<T, V>(self, v: T) -> Self
pub fn set_pre_operations<T, V>(self, v: T) -> Self
Sets the value of pre_operations.
§Example
let x = Relation::new().set_pre_operations(["a", "b", "c"]);Sourcepub fn set_post_operations<T, V>(self, v: T) -> Self
pub fn set_post_operations<T, V>(self, v: T) -> Self
Sets the value of post_operations.
§Example
let x = Relation::new().set_post_operations(["a", "b", "c"]);Sourcepub fn set_incremental_table_config<T>(self, v: T) -> Selfwhere
T: Into<IncrementalTableConfig>,
pub fn set_incremental_table_config<T>(self, v: T) -> Selfwhere
T: Into<IncrementalTableConfig>,
Sets the value of incremental_table_config.
§Example
use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
let x = Relation::new().set_incremental_table_config(IncrementalTableConfig::default()/* use setters */);Sourcepub fn set_or_clear_incremental_table_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<IncrementalTableConfig>,
pub fn set_or_clear_incremental_table_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<IncrementalTableConfig>,
Sets or clears the value of incremental_table_config.
§Example
use google_cloud_dataform_v1::model::compilation_result_action::relation::IncrementalTableConfig;
let x = Relation::new().set_or_clear_incremental_table_config(Some(IncrementalTableConfig::default()/* use setters */));
let x = Relation::new().set_or_clear_incremental_table_config(None::<IncrementalTableConfig>);Sourcepub fn set_partition_expression<T: Into<String>>(self, v: T) -> Self
pub fn set_partition_expression<T: Into<String>>(self, v: T) -> Self
Sets the value of partition_expression.
§Example
let x = Relation::new().set_partition_expression("example");Sourcepub fn set_cluster_expressions<T, V>(self, v: T) -> Self
pub fn set_cluster_expressions<T, V>(self, v: T) -> Self
Sets the value of cluster_expressions.
§Example
let x = Relation::new().set_cluster_expressions(["a", "b", "c"]);Sourcepub fn set_partition_expiration_days<T: Into<i32>>(self, v: T) -> Self
pub fn set_partition_expiration_days<T: Into<i32>>(self, v: T) -> Self
Sets the value of partition_expiration_days.
§Example
let x = Relation::new().set_partition_expiration_days(42);Sourcepub fn set_require_partition_filter<T: Into<bool>>(self, v: T) -> Self
pub fn set_require_partition_filter<T: Into<bool>>(self, v: T) -> Self
Sets the value of require_partition_filter.
§Example
let x = Relation::new().set_require_partition_filter(true);Sourcepub fn set_additional_options<T, K, V>(self, v: T) -> Self
pub fn set_additional_options<T, K, V>(self, v: T) -> Self
Sets the value of additional_options.
§Example
let x = Relation::new().set_additional_options([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_connection<T: Into<String>>(self, v: T) -> Self
pub fn set_connection<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_table_format<T: Into<TableFormat>>(self, v: T) -> Self
pub fn set_table_format<T: Into<TableFormat>>(self, v: T) -> Self
Sets the value of table_format.
§Example
use google_cloud_dataform_v1::model::compilation_result_action::relation::TableFormat;
let x0 = Relation::new().set_table_format(TableFormat::Iceberg);Sourcepub fn set_file_format<T: Into<FileFormat>>(self, v: T) -> Self
pub fn set_file_format<T: Into<FileFormat>>(self, v: T) -> Self
Sets the value of file_format.
§Example
use google_cloud_dataform_v1::model::compilation_result_action::relation::FileFormat;
let x0 = Relation::new().set_file_format(FileFormat::Parquet);