#[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 */
}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 (can be project # or ID) that the BigQuery source is in with 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 product imports:
product(default): One JSON Product per line. Each product must have a valid Product.id.product_merchant_center: See Importing catalog data from Merchant Center.
Supported values for user events imports:
user_event(default): One JSON UserEvent per line.user_event_ga360: The schema is available here: https://support.google.com/analytics/answer/3437719.user_event_ga4: The schema is available here: https://support.google.com/analytics/answer/7029846.
Supported values for autocomplete imports:
suggestions(default): One JSON completion suggestion per line.denylist: One JSON deny suggestion per line.allowlist: One JSON allow suggestion per line.
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