#[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
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BigQuerySource
impl Debug for BigQuerySource
Source§impl Default for BigQuerySource
impl Default for BigQuerySource
Source§fn default() -> BigQuerySource
fn default() -> BigQuerySource
Source§impl Message for BigQuerySource
impl Message for BigQuerySource
Source§impl PartialEq for BigQuerySource
impl PartialEq for BigQuerySource
impl StructuralPartialEq for BigQuerySource
Auto Trait Implementations§
impl Freeze for BigQuerySource
impl RefUnwindSafe for BigQuerySource
impl Send for BigQuerySource
impl Sync for BigQuerySource
impl Unpin for BigQuerySource
impl UnsafeUnpin for BigQuerySource
impl UnwindSafe for BigQuerySource
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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