#[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
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
Sets the value of partition.
Note that all the setters affecting partition are mutually
exclusive.
§Example
use google_cloud_type::model::Date;
let x = BigQuerySource::new().set_partition(Some(
google_cloud_discoveryengine_v1::model::big_query_source::Partition::PartitionDate(Date::default().into())));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