Struct google_api_proto::google::cloud::bigquery::v2::HivePartitioningOptions
source · pub struct HivePartitioningOptions {
pub mode: String,
pub source_uri_prefix: String,
pub require_partition_filter: Option<bool>,
pub fields: Vec<String>,
}
Expand description
Options for configuring hive partitioning detect.
Fields§
§mode: String
Optional. When set, what mode of hive partitioning to use when reading data. The following modes are supported:
-
AUTO: automatically infer partition key name(s) and type(s).
-
STRINGS: automatically infer partition key name(s). All types are strings.
-
CUSTOM: partition key schema is encoded in the source URI prefix.
Not all storage formats support hive partitioning. Requesting hive partitioning on an unsupported format will lead to an error. Currently supported formats are: JSON, CSV, ORC, Avro and Parquet.
source_uri_prefix: String
Optional. When hive partition detection is requested, a common prefix for all source uris must be required. The prefix must end immediately before the partition key encoding begins. For example, consider files following this data layout:
gs://bucket/path_to_table/dt=2019-06-01/country=USA/id=7/file.avro
gs://bucket/path_to_table/dt=2019-05-31/country=CA/id=3/file.avro
When hive partitioning is requested with either AUTO or STRINGS detection, the common prefix can be either of gs://bucket/path_to_table or gs://bucket/path_to_table/.
CUSTOM detection requires encoding the partitioning schema immediately after the common prefix. For CUSTOM, any of
-
gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:INTEGER}
-
gs://bucket/path_to_table/{dt:STRING}/{country:STRING}/{id:INTEGER}
-
gs://bucket/path_to_table/{dt:DATE}/{country:STRING}/{id:STRING}
would all be valid source URI prefixes.
require_partition_filter: Option<bool>
Optional. If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
Note that this field should only be true when creating a permanent external table or querying a temporary external table.
Hive-partitioned loads with require_partition_filter explicitly set to true will fail.
fields: Vec<String>
Output only. For permanent external tables, this field is populated with the hive partition keys in the order they were inferred. The types of the partition keys can be deduced by checking the table schema (which will include the partition keys). Not every API will populate this field in the output. For example, Tables.Get will populate it, but Tables.List will not contain this field.
Trait Implementations§
source§impl Clone for HivePartitioningOptions
impl Clone for HivePartitioningOptions
source§fn clone(&self) -> HivePartitioningOptions
fn clone(&self) -> HivePartitioningOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HivePartitioningOptions
impl Debug for HivePartitioningOptions
source§impl Default for HivePartitioningOptions
impl Default for HivePartitioningOptions
source§impl Message for HivePartitioningOptions
impl Message for HivePartitioningOptions
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for HivePartitioningOptions
impl PartialEq for HivePartitioningOptions
source§fn eq(&self, other: &HivePartitioningOptions) -> bool
fn eq(&self, other: &HivePartitioningOptions) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for HivePartitioningOptions
Auto Trait Implementations§
impl Freeze for HivePartitioningOptions
impl RefUnwindSafe for HivePartitioningOptions
impl Send for HivePartitioningOptions
impl Sync for HivePartitioningOptions
impl Unpin for HivePartitioningOptions
impl UnwindSafe for HivePartitioningOptions
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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