Interface BQQuery<R,​F>

    • Method Detail

      • getSQL

        String getSQL()
        Returns:
        The BigQuery SQL to execute
      • mapRow

        R mapRow​(com.google.cloud.bigquery.FieldValueList row)
        Parameters:
        row - A result set row
        Returns:
        The object the row is converted to
      • aggregate

        F aggregate​(Iterator<R> it)
             throws BQException
        Parameters:
        it - An iterator over transformed rows (i.e. rows processed with transformRow(..)). Memory efficient - results are streamed during the iteration.
        Returns:
        The final result object, obtained by aggregating all result rows
        Throws:
        BQException - In case that the results can't be aggregated
      • mapAndAggregate

        default F mapAndAggregate​(Iterator<com.google.cloud.bigquery.FieldValueList> it)
                           throws BQException
        Parameters:
        it - An iterator on raw results
        Returns:
        The final result, obtained by mapping individual rows and then aggregating all
        Throws:
        BQException
      • isLegacySQL

        default boolean isLegacySQL()
        Returns:
        true if this is a legacy sql query (default=false)
      • getQueryParameters

        default Map<String,​com.google.cloud.bigquery.QueryParameterValue> getQueryParameters()
        Used for supporting named parameters. The default implementation disables named parameters. Override this method to support it. For every parameter used in the query (e.g. `@param`), there must be one entry with key `param`.
        Returns:
        the parameter names mapped to their values. Null means that the query doesn't contain any named parameters (default).