Class QueryOptions (2.2.0)

public sealed class QueryOptions : JobCreationOptions

Options for CreateQueryJob and ExecuteQuery operations.

Inheritance

Object > JobCreationOptions > QueryOptions

Namespace

Google.Cloud.BigQuery.V2

Assembly

Google.Cloud.BigQuery.V2.dll

Properties

AllowLargeResults

public bool? AllowLargeResults { get; set; }

If true, allows the query to produce arbitrarily large result sets at a slight cost in performance. DestinationTable must be set in order to use this option.

Property Value
TypeDescription
Nullable<Boolean>

CreateDisposition

public CreateDisposition? CreateDisposition { get; set; }

Specifies whether the operation is allowed to create new tables. If not set, this is effectively CreateIfNeeded.

Property Value
TypeDescription
Nullable<CreateDisposition>

DefaultDataset

public DatasetReference DefaultDataset { get; set; }

The default dataset to assume for any unqualified table names in the query. If this is not set, all table names must be fully qualified.

Property Value
TypeDescription
Google.Apis.Bigquery.v2.Data.DatasetReference

DestinationEncryptionConfiguration

public EncryptionConfiguration DestinationEncryptionConfiguration { get; set; }

The encryption configuratoin to apply to the destination table, if any.

Property Value
TypeDescription
Google.Apis.Bigquery.v2.Data.EncryptionConfiguration

DestinationSchemaUpdateOptions

public SchemaUpdateOption? DestinationSchemaUpdateOptions { get; set; }

Allows the schema of the DestinationTable to be updated as a side effect of the query job. Schema update options are supported in two cases: when WriteDisposition is WriteAppend; when WriteDisposition is WriteTruncate and the destination table is a partition of a table, specified by partition decorators. SchemaUpdateOption is marked with the FlagsAttribute so several flags can be specified.

Property Value
TypeDescription
Nullable<SchemaUpdateOption>

DestinationTable

public TableReference DestinationTable { get; set; }

A destination table to write the results into. If this is not specified, the results will be stored in a temporary table.

Property Value
TypeDescription
Google.Apis.Bigquery.v2.Data.TableReference

DryRun

public bool? DryRun { get; set; }

If set to true, don't actually run this job. A valid query will return a mostly empty response with some processing statistics, while an invalid query will return the same error it would if it wasn't a dry run. This option can be used to determine the schema of the query without running it. The resulting BigQueryJob has no job ID, so cannot be polled for completion, but the Resource contains all the information returned by the server.

Property Value
TypeDescription
Nullable<Boolean>

FlattenResults

public bool? FlattenResults { get; set; }

Flattens all nested and repeated fields in the query results. If not set, this is effectively true. If this is set to false, DestinationTable must be specified and AllowLargeResults must be set to true.

Property Value
TypeDescription
Nullable<Boolean>

MaximumBillingTier

public int? MaximumBillingTier { get; set; }

Limits the billing tier of the job. If the query uses resources beyond this tier, it will fail. If not set, this is effectively the project default.

Property Value
TypeDescription
Nullable<Int32>

MaximumBytesBilled

public long? MaximumBytesBilled { get; set; }

Limits the bytes billed for this job. Queries that will have bytes billed beyond this limit will fail (without incurring a charge). If not set, this is effectively the project default.

Property Value
TypeDescription
Nullable<Int64>

ParameterMode

public BigQueryParameterMode? ParameterMode { get; set; }

If set, determines whether parameters are named or positional. If not set, this will default to named parameters. When named parameters are used, all parameters must have a name. When positional parameters are used, parameters may still have names, but don't have to.

Property Value
TypeDescription
Nullable<BigQueryParameterMode>

Priority

public QueryPriority? Priority { get; set; }

The priority of the query.

Property Value
TypeDescription
Nullable<QueryPriority>

TimePartitioning

public TimePartitioning TimePartitioning { get; set; }

The time partitioning to apply, if any. See TimePartition to create instances of TimePartitioning.

Property Value
TypeDescription
Google.Apis.Bigquery.v2.Data.TimePartitioning

UseLegacySql

public bool? UseLegacySql { get; set; }

Set to true to use legacy SQL instead of standard SQL.

Property Value
TypeDescription
Nullable<Boolean>

UseQueryCache

public bool? UseQueryCache { get; set; }

Whether to look for the result in the query cache. If not set, this is effectively true.

Property Value
TypeDescription
Nullable<Boolean>

WriteDisposition

public WriteDisposition? WriteDisposition { get; set; }

Specifies the behavior if the destination table exists. If not set, this is effectively WriteIfEmpty.

Property Value
TypeDescription
Nullable<WriteDisposition>