Example of how to use the flat-map
operator. In this example, the flat-map operator converts sentences into words.
- Checkout the dataflow.yaml.
- Make sure to Install SSDK and start a Fluvio cluster.
With the dataflow.yaml
file in the current directory, run the following commands:
ssdk run
Produce sentences:
fluvio produce sentences
This is a test
Consume from words
to see them transformed:
fluvio consume words -Bd
This
is
a
test
Display the stateful service stats in the ssdk >>
terminal:
show state flat-map-service/split-sentence/metrics --table
Key Window succeeded failed
stats * 1 0
Exit ssdk
terminal and remove the topics:
fluvio topic delete sentences
fluvio topic delete words