BigQuery API v2 (revision 79)



com.google.api.services.bigquery.model
Class QueryRequest

java.lang.Object
  extended by java.util.AbstractMap<String,Object>
      extended by com.google.api.client.util.GenericData
          extended by com.google.api.client.json.GenericJson
              extended by com.google.api.services.bigquery.model.QueryRequest
All Implemented Interfaces:
Cloneable, Map<String,Object>

public final class QueryRequest
extends GenericJson

Model definition for QueryRequest.

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: http://code.google.com/p/google-api-java-client/wiki/Json

Upgrade warning: starting with version 1.12 getResponseHeaders() is removed, instead use JsonHttpRequest.getLastResponseHeaders()

Author:
Google, Inc.

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
GenericData.Flags
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
QueryRequest()
           
 
Method Summary
 DatasetReference getDefaultDataset()
          [Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query.
 Boolean getDryRun()
          [Optional] If set, don't actually run the query.
 String getKind()
          The resource type of the request.
 Long getMaxResults()
          [Optional] The maximum number of results to return per page of results.
 Boolean getPreserveNulls()
          [Experimental] If set, preserve null values in table data, rather than mapping null values to the column's default value.
 String getQuery()
          [Required] A query string, following the BigQuery query syntax of the query to execute.
 Long getTimeoutMs()
          [Optional] How long to wait for the query to complete, in milliseconds, before returning.
 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, don't actually run the query.
 QueryRequest setKind(String kind)
          The resource type of the request.
 QueryRequest setMaxResults(Long maxResults)
          [Optional] The maximum number of results to return per page of results.
 QueryRequest setPreserveNulls(Boolean preserveNulls)
          [Experimental] If set, preserve null values in table data, rather than mapping null values to the column's default value.
 QueryRequest setQuery(String query)
          [Required] A query string, following the BigQuery query syntax of the query to execute.
 QueryRequest setTimeoutMs(Long timeoutMs)
          [Optional] How long to wait for the query to complete, in milliseconds, before returning.
 
Methods inherited from class com.google.api.client.json.GenericJson
clone, getFactory, setFactory, toPrettyString, toString
 
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, set, setUnknownKeys
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryRequest

public QueryRequest()
Method Detail

getDefaultDataset

public DatasetReference getDefaultDataset()
[Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be fully-qualified in the format projectId:datasetId.tableid. The value returned may be null.


setDefaultDataset

public QueryRequest setDefaultDataset(DatasetReference defaultDataset)
[Optional] Specifies the default datasetId and projectId to assume for any unqualified table names in the query. If not set, all table names in the query string must be fully-qualified in the format projectId:datasetId.tableid. The value set may be null.


getDryRun

public Boolean getDryRun()
[Optional] If set, don't actually run the query. A valid query will return an empty response, while an invalid query will return the same error it would if it wasn't a dry run. The value returned may be null.


setDryRun

public QueryRequest setDryRun(Boolean dryRun)
[Optional] If set, don't actually run the query. A valid query will return an empty response, while an invalid query will return the same error it would if it wasn't a dry run. The value set may be null.


getKind

public String getKind()
The resource type of the request. The value returned may be null.


setKind

public QueryRequest setKind(String kind)
The resource type of the request. The value set may be null.


getMaxResults

public Long getMaxResults()
[Optional] The maximum number of results to return per page of results. If the response list exceeds the maximum response size for a single response, you will have to page through the results. Default is to return the maximum response size. The value returned may be null.


setMaxResults

public QueryRequest setMaxResults(Long maxResults)
[Optional] The maximum number of results to return per page of results. If the response list exceeds the maximum response size for a single response, you will have to page through the results. Default is to return the maximum response size. The value set may be null.


getPreserveNulls

public Boolean getPreserveNulls()
[Experimental] If set, preserve null values in table data, rather than mapping null values to the column's default value. This flag currently defaults to false, but the default will soon be changed to true. Shortly afterward, this flag will be removed completely. Please specify true if possible, and false only if you need to force the old behavior while updating client code. The value returned may be null.


setPreserveNulls

public QueryRequest setPreserveNulls(Boolean preserveNulls)
[Experimental] If set, preserve null values in table data, rather than mapping null values to the column's default value. This flag currently defaults to false, but the default will soon be changed to true. Shortly afterward, this flag will be removed completely. Please specify true if possible, and false only if you need to force the old behavior while updating client code. The value set may be null.


getQuery

public String getQuery()
[Required] A query string, following the BigQuery query syntax of the query to execute. Table names should be qualified by dataset name in the format projectId:datasetId.tableId unless you specify the defaultDataset value. If the table is in the same project as the job, you can omit the project ID. Example: SELECT f1 FROM myProjectId:myDatasetId.myTableId. The value returned may be null.


setQuery

public QueryRequest setQuery(String query)
[Required] A query string, following the BigQuery query syntax of the query to execute. Table names should be qualified by dataset name in the format projectId:datasetId.tableId unless you specify the defaultDataset value. If the table is in the same project as the job, you can omit the project ID. Example: SELECT f1 FROM myProjectId:myDatasetId.myTableId. The value set may be null.


getTimeoutMs

public Long getTimeoutMs()
[Optional] How long to wait for the query to complete, in milliseconds, before returning. Default is to return immediately. If the timeout passes before the job completes, the request will fail with a TIMEOUT error. The value returned may be null.


setTimeoutMs

public QueryRequest setTimeoutMs(Long timeoutMs)
[Optional] How long to wait for the query to complete, in milliseconds, before returning. Default is to return immediately. If the timeout passes before the job completes, the request will fail with a TIMEOUT error. The value set may be null.