You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An dfs or stream doesn't have a state; but you probably mean the various kinds of aggregations and other operations which do. Some of these allow you to specify state upon creation (e.g., DataFrame.aggregate), others maintain their stage in insrtance attributes, so that you can set them whenever you want
s = streamz.Stream()
u = s.unique()
u.sink(print)
u.seen = {1: 1} # mark value 1 as already seen
s.emit(0) # prints "0"
s.emit(1) # doesn't print anything, already seen
You can also pass events in from your original stream (s.emit()) or a stream made for the purpose, to prime the stage of your aggregation node, or even call the node's update method to simulate the same.
Is it possible to start a sdf or stream with an initial state or backfill the sdf with values from a database or cache?
The text was updated successfully, but these errors were encountered: