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 resultsfrom the currently available data. Use
'live'to start a standing querythat 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
Nonefor no limit.max_batch_size (Optional[int], default:
None)The maximum number of rows to return in each batch.
Defaults to
Nonefor no limit.
- Returns:
-
Union[ResultIterator[pd.DataFrame], ResultIterator[RecordBatch], ResultIterator[dict]]
Iterator over data of the corresponding kind. The
QueryIteratorallowscancelling the query or materialization as well as iterating.
See Alsowrite: To write the results directly to a :class:Destination<kaskada.destinations.Destination>.