target.apidocs.com.google.api.services.bigquery.model.JobConfigurationQuery.html Maven / Gradle / Ivy
JobConfigurationQuery (BigQuery API v2-rev20240727-2.0.0)
com.google.api.services.bigquery.model
Class JobConfigurationQuery
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.bigquery.model.JobConfigurationQuery
-
public final class JobConfigurationQuery
extends com.google.api.client.json.GenericJson
JobConfigurationQuery configures a BigQuery query job.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the BigQuery API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
JobConfigurationQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
JobConfigurationQuery
clone()
Boolean
getAllowLargeResults()
Optional.
Clustering
getClustering()
Clustering specification for the destination table.
List<ConnectionProperty>
getConnectionProperties()
Connection properties which can modify the query behavior.
Boolean
getContinuous()
[Optional] Specifies whether the query should be executed as a continuous query.
String
getCreateDisposition()
Optional.
Boolean
getCreateSession()
If this property is true, the job creates a new session using a randomly generated session_id.
DatasetReference
getDefaultDataset()
Optional.
EncryptionConfiguration
getDestinationEncryptionConfiguration()
Custom encryption configuration (e.g., Cloud KMS keys)
TableReference
getDestinationTable()
Optional.
Boolean
getFlattenResults()
Optional.
Integer
getMaximumBillingTier()
Optional.
Long
getMaximumBytesBilled()
Limits the bytes billed for this job.
String
getParameterMode()
GoogleSQL only.
Boolean
getPreserveNulls()
[Deprecated] This property is deprecated.
String
getPriority()
Optional.
String
getQuery()
[Required] SQL query text to execute.
List<QueryParameter>
getQueryParameters()
Query parameters for GoogleSQL queries.
RangePartitioning
getRangePartitioning()
Range partitioning specification for the destination table.
List<String>
getSchemaUpdateOptions()
Allows the schema of the destination table to be updated as a side effect of the query job.
ScriptOptions
getScriptOptions()
Options controlling the execution of scripts.
SystemVariables
getSystemVariables()
Output only.
Map<String,ExternalDataConfiguration>
getTableDefinitions()
Optional.
TimePartitioning
getTimePartitioning()
Time-based partitioning specification for the destination table.
Boolean
getUseLegacySql()
Optional.
Boolean
getUseQueryCache()
Optional.
List<UserDefinedFunctionResource>
getUserDefinedFunctionResources()
Describes user-defined function resources used in the query.
String
getWriteDisposition()
Optional.
boolean
isAllowLargeResults()
Convenience method that returns only Boolean.TRUE
or Boolean.FALSE
.
boolean
isFlattenResults()
Convenience method that returns only Boolean.TRUE
or Boolean.FALSE
.
boolean
isUseLegacySql()
Convenience method that returns only Boolean.TRUE
or Boolean.FALSE
.
boolean
isUseQueryCache()
Convenience method that returns only Boolean.TRUE
or Boolean.FALSE
.
JobConfigurationQuery
set(String fieldName,
Object value)
JobConfigurationQuery
setAllowLargeResults(Boolean allowLargeResults)
Optional.
JobConfigurationQuery
setClustering(Clustering clustering)
Clustering specification for the destination table.
JobConfigurationQuery
setConnectionProperties(List<ConnectionProperty> connectionProperties)
Connection properties which can modify the query behavior.
JobConfigurationQuery
setContinuous(Boolean continuous)
[Optional] Specifies whether the query should be executed as a continuous query.
JobConfigurationQuery
setCreateDisposition(String createDisposition)
Optional.
JobConfigurationQuery
setCreateSession(Boolean createSession)
If this property is true, the job creates a new session using a randomly generated session_id.
JobConfigurationQuery
setDefaultDataset(DatasetReference defaultDataset)
Optional.
JobConfigurationQuery
setDestinationEncryptionConfiguration(EncryptionConfiguration destinationEncryptionConfiguration)
Custom encryption configuration (e.g., Cloud KMS keys)
JobConfigurationQuery
setDestinationTable(TableReference destinationTable)
Optional.
JobConfigurationQuery
setFlattenResults(Boolean flattenResults)
Optional.
JobConfigurationQuery
setMaximumBillingTier(Integer maximumBillingTier)
Optional.
JobConfigurationQuery
setMaximumBytesBilled(Long maximumBytesBilled)
Limits the bytes billed for this job.
JobConfigurationQuery
setParameterMode(String parameterMode)
GoogleSQL only.
JobConfigurationQuery
setPreserveNulls(Boolean preserveNulls)
[Deprecated] This property is deprecated.
JobConfigurationQuery
setPriority(String priority)
Optional.
JobConfigurationQuery
setQuery(String query)
[Required] SQL query text to execute.
JobConfigurationQuery
setQueryParameters(List<QueryParameter> queryParameters)
Query parameters for GoogleSQL queries.
JobConfigurationQuery
setRangePartitioning(RangePartitioning rangePartitioning)
Range partitioning specification for the destination table.
JobConfigurationQuery
setSchemaUpdateOptions(List<String> schemaUpdateOptions)
Allows the schema of the destination table to be updated as a side effect of the query job.
JobConfigurationQuery
setScriptOptions(ScriptOptions scriptOptions)
Options controlling the execution of scripts.
JobConfigurationQuery
setSystemVariables(SystemVariables systemVariables)
Output only.
JobConfigurationQuery
setTableDefinitions(Map<String,ExternalDataConfiguration> tableDefinitions)
Optional.
JobConfigurationQuery
setTimePartitioning(TimePartitioning timePartitioning)
Time-based partitioning specification for the destination table.
JobConfigurationQuery
setUseLegacySql(Boolean useLegacySql)
Optional.
JobConfigurationQuery
setUseQueryCache(Boolean useQueryCache)
Optional.
JobConfigurationQuery
setUserDefinedFunctionResources(List<UserDefinedFunctionResource> userDefinedFunctionResources)
Describes user-defined function resources used in the query.
JobConfigurationQuery
setWriteDisposition(String writeDisposition)
Optional.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getAllowLargeResults
public Boolean getAllowLargeResults()
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.
- Returns:
- value or
null
for none
-
setAllowLargeResults
public JobConfigurationQuery setAllowLargeResults(Boolean 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.
- Parameters:
allowLargeResults
- allowLargeResults or null
for none
-
isAllowLargeResults
public boolean isAllowLargeResults()
Convenience method that returns only Boolean.TRUE
or Boolean.FALSE
.
Boolean properties can have four possible values:
null
, Data.NULL_BOOLEAN
, Boolean.TRUE
or Boolean.FALSE
.
This method returns Boolean.TRUE
if the default of the property is Boolean.TRUE
and it is null
or Data.NULL_BOOLEAN
.
Boolean.FALSE
is returned if the default of the property is Boolean.FALSE
and
it is null
or Data.NULL_BOOLEAN
.
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.
-
getClustering
public Clustering getClustering()
Clustering specification for the destination table.
- Returns:
- value or
null
for none
-
setClustering
public JobConfigurationQuery setClustering(Clustering clustering)
Clustering specification for the destination table.
- Parameters:
clustering
- clustering or null
for none
-
getConnectionProperties
public List<ConnectionProperty> getConnectionProperties()
Connection properties which can modify the query behavior.
- Returns:
- value or
null
for none
-
setConnectionProperties
public JobConfigurationQuery setConnectionProperties(List<ConnectionProperty> connectionProperties)
Connection properties which can modify the query behavior.
- Parameters:
connectionProperties
- connectionProperties or null
for none
-
getContinuous
public Boolean getContinuous()
[Optional] Specifies whether the query should be executed as a continuous query. The default
value is false.
- Returns:
- value or
null
for none
-
setContinuous
public JobConfigurationQuery setContinuous(Boolean continuous)
[Optional] Specifies whether the query should be executed as a continuous query. The default
value is false.
- Parameters:
continuous
- continuous or null
for none
-
getCreateDisposition
public String getCreateDisposition()
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.
- Returns:
- value or
null
for none
-
setCreateDisposition
public JobConfigurationQuery setCreateDisposition(String 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.
- Parameters:
createDisposition
- createDisposition or null
for none
-
getCreateSession
public Boolean getCreateSession()
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.
- Returns:
- value or
null
for none
-
setCreateSession
public JobConfigurationQuery setCreateSession(Boolean 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.
- Parameters:
createSession
- createSession or null
for none
-
getDefaultDataset
public DatasetReference getDefaultDataset()
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.
- Returns:
- value or
null
for none
-
setDefaultDataset
public JobConfigurationQuery setDefaultDataset(DatasetReference 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.
- Parameters:
defaultDataset
- defaultDataset or null
for none
-
getDestinationEncryptionConfiguration
public EncryptionConfiguration getDestinationEncryptionConfiguration()
Custom encryption configuration (e.g., Cloud KMS keys)
- Returns:
- value or
null
for none
-
setDestinationEncryptionConfiguration
public JobConfigurationQuery setDestinationEncryptionConfiguration(EncryptionConfiguration destinationEncryptionConfiguration)
Custom encryption configuration (e.g., Cloud KMS keys)
- Parameters:
destinationEncryptionConfiguration
- destinationEncryptionConfiguration or null
for none
-
getDestinationTable
public TableReference getDestinationTable()
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.
- Returns:
- value or
null
for none
-
setDestinationTable
public JobConfigurationQuery setDestinationTable(TableReference 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.
- Parameters:
destinationTable
- destinationTable or null
for none
-
getFlattenResults
public Boolean getFlattenResults()
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.
- Returns:
- value or
null
for none
-
setFlattenResults
public JobConfigurationQuery setFlattenResults(Boolean 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.
- Parameters:
flattenResults
- flattenResults or null
for none
-
isFlattenResults
public boolean isFlattenResults()
Convenience method that returns only Boolean.TRUE
or Boolean.FALSE
.
Boolean properties can have four possible values:
null
, Data.NULL_BOOLEAN
, Boolean.TRUE
or Boolean.FALSE
.
This method returns Boolean.TRUE
if the default of the property is Boolean.TRUE
and it is null
or Data.NULL_BOOLEAN
.
Boolean.FALSE
is returned if the default of the property is Boolean.FALSE
and
it is null
or Data.NULL_BOOLEAN
.
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.
-
getMaximumBillingTier
public Integer getMaximumBillingTier()
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.
- Returns:
- value or
null
for none
-
setMaximumBillingTier
public JobConfigurationQuery setMaximumBillingTier(Integer 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.
- Parameters:
maximumBillingTier
- maximumBillingTier or null
for none
-
getMaximumBytesBilled
public Long getMaximumBytesBilled()
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.
- Returns:
- value or
null
for none
-
setMaximumBytesBilled
public JobConfigurationQuery setMaximumBytesBilled(Long 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.
- Parameters:
maximumBytesBilled
- maximumBytesBilled or null
for none
-
getParameterMode
public String getParameterMode()
GoogleSQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use
named (@myparam) query parameters in this query.
- Returns:
- value or
null
for none
-
setParameterMode
public JobConfigurationQuery setParameterMode(String parameterMode)
GoogleSQL only. Set to POSITIONAL to use positional (?) query parameters or to NAMED to use
named (@myparam) query parameters in this query.
- Parameters:
parameterMode
- parameterMode or null
for none
-
getPreserveNulls
public Boolean getPreserveNulls()
[Deprecated] This property is deprecated.
- Returns:
- value or
null
for none
-
setPreserveNulls
public JobConfigurationQuery setPreserveNulls(Boolean preserveNulls)
[Deprecated] This property is deprecated.
- Parameters:
preserveNulls
- preserveNulls or null
for none
-
getPriority
public String getPriority()
Optional. Specifies a priority for the query. Possible values include INTERACTIVE and BATCH.
The default value is INTERACTIVE.
- Returns:
- value or
null
for none
-
setPriority
public JobConfigurationQuery setPriority(String priority)
Optional. Specifies a priority for the query. Possible values include INTERACTIVE and BATCH.
The default value is INTERACTIVE.
- Parameters:
priority
- priority or null
for none
-
getQuery
public String getQuery()
[Required] SQL query text to execute. The useLegacySql field can be used to indicate whether
the query uses legacy SQL or GoogleSQL.
- Returns:
- value or
null
for none
-
setQuery
public JobConfigurationQuery setQuery(String query)
[Required] SQL query text to execute. The useLegacySql field can be used to indicate whether
the query uses legacy SQL or GoogleSQL.
- Parameters:
query
- query or null
for none
-
getQueryParameters
public List<QueryParameter> getQueryParameters()
Query parameters for GoogleSQL queries.
- Returns:
- value or
null
for none
-
setQueryParameters
public JobConfigurationQuery setQueryParameters(List<QueryParameter> queryParameters)
Query parameters for GoogleSQL queries.
- Parameters:
queryParameters
- queryParameters or null
for none
-
getRangePartitioning
public RangePartitioning getRangePartitioning()
Range partitioning specification for the destination table. Only one of timePartitioning and
rangePartitioning should be specified.
- Returns:
- value or
null
for none
-
setRangePartitioning
public JobConfigurationQuery setRangePartitioning(RangePartitioning rangePartitioning)
Range partitioning specification for the destination table. Only one of timePartitioning and
rangePartitioning should be specified.
- Parameters:
rangePartitioning
- rangePartitioning or null
for none
-
getSchemaUpdateOptions
public List<String> getSchemaUpdateOptions()
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.
- Returns:
- value or
null
for none
-
setSchemaUpdateOptions
public JobConfigurationQuery setSchemaUpdateOptions(List<String> 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.
- Parameters:
schemaUpdateOptions
- schemaUpdateOptions or null
for none
-
getScriptOptions
public ScriptOptions getScriptOptions()
Options controlling the execution of scripts.
- Returns:
- value or
null
for none
-
setScriptOptions
public JobConfigurationQuery setScriptOptions(ScriptOptions scriptOptions)
Options controlling the execution of scripts.
- Parameters:
scriptOptions
- scriptOptions or null
for none
-
getSystemVariables
public SystemVariables getSystemVariables()
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.
- Returns:
- value or
null
for none
-
setSystemVariables
public JobConfigurationQuery setSystemVariables(SystemVariables 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.
- Parameters:
systemVariables
- systemVariables or null
for none
-
getTableDefinitions
public Map<String,ExternalDataConfiguration> getTableDefinitions()
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.
- Returns:
- value or
null
for none
-
setTableDefinitions
public JobConfigurationQuery setTableDefinitions(Map<String,ExternalDataConfiguration> 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.
- Parameters:
tableDefinitions
- tableDefinitions or null
for none
-
getTimePartitioning
public TimePartitioning getTimePartitioning()
Time-based partitioning specification for the destination table. Only one of timePartitioning
and rangePartitioning should be specified.
- Returns:
- value or
null
for none
-
setTimePartitioning
public JobConfigurationQuery setTimePartitioning(TimePartitioning timePartitioning)
Time-based partitioning specification for the destination table. Only one of timePartitioning
and rangePartitioning should be specified.
- Parameters:
timePartitioning
- timePartitioning or null
for none
-
getUseLegacySql
public Boolean getUseLegacySql()
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.
- Returns:
- value or
null
for none
-
setUseLegacySql
public JobConfigurationQuery setUseLegacySql(Boolean 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.
- Parameters:
useLegacySql
- useLegacySql or null
for none
-
isUseLegacySql
public boolean isUseLegacySql()
Convenience method that returns only Boolean.TRUE
or Boolean.FALSE
.
Boolean properties can have four possible values:
null
, Data.NULL_BOOLEAN
, Boolean.TRUE
or Boolean.FALSE
.
This method returns Boolean.TRUE
if the default of the property is Boolean.TRUE
and it is null
or Data.NULL_BOOLEAN
.
Boolean.FALSE
is returned if the default of the property is Boolean.FALSE
and
it is null
or Data.NULL_BOOLEAN
.
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.
-
getUseQueryCache
public Boolean getUseQueryCache()
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.
- Returns:
- value or
null
for none
-
setUseQueryCache
public JobConfigurationQuery setUseQueryCache(Boolean 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.
- Parameters:
useQueryCache
- useQueryCache or null
for none
-
isUseQueryCache
public boolean isUseQueryCache()
Convenience method that returns only Boolean.TRUE
or Boolean.FALSE
.
Boolean properties can have four possible values:
null
, Data.NULL_BOOLEAN
, Boolean.TRUE
or Boolean.FALSE
.
This method returns Boolean.TRUE
if the default of the property is Boolean.TRUE
and it is null
or Data.NULL_BOOLEAN
.
Boolean.FALSE
is returned if the default of the property is Boolean.FALSE
and
it is null
or Data.NULL_BOOLEAN
.
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.
-
getUserDefinedFunctionResources
public List<UserDefinedFunctionResource> getUserDefinedFunctionResources()
Describes user-defined function resources used in the query.
- Returns:
- value or
null
for none
-
setUserDefinedFunctionResources
public JobConfigurationQuery setUserDefinedFunctionResources(List<UserDefinedFunctionResource> userDefinedFunctionResources)
Describes user-defined function resources used in the query.
- Parameters:
userDefinedFunctionResources
- userDefinedFunctionResources or null
for none
-
getWriteDisposition
public String getWriteDisposition()
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.
- Returns:
- value or
null
for none
-
setWriteDisposition
public JobConfigurationQuery setWriteDisposition(String 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.
- Parameters:
writeDisposition
- writeDisposition or null
for none
-
set
public JobConfigurationQuery set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public JobConfigurationQuery clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.