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() |
DatasetReference |
getDefaultDataset()
[Optional] Specifies the default datasetId and projectId to assume for any unqualified table
names in the query.
|
Boolean |
getDryRun()
[Optional] If set to true, BigQuery doesn't run the job.
|
String |
getKind()
The resource type of the request.
|
String |
getLocation()
The geographic location where the job should run.
|
Long |
getMaxResults()
[Optional] The maximum number of rows of data to return per page of results.
|
String |
getParameterMode()
Standard SQL only.
|
Boolean |
getPreserveNulls()
[Deprecated] This property is deprecated.
|
String |
getQuery()
[Required] A query string, following the BigQuery query syntax, of the query to execute.
|
List<QueryParameter> |
getQueryParameters()
Query parameters for Standard SQL queries.
|
Long |
getTimeoutMs()
[Optional] How long to wait for the query to complete, in milliseconds, before the request
times out and returns.
|
Boolean |
getUseLegacySql()
Specifies whether to use BigQuery's legacy SQL dialect for this query.
|
Boolean |
getUseQueryCache()
[Optional] Whether to look for the result in the query cache.
|
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 |
setDefaultDataset(DatasetReference defaultDataset)
[Optional] Specifies the default datasetId and projectId to assume for any unqualified table
names in the query.
|
QueryRequest |
setDryRun(Boolean dryRun)
[Optional] If set to true, BigQuery doesn't run the job.
|
QueryRequest |
setKind(String kind)
The resource type of the request.
|
QueryRequest |
setLocation(String location)
The geographic location where the job should run.
|
QueryRequest |
setMaxResults(Long maxResults)
[Optional] The maximum number of rows of data to return per page of results.
|
QueryRequest |
setParameterMode(String parameterMode)
Standard SQL only.
|
QueryRequest |
setPreserveNulls(Boolean preserveNulls)
[Deprecated] This property is deprecated.
|
QueryRequest |
setQuery(String query)
[Required] A query string, following the BigQuery query syntax, of the query to execute.
|
QueryRequest |
setQueryParameters(List<QueryParameter> queryParameters)
Query parameters for Standard SQL queries.
|
QueryRequest |
setTimeoutMs(Long timeoutMs)
[Optional] How long to wait for the query to complete, in milliseconds, before the request
times out and returns.
|
QueryRequest |
setUseLegacySql(Boolean useLegacySql)
Specifies whether to use BigQuery's legacy SQL dialect for this query.
|
QueryRequest |
setUseQueryCache(Boolean useQueryCache)
[Optional] Whether to look for the result in the query cache.
|
getFactory, setFactory, toPrettyString, toStringentrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic 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 String getKind()
null for nonepublic QueryRequest setKind(String kind)
kind - kind 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 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 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 standard SQL: 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–2018 Google. All rights reserved.