pub struct JobConfigurationQuery {
Show 25 fields pub query: String, pub destination_table: Option<TableReference>, pub external_table_definitions: BTreeMap<String, ExternalDataConfiguration>, pub user_defined_function_resources: Vec<UserDefinedFunctionResource>, pub create_disposition: String, pub write_disposition: String, pub default_dataset: Option<DatasetReference>, pub priority: String, pub allow_large_results: Option<bool>, pub use_query_cache: Option<bool>, pub flatten_results: Option<bool>, pub maximum_bytes_billed: Option<i64>, pub use_legacy_sql: Option<bool>, pub parameter_mode: String, pub query_parameters: Vec<QueryParameter>, pub system_variables: Option<SystemVariables>, pub schema_update_options: Vec<String>, pub time_partitioning: Option<TimePartitioning>, pub range_partitioning: Option<RangePartitioning>, pub clustering: Option<Clustering>, pub destination_encryption_configuration: Option<EncryptionConfiguration>, pub script_options: Option<ScriptOptions>, pub connection_properties: Vec<ConnectionProperty>, pub create_session: Option<bool>, pub continuous: Option<bool>,
}
Expand description

JobConfigurationQuery configures a BigQuery query job.

Fields§

§query: String

[Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or GoogleSQL.

§destination_table: Option<TableReference>

Optional. Describes the table where the query results should be stored. This property must be set for large results that exceed the maximum response size. For queries that produce anonymous (cached) results, this field will be populated by BigQuery.

§external_table_definitions: BTreeMap<String, ExternalDataConfiguration>

Optional. You can specify external table definitions, which operate as ephemeral tables that can be queried. These definitions are configured using a JSON map, where the string key represents the table identifier, and the value is the corresponding external data configuration object.

§user_defined_function_resources: Vec<UserDefinedFunctionResource>

Describes user-defined function resources used in the query.

§create_disposition: String

Optional. Specifies whether the job is allowed to create new tables. The following values are supported:

  • CREATE_IF_NEEDED: If the table does not exist, BigQuery creates the table.
  • CREATE_NEVER: The table must already exist. If it does not, a ‘notFound’ error is returned in the job result.

The default value is CREATE_IF_NEEDED. Creation, truncation and append actions occur as one atomic update upon job completion.

§write_disposition: String

Optional. Specifies the action that occurs if the destination table already exists. The following values are supported:

  • WRITE_TRUNCATE: If the table already exists, BigQuery overwrites the data, removes the constraints, and uses the schema from the query result.
  • WRITE_APPEND: If the table already exists, BigQuery appends the data to the table.
  • WRITE_EMPTY: If the table already exists and contains data, a ‘duplicate’ error is returned in the job result.

The default value is WRITE_EMPTY. Each action is atomic and only occurs if BigQuery is able to complete the job successfully. Creation, truncation and append actions occur as one atomic update upon job completion.

§default_dataset: Option<DatasetReference>

Optional. Specifies the default dataset to use for unqualified table names in the query. This setting does not alter behavior of unqualified dataset names. Setting the system variable @@dataset_id achieves the same behavior. See https://cloud.google.com/bigquery/docs/reference/system-variables for more information on system variables.

§priority: String

Optional. Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.

§allow_large_results: Option<bool>

Optional. If true and query uses legacy SQL dialect, allows the query to produce arbitrarily large result tables at a slight cost in performance. Requires destinationTable to be set. For GoogleSQL queries, this flag is ignored and large results are always allowed. However, you must still set destinationTable when result size exceeds the allowed maximum response size.

§use_query_cache: Option<bool>

Optional. Whether to look for the result in the query cache. The query cache is a best-effort cache that will be flushed whenever tables in the query are modified. Moreover, the query cache is only available when a query does not have a destination table specified. The default value is true.

§flatten_results: Option<bool>

Optional. If true and query uses legacy SQL dialect, flattens all nested and repeated fields in the query results. allowLargeResults must be true if this is set to false. For GoogleSQL queries, this flag is ignored and results are never flattened.

§maximum_bytes_billed: Option<i64>

Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If unspecified, this will be set to your project default.

§use_legacy_sql: Option<bool>

Optional. Specifies whether to use BigQuery’s legacy SQL dialect for this query. The default value is true. If set to false, the query will use BigQuery’s GoogleSQL: https://cloud.google.com/bigquery/sql-reference/

When useLegacySql is set to false, the value of flattenResults is ignored; query will be run as if flattenResults is false.

§parameter_mode: String

GoogleSQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.

§query_parameters: Vec<QueryParameter>

Query parameters for GoogleSQL queries.

§system_variables: Option<SystemVariables>

Output only. System variables for GoogleSQL queries. A system variable is output if the variable is settable and its value differs from the system default. “@@” prefix is not included in the name of the System variables.

§schema_update_options: Vec<String>

Allows the schema of the destination table to be updated as a side effect of the query job. Schema update options are supported in two cases: when writeDisposition is WRITE_APPEND; when writeDisposition is WRITE_TRUNCATE and the destination table is a partition of a table, specified by partition decorators. For normal tables, WRITE_TRUNCATE will always overwrite the schema. One or more of the following values are specified:

  • ALLOW_FIELD_ADDITION: allow adding a nullable field to the schema.
  • ALLOW_FIELD_RELAXATION: allow relaxing a required field in the original schema to nullable.
§time_partitioning: Option<TimePartitioning>

Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.

§range_partitioning: Option<RangePartitioning>

Range partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.

§clustering: Option<Clustering>

Clustering specification for the destination table.

§destination_encryption_configuration: Option<EncryptionConfiguration>

Custom encryption configuration (e.g., Cloud KMS keys)

§script_options: Option<ScriptOptions>

Options controlling the execution of scripts.

§connection_properties: Vec<ConnectionProperty>

Connection properties which can modify the query behavior.

§create_session: Option<bool>

If this property is true, the job creates a new session using a randomly generated session_id. To continue using a created session with subsequent queries, pass the existing session identifier as a ConnectionProperty value. The session identifier is returned as part of the SessionInfo message within the query statistics.

The new session’s location will be set to Job.JobReference.location if it is present, otherwise it’s set to the default location based on existing routing logic.

§continuous: Option<bool>

Optional. Whether to run the query as continuous or a regular query. Continuous query is currently in experimental stage and not ready for general usage.

Trait Implementations§

source§

impl Clone for JobConfigurationQuery

source§

fn clone(&self) -> JobConfigurationQuery

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for JobConfigurationQuery

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for JobConfigurationQuery

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for JobConfigurationQuery

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for JobConfigurationQuery

source§

fn eq(&self, other: &JobConfigurationQuery) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for JobConfigurationQuery

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more