All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.bigquery.model.QueryRequest.html Maven / Gradle / Ivy

There is a newer version: v2-rev20241222-2.0.0
Show newest version






QueryRequest (BigQuery API v2-rev20220422-1.32.1)












com.google.api.services.bigquery.model

Class QueryRequest

    • Constructor Detail

      • QueryRequest

        public QueryRequest()
    • Method Detail

      • getConnectionProperties

        public List<ConnectionProperty> getConnectionProperties()
        Connection properties.
        Returns:
        value or null for none
      • setConnectionProperties

        public QueryRequest setConnectionProperties(List<ConnectionProperty> connectionProperties)
        Connection properties.
        Parameters:
        connectionProperties - connectionProperties or null for none
      • getCreateSession

        public Boolean getCreateSession()
        If true, creates a new session, where session id will be a server generated random id. If false, runs query with an existing session_id passed in ConnectionProperty, otherwise runs query in non-session mode.
        Returns:
        value or null for none
      • setCreateSession

        public QueryRequest setCreateSession(Boolean createSession)
        If true, creates a new session, where session id will be a server generated random id. If false, runs query with an existing session_id passed in ConnectionProperty, otherwise runs query in non-session mode.
        Parameters:
        createSession - createSession or null for none
      • 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 qualified in the format 'datasetId.tableId'.
        Returns:
        value or null for none
      • 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 qualified in the format 'datasetId.tableId'.
        Parameters:
        defaultDataset - defaultDataset or null for none
      • getDryRun

        public Boolean getDryRun()
        [Optional] If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false.
        Returns:
        value or null for none
      • setDryRun

        public QueryRequest setDryRun(Boolean dryRun)
        [Optional] If set to true, BigQuery doesn't run the job. Instead, if the query is valid, BigQuery returns statistics about the job such as how many bytes would be processed. If the query is invalid, an error returns. The default value is false.
        Parameters:
        dryRun - dryRun or null for none
      • getKind

        public String getKind()
        The resource type of the request.
        Returns:
        value or null for none
      • setKind

        public QueryRequest setKind(String kind)
        The resource type of the request.
        Parameters:
        kind - kind or null for none
      • getLabels

        public Map<String,String> getLabels()
        The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
        Returns:
        value or null for none
      • setLabels

        public QueryRequest setLabels(Map<String,String> labels)
        The labels associated with this job. You can use these to organize and group your jobs. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key.
        Parameters:
        labels - labels or null for none
      • getLocation

        public String getLocation()
        The geographic location where the job should run. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
        Returns:
        value or null for none
      • setLocation

        public QueryRequest setLocation(String location)
        The geographic location where the job should run. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.
        Parameters:
        location - location or null for none
      • getMaxResults

        public Long getMaxResults()
        [Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies.
        Returns:
        value or null for none
      • setMaxResults

        public QueryRequest setMaxResults(Long maxResults)
        [Optional] The maximum number of rows of data to return per page of results. Setting this flag to a small value such as 1000 and then paging through results might improve reliability when the query result set is large. In addition to this limit, responses are also limited to 10 MB. By default, there is no maximum row count, and only the byte limit applies.
        Parameters:
        maxResults - maxResults or null for none
      • getMaximumBytesBilled

        public Long getMaximumBytesBilled()
        [Optional] 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 QueryRequest setMaximumBytesBilled(Long maximumBytesBilled)
        [Optional] 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()
        Standard SQL 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 QueryRequest setParameterMode(String parameterMode)
        Standard SQL 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 QueryRequest setPreserveNulls(Boolean preserveNulls)
        [Deprecated] This property is deprecated.
        Parameters:
        preserveNulls - preserveNulls or null for none
      • getQuery

        public String getQuery()
        [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]".
        Returns:
        value or null for none
      • setQuery

        public QueryRequest setQuery(String query)
        [Required] A query string, following the BigQuery query syntax, of the query to execute. Example: "SELECT count(f1) FROM [myProjectId:myDatasetId.myTableId]".
        Parameters:
        query - query or null for none
      • getQueryParameters

        public List<QueryParameter> getQueryParameters()
        Query parameters for Standard SQL queries.
        Returns:
        value or null for none
      • setQueryParameters

        public QueryRequest setQueryParameters(List<QueryParameter> queryParameters)
        Query parameters for Standard SQL queries.
        Parameters:
        queryParameters - queryParameters or null for none
      • getRequestId

        public String getRequestId()
        A unique user provided identifier to ensure idempotent behavior for queries. Note that this is different from the job_id. It has the following properties: 1. It is case-sensitive, limited to up to 36 ASCII characters. A UUID is recommended. 2. Read only queries can ignore this token since they are nullipotent by definition. 3. For the purposes of idempotency ensured by the request_id, a request is considered duplicate of another only if they have the same request_id and are actually duplicates. When determining whether a request is a duplicate of the previous request, all parameters in the request that may affect the behavior are considered. For example, query, connection_properties, query_parameters, use_legacy_sql are parameters that affect the result and are considered when determining whether a request is a duplicate, but properties like timeout_ms don't affect the result and are thus not considered. Dry run query requests are never considered duplicate of another request. 4. When a duplicate mutating query request is detected, it returns: a. the results of the mutation if it completes successfully within the timeout. b. the running operation if it is still in progress at the end of the timeout. 5. Its lifetime is limited to 15 minutes. In other words, if two requests are sent with the same request_id, but more than 15 minutes apart, idempotency is not guaranteed.
        Returns:
        value or null for none
      • setRequestId

        public QueryRequest setRequestId(String requestId)
        A unique user provided identifier to ensure idempotent behavior for queries. Note that this is different from the job_id. It has the following properties: 1. It is case-sensitive, limited to up to 36 ASCII characters. A UUID is recommended. 2. Read only queries can ignore this token since they are nullipotent by definition. 3. For the purposes of idempotency ensured by the request_id, a request is considered duplicate of another only if they have the same request_id and are actually duplicates. When determining whether a request is a duplicate of the previous request, all parameters in the request that may affect the behavior are considered. For example, query, connection_properties, query_parameters, use_legacy_sql are parameters that affect the result and are considered when determining whether a request is a duplicate, but properties like timeout_ms don't affect the result and are thus not considered. Dry run query requests are never considered duplicate of another request. 4. When a duplicate mutating query request is detected, it returns: a. the results of the mutation if it completes successfully within the timeout. b. the running operation if it is still in progress at the end of the timeout. 5. Its lifetime is limited to 15 minutes. In other words, if two requests are sent with the same request_id, but more than 15 minutes apart, idempotency is not guaranteed.
        Parameters:
        requestId - requestId or null for none
      • getTimeoutMs

        public Long getTimeoutMs()
        [Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds).
        Returns:
        value or null for none
      • setTimeoutMs

        public QueryRequest setTimeoutMs(Long timeoutMs)
        [Optional] How long to wait for the query to complete, in milliseconds, before the request times out and returns. Note that this is only a timeout for the request, not the query. If the query takes longer to run than the timeout value, the call returns without any results and with the 'jobComplete' flag set to false. You can call GetQueryResults() to wait for the query to complete and read the results. The default value is 10000 milliseconds (10 seconds).
        Parameters:
        timeoutMs - timeoutMs or null for none
      • getUseLegacySql

        public Boolean getUseLegacySql()
        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.
        Returns:
        value or null for none
      • setUseLegacySql

        public QueryRequest setUseLegacySql(Boolean useLegacySql)
        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.
        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.

        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.

      • 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. The default value is true.
        Returns:
        value or null for none
      • setUseQueryCache

        public QueryRequest 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. The default value is true.
        Parameters:
        useQueryCache - useQueryCache or null for none

Copyright © 2011–2022 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy