public final class QueryRequest
extends com.google.api.client.json.GenericJson
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
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
QueryRequest() |
| Modifier and Type | Method and Description |
|---|---|
QueryRequest |
clone() |
List<ConnectionProperty> |
getConnectionProperties()
Optional.
|
Boolean |
getContinuous()
[Optional] Specifies whether the query should be executed as a continuous query.
|
Boolean |
getCreateSession()
Optional.
|
DatasetReference |
getDefaultDataset()
Optional.
|
Boolean |
getDryRun()
Optional.
|
DataFormatOptions |
getFormatOptions()
Optional.
|
String |
getJobCreationMode()
Optional.
|
String |
getKind()
The resource type of the request.
|
Map<String,String> |
getLabels()
Optional.
|
String |
getLocation()
The geographic location where the job should run.
|
Long |
getMaximumBytesBilled()
Optional.
|
Long |
getMaxResults()
Optional.
|
String |
getParameterMode()
GoogleSQL only.
|
Boolean |
getPreserveNulls()
This property is deprecated.
|
String |
getQuery()
Required.
|
List<QueryParameter> |
getQueryParameters()
Query parameters for GoogleSQL queries.
|
String |
getRequestId()
Optional.
|
Long |
getTimeoutMs()
Optional.
|
Boolean |
getUseLegacySql()
Specifies whether to use BigQuery's legacy SQL dialect for this query.
|
Boolean |
getUseQueryCache()
Optional.
|
boolean |
isUseLegacySql()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
boolean |
isUseQueryCache()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
QueryRequest |
set(String fieldName,
Object value) |
QueryRequest |
setConnectionProperties(List<ConnectionProperty> connectionProperties)
Optional.
|
QueryRequest |
setContinuous(Boolean continuous)
[Optional] Specifies whether the query should be executed as a continuous query.
|
QueryRequest |
setCreateSession(Boolean createSession)
Optional.
|
QueryRequest |
setDefaultDataset(DatasetReference defaultDataset)
Optional.
|
QueryRequest |
setDryRun(Boolean dryRun)
Optional.
|
QueryRequest |
setFormatOptions(DataFormatOptions formatOptions)
Optional.
|
QueryRequest |
setJobCreationMode(String jobCreationMode)
Optional.
|
QueryRequest |
setKind(String kind)
The resource type of the request.
|
QueryRequest |
setLabels(Map<String,String> labels)
Optional.
|
QueryRequest |
setLocation(String location)
The geographic location where the job should run.
|
QueryRequest |
setMaximumBytesBilled(Long maximumBytesBilled)
Optional.
|
QueryRequest |
setMaxResults(Long maxResults)
Optional.
|
QueryRequest |
setParameterMode(String parameterMode)
GoogleSQL only.
|
QueryRequest |
setPreserveNulls(Boolean preserveNulls)
This property is deprecated.
|
QueryRequest |
setQuery(String query)
Required.
|
QueryRequest |
setQueryParameters(List<QueryParameter> queryParameters)
Query parameters for GoogleSQL queries.
|
QueryRequest |
setRequestId(String requestId)
Optional.
|
QueryRequest |
setTimeoutMs(Long timeoutMs)
Optional.
|
QueryRequest |
setUseLegacySql(Boolean useLegacySql)
Specifies whether to use BigQuery's legacy SQL dialect for this query.
|
QueryRequest |
setUseQueryCache(Boolean useQueryCache)
Optional.
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic List<ConnectionProperty> getConnectionProperties()
null for nonepublic QueryRequest setConnectionProperties(List<ConnectionProperty> connectionProperties)
connectionProperties - connectionProperties or null for nonepublic Boolean getContinuous()
null for nonepublic QueryRequest setContinuous(Boolean continuous)
continuous - continuous or null for nonepublic Boolean getCreateSession()
null for nonepublic QueryRequest setCreateSession(Boolean createSession)
createSession - createSession or null for nonepublic DatasetReference getDefaultDataset()
null for nonepublic QueryRequest setDefaultDataset(DatasetReference defaultDataset)
defaultDataset - defaultDataset or null for nonepublic Boolean getDryRun()
null for nonepublic QueryRequest setDryRun(Boolean dryRun)
dryRun - dryRun or null for nonepublic DataFormatOptions getFormatOptions()
null for nonepublic QueryRequest setFormatOptions(DataFormatOptions formatOptions)
formatOptions - formatOptions or null for nonepublic String getJobCreationMode()
null for nonepublic QueryRequest setJobCreationMode(String jobCreationMode)
jobCreationMode - jobCreationMode or null for nonepublic String getKind()
null for nonepublic QueryRequest setKind(String kind)
kind - kind or null for nonepublic Map<String,String> getLabels()
null for nonepublic QueryRequest setLabels(Map<String,String> labels)
labels - labels or null for nonepublic String getLocation()
null for nonepublic QueryRequest setLocation(String location)
location - location or null for nonepublic Long getMaxResults()
null for nonepublic QueryRequest setMaxResults(Long maxResults)
maxResults - maxResults or null for nonepublic Long getMaximumBytesBilled()
null for nonepublic QueryRequest setMaximumBytesBilled(Long maximumBytesBilled)
maximumBytesBilled - maximumBytesBilled or null for nonepublic String getParameterMode()
null for nonepublic QueryRequest setParameterMode(String parameterMode)
parameterMode - parameterMode or null for nonepublic Boolean getPreserveNulls()
null for nonepublic QueryRequest setPreserveNulls(Boolean preserveNulls)
preserveNulls - preserveNulls or null for nonepublic String getQuery()
null for nonepublic QueryRequest setQuery(String query)
query - query or null for nonepublic List<QueryParameter> getQueryParameters()
null for nonepublic QueryRequest setQueryParameters(List<QueryParameter> queryParameters)
queryParameters - queryParameters or null for nonepublic String getRequestId()
null for nonepublic QueryRequest setRequestId(String requestId)
requestId - requestId or null for nonepublic Long getTimeoutMs()
null for nonepublic QueryRequest setTimeoutMs(Long timeoutMs)
timeoutMs - timeoutMs or null for nonepublic Boolean getUseLegacySql()
null for nonepublic QueryRequest setUseLegacySql(Boolean useLegacySql)
useLegacySql - useLegacySql or null for nonepublic boolean isUseLegacySql()
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.
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.
public Boolean getUseQueryCache()
null for nonepublic QueryRequest setUseQueryCache(Boolean useQueryCache)
useQueryCache - useQueryCache or null for nonepublic boolean isUseQueryCache()
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. The default value is true.
public QueryRequest set(String fieldName, Object value)
set in class com.google.api.client.json.GenericJsonpublic QueryRequest clone()
clone in class com.google.api.client.json.GenericJsonCopyright © 2011–2025 Google. All rights reserved.