Class JobConfigurationQuery
JobConfigurationQuery configures a BigQuery query job.
Implements
Inherited Members
Namespace: Google.Apis.Bigquery.v2.Data
Assembly: Google.Apis.Bigquery.v2.dll
Syntax
public class JobConfigurationQuery : IDirectResponseSchema
Properties
AllowLargeResults
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.
Declaration
[JsonProperty("allowLargeResults")]
public virtual bool? AllowLargeResults { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Clustering
Clustering specification for the destination table.
Declaration
[JsonProperty("clustering")]
public virtual Clustering Clustering { get; set; }
Property Value
Type | Description |
---|---|
Clustering |
ConnectionProperties
Connection properties which can modify the query behavior.
Declaration
[JsonProperty("connectionProperties")]
public virtual IList<ConnectionProperty> ConnectionProperties { get; set; }
Property Value
Type | Description |
---|---|
IList<ConnectionProperty> |
Continuous
[Optional] Specifies whether the query should be executed as a continuous query. The default value is false.
Declaration
[JsonProperty("continuous")]
public virtual bool? Continuous { get; set; }
Property Value
Type | Description |
---|---|
bool? |
CreateDisposition
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.
Declaration
[JsonProperty("createDisposition")]
public virtual string CreateDisposition { get; set; }
Property Value
Type | Description |
---|---|
string |
CreateSession
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.
Declaration
[JsonProperty("createSession")]
public virtual bool? CreateSession { get; set; }
Property Value
Type | Description |
---|---|
bool? |
DefaultDataset
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.
Declaration
[JsonProperty("defaultDataset")]
public virtual DatasetReference DefaultDataset { get; set; }
Property Value
Type | Description |
---|---|
DatasetReference |
DestinationEncryptionConfiguration
Custom encryption configuration (e.g., Cloud KMS keys)
Declaration
[JsonProperty("destinationEncryptionConfiguration")]
public virtual EncryptionConfiguration DestinationEncryptionConfiguration { get; set; }
Property Value
Type | Description |
---|---|
EncryptionConfiguration |
DestinationTable
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.
Declaration
[JsonProperty("destinationTable")]
public virtual TableReference DestinationTable { get; set; }
Property Value
Type | Description |
---|---|
TableReference |
ETag
The ETag of the item.
Declaration
public virtual string ETag { get; set; }
Property Value
Type | Description |
---|---|
string |
FlattenResults
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.
Declaration
[JsonProperty("flattenResults")]
public virtual bool? FlattenResults { get; set; }
Property Value
Type | Description |
---|---|
bool? |
MaximumBillingTier
Optional. [Deprecated] Maximum billing tier allowed for this query. The billing tier controls the amount of compute resources allotted to the query, and multiplies the on-demand cost of the query accordingly. A query that runs within its allotted resources will succeed and indicate its billing tier in statistics.query.billingTier, but if the query exceeds its allotted resources, it will fail with billingTierLimitExceeded. WARNING: The billed byte amount can be multiplied by an amount up to this number! Most users should not need to alter this setting, and we recommend that you avoid introducing new uses of it.
Declaration
[JsonProperty("maximumBillingTier")]
public virtual int? MaximumBillingTier { get; set; }
Property Value
Type | Description |
---|---|
int? |
MaximumBytesBilled
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.
Declaration
[JsonProperty("maximumBytesBilled")]
public virtual long? MaximumBytesBilled { get; set; }
Property Value
Type | Description |
---|---|
long? |
ParameterMode
GoogleSQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use named (@myparam) query parameters in this query.
Declaration
[JsonProperty("parameterMode")]
public virtual string ParameterMode { get; set; }
Property Value
Type | Description |
---|---|
string |
PreserveNulls
[Deprecated] This property is deprecated.
Declaration
[JsonProperty("preserveNulls")]
public virtual bool? PreserveNulls { get; set; }
Property Value
Type | Description |
---|---|
bool? |
Priority
Optional. Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
Declaration
[JsonProperty("priority")]
public virtual string Priority { get; set; }
Property Value
Type | Description |
---|---|
string |
Query
[Required] SQL query text to execute. The useLegacySql field can be used to indicate whether the query uses legacy SQL or GoogleSQL.
Declaration
[JsonProperty("query")]
public virtual string Query { get; set; }
Property Value
Type | Description |
---|---|
string |
QueryParameters
Query parameters for GoogleSQL queries.
Declaration
[JsonProperty("queryParameters")]
public virtual IList<QueryParameter> QueryParameters { get; set; }
Property Value
Type | Description |
---|---|
IList<QueryParameter> |
RangePartitioning
Range partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
Declaration
[JsonProperty("rangePartitioning")]
public virtual RangePartitioning RangePartitioning { get; set; }
Property Value
Type | Description |
---|---|
RangePartitioning |
SchemaUpdateOptions
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.
Declaration
[JsonProperty("schemaUpdateOptions")]
public virtual IList<string> SchemaUpdateOptions { get; set; }
Property Value
Type | Description |
---|---|
IList<string> |
ScriptOptions
Options controlling the execution of scripts.
Declaration
[JsonProperty("scriptOptions")]
public virtual ScriptOptions ScriptOptions { get; set; }
Property Value
Type | Description |
---|---|
ScriptOptions |
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.
Declaration
[JsonProperty("systemVariables")]
public virtual SystemVariables SystemVariables { get; set; }
Property Value
Type | Description |
---|---|
SystemVariables |
TableDefinitions
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.
Declaration
[JsonProperty("tableDefinitions")]
public virtual IDictionary<string, ExternalDataConfiguration> TableDefinitions { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<string, ExternalDataConfiguration> |
TimePartitioning
Time-based partitioning specification for the destination table. Only one of timePartitioning and rangePartitioning should be specified.
Declaration
[JsonProperty("timePartitioning")]
public virtual TimePartitioning TimePartitioning { get; set; }
Property Value
Type | Description |
---|---|
TimePartitioning |
UseLegacySql
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.
Declaration
[JsonProperty("useLegacySql")]
public virtual bool? UseLegacySql { get; set; }
Property Value
Type | Description |
---|---|
bool? |
UseQueryCache
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.
Declaration
[JsonProperty("useQueryCache")]
public virtual bool? UseQueryCache { get; set; }
Property Value
Type | Description |
---|---|
bool? |
UserDefinedFunctionResources
Describes user-defined function resources used in the query.
Declaration
[JsonProperty("userDefinedFunctionResources")]
public virtual IList<UserDefinedFunctionResource> UserDefinedFunctionResources { get; set; }
Property Value
Type | Description |
---|---|
IList<UserDefinedFunctionResource> |
WriteDisposition
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.
Declaration
[JsonProperty("writeDisposition")]
public virtual string WriteDisposition { get; set; }
Property Value
Type | Description |
---|---|
string |