#[non_exhaustive]pub struct BigQuerySource {
pub project_id: String,
pub dataset_id: String,
pub table_id: String,
pub gcs_staging_dir: String,
pub data_schema: String,
pub partition: Option<Partition>,
/* private fields */
}completion-service or document-service or user-event-service only.Expand description
BigQuery source import data from.
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.project_id: StringThe project ID or the project number that contains the BigQuery source. Has a length limit of 128 characters. If not specified, inherits the project ID from the parent request.
dataset_id: StringRequired. The BigQuery data set to copy the data from with a length limit of 1,024 characters.
table_id: StringRequired. The BigQuery table to copy the data from with a length limit of 1,024 characters.
gcs_staging_dir: StringIntermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.
data_schema: StringThe schema to use when parsing the data from the source.
Supported values for user event imports:
user_event(default): One UserEvent per row.
Supported values for document imports:
document(default): One Document format per row. Each document must have a valid Document.id and one of Document.json_data or Document.struct_data.custom: One custom data per row in arbitrary format that conforms to the defined Schema of the data store. This can only be used by the GENERIC Data Store vertical.
partition: Option<Partition>BigQuery table partition info. Leave this empty if the BigQuery table is not partitioned.
Implementations§
Source§impl BigQuerySource
impl BigQuerySource
pub fn new() -> Self
Sourcepub fn set_project_id<T: Into<String>>(self, v: T) -> Self
pub fn set_project_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_dataset_id<T: Into<String>>(self, v: T) -> Self
pub fn set_dataset_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_table_id<T: Into<String>>(self, v: T) -> Self
pub fn set_table_id<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_gcs_staging_dir<T: Into<String>>(self, v: T) -> Self
pub fn set_gcs_staging_dir<T: Into<String>>(self, v: T) -> Self
Sets the value of gcs_staging_dir.
§Example
let x = BigQuerySource::new().set_gcs_staging_dir("example");Sourcepub fn set_data_schema<T: Into<String>>(self, v: T) -> Self
pub fn set_data_schema<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_partition<T: Into<Option<Partition>>>(self, v: T) -> Self
pub fn set_partition<T: Into<Option<Partition>>>(self, v: T) -> Self
Sourcepub fn partition_date(&self) -> Option<&Box<Date>>
pub fn partition_date(&self) -> Option<&Box<Date>>
The value of partition
if it holds a PartitionDate, None if the field is not set or
holds a different branch.
Sourcepub fn set_partition_date<T: Into<Box<Date>>>(self, v: T) -> Self
pub fn set_partition_date<T: Into<Box<Date>>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for BigQuerySource
impl Clone for BigQuerySource
Source§fn clone(&self) -> BigQuerySource
fn clone(&self) -> BigQuerySource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more