Timestream.run_iter

Timestream.run_iter(kind=‘pandas’, *, mode=‘once’, results=None, row_limit=None, max_batch_size=None)

Execute the TimeStream producing an iterator over the results.

Parameters:
  • kind (Literal[‘pandas’, ‘pyarrow’, ‘row’], default: 'pandas')

    The kind of iterator to produce. Defaults to pandas.

  • mode (Literal[‘once’, ‘live’], default: 'once')

    The execution mode to use. Defaults to 'once' to produce the results

    from the currently available data. Use 'live' to start a standing query

    that continues to process new data until stopped.

  • results (Optional[Union[History, Snapshot]], default: None)

    The results to produce. Defaults to History() producing all points.

  • row_limit (Optional[int], default: None)

    The maximum number of rows to return. Defaults to None for no limit.

  • max_batch_size (Optional[int], default: None)

    The maximum number of rows to return in each batch.

    Defaults to None for no limit.

Returns:

Union[ResultIterator[pd.DataFrame], ResultIterator[RecordBatch], ResultIterator[dict]]

Iterator over data of the corresponding kind. The QueryIterator allows

cancelling the query or materialization as well as iterating.

See Also
  • write: To write the results directly to a :class:Destination<kaskada.destinations.Destination>.