Class QueryExecutionConfig.Builder

    • Method Detail

      • setTimeoutMs

        public QueryExecutionConfig.Builder setTimeoutMs​(Long timeoutMs)
        Parameters:
        timeoutMs - The query execution timeout to set, in milliseconds. Must be positive. 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.
        Returns:
        This builder object
      • getTimeoutMs

        public Long getTimeoutMs()
        Returns:
        The query execution timeout, in milliseconds. Null means no timeout (default value). 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.
      • setDisableCache

        public QueryExecutionConfig.Builder setDisableCache​(boolean disableCache)
        Parameters:
        disableCache - true for avoiding usage of cache, false for allowing it where relevant (default).
        Returns:
        This builder object
      • isCacheDisabled

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

        public QueryExecutionConfig.Builder setMaxRowsPerPage​(int maxRowsPerPage)
        Parameters:
        maxRowsPerPage - The maximum number of rows to use per page. BQ returns result rows in chunks called "pages". This number must be positive. Default value is 10,000.
        Returns:
        This builder object
      • getMaxRowsPerPage

        public int getMaxRowsPerPage()
        Returns:
        The maximum number of rows to use per page. BQ returns result rows in chunks called "pages". This number must be positive. Default value is 10,000.
      • setMaxResults

        public QueryExecutionConfig.Builder setMaxResults​(Long maxResults)
        Parameters:
        maxResults - 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 TooManyRowsException.
        Returns:
        This builder object
      • 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 TooManyRowsException.
      • setTableDestinationReference

        public QueryExecutionConfig.Builder setTableDestinationReference​(com.google.cloud.bigquery.TableId tableConfig)
        Parameters:
        tableConfig - The identity of the BQ table to write results to. Null means no specific table (default).
        Returns:
        This builder object
      • 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).
      • setWriteDisposition

        public QueryExecutionConfig.Builder setWriteDisposition​(com.google.cloud.bigquery.JobInfo.WriteDisposition action)
        Relevant only when destination table is set. Specifies 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.
        Parameters:
        action - The disposition to set. Must not be empty.
        Returns:
        This builder object
      • 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.
      • setPriority

        public QueryExecutionConfig.Builder setPriority​(com.google.cloud.bigquery.QueryJobConfiguration.Priority priority)
        Specifies a priority for the query. Possible values include INTERACTIVE and BATCH. The default value is INTERACTIVE.
        Returns:
        This builder object
      • getPriority

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

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

        public QueryExecutionConfig.Builder setDestinationTableExpirationHs​(Integer destinationTableExpirationHs)
        Relevant only when destination table is set.
        Parameters:
        destinationTableExpirationHs - the destination table expiration time, in hours. Null means no expiration(default).
        Returns:
        this builder object