Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

FlatMap Operator Example

Example of how to use the flat-map operator. In this example, the flat-map operator converts sentences into words.

Run DataFlow

With the dataflow.yaml file in the current directory, run the following commands:

ssdk run

Test DataFlow

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   

Clean-up

Exit ssdk terminal and remove the topics:

fluvio topic delete sentences
fluvio topic delete words