Class QueryExecutionConfig


  • public class QueryExecutionConfig
    extends Object
    BQ query execution settings. Immutable. Use the builder to create or create a copy of existing config.
    Author:
    Eyal Schneider
    • Method Detail

      • toBuilder

        public QueryExecutionConfig.Builder toBuilder()
        Returns:
        A new builder initialized with the settings in this config object. Allows selectively changing the settings.
      • getTimeoutMs

        public Long getTimeoutMs()
        Returns:
        The query execution timeout, in milliseconds. Null means no timeout. NOTE: Google's API doesn't seem to always respect this limit, and it's not always clear which timeout applies (The query level timeout here or the global one as provided in the BigQueryConnector's constructor.
      • isCacheDisabled

        public boolean isCacheDisabled()
        Returns:
        true for avoiding usage of cache, false for allowing it where relevant
      • getMaxRowsPerPage

        public int getMaxRowsPerPage()
        Returns:
        The maximum number of rows to use per page. BQ returns result rows in chunks called "pages".
      • getMaxResults

        public Long getMaxResults()
        Returns:
        The maximum number of rows to return for a single query. Null means no limit. This is also referred to as the "soft limit". A query which returns more results will trigger the ClientTooManyRowsBQException.
      • getDestinationTableReference

        public com.google.cloud.bigquery.TableId getDestinationTableReference()
        Returns:
        The identity of the BQ table to write results to. Null means no specific table (default).
      • getWriteDisposition

        public com.google.cloud.bigquery.JobInfo.WriteDisposition getWriteDisposition()
        Relevant only when destination table is set.
        Returns:
        The action that occurs if the destination table already exists. The following values are supported: WRITE_EMPTY, WRITE_TRUNCATE and WRITE_APPEND. The default value is WRITE_EMPTY. See JobInfo.WriteDisposition documentation.
      • getPriority

        public com.google.cloud.bigquery.QueryJobConfiguration.Priority getPriority()
        Returns the query priority. Possible values include INTERACTIVE and BATCH.
        Returns:
        The query job priority. Possible values include INTERACTIVE and BATCH.
      • getDestinationTableExpirationHs

        public Integer getDestinationTableExpirationHs()
        Relevant only when destination table is set.
        Returns:
        the destination table expiration time, in hours. Null means no expiration.