Class BQQueryResultsPipe<T>

  • Type Parameters:
    T - The type of each result record from BQ
    All Implemented Interfaces:
    Closeable, AutoCloseable, org.pipecraft.pipes.BasePipe, org.pipecraft.pipes.sync.Pipe<T>

    public class BQQueryResultsPipe<T>
    extends Object
    implements org.pipecraft.pipes.sync.Pipe<T>
    A source pipe that runs a query on BigQueryConnector and iterates over the results
    Author:
    Eyal Schneider
    • Constructor Detail

      • BQQueryResultsPipe

        public BQQueryResultsPipe​(BigQueryConnector bq,
                                  BQQuery<T,​?> query,
                                  QueryExecutionConfig queryConfig)
        Constructor
        Parameters:
        bq - The BQ connector
        query - The query to execute
        queryConfig - Query execution configuration, or null for the default one
    • Method Detail

      • next

        public T next()
               throws org.pipecraft.pipes.exceptions.PipeException,
                      InterruptedException
        Specified by:
        next in interface org.pipecraft.pipes.sync.Pipe<T>
        Throws:
        org.pipecraft.pipes.exceptions.PipeException
        InterruptedException
      • peek

        public T peek()
        Specified by:
        peek in interface org.pipecraft.pipes.sync.Pipe<T>
      • start

        public void start()
                   throws org.pipecraft.pipes.exceptions.PipeException,
                          InterruptedException
        Specified by:
        start in interface org.pipecraft.pipes.BasePipe
        Throws:
        org.pipecraft.pipes.exceptions.PipeException
        InterruptedException
      • getProgress

        public float getProgress()
        Specified by:
        getProgress in interface org.pipecraft.pipes.BasePipe