Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Regex Example

In this example, we'll import the regex crate to demonstrate adding external dependencies for inline functions. We'll use the regex function to identify generation-z based on their year of birth.

Run DataFlow

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

sdf run

Test DataFlow

Produce records in the person topic:

fluvio produce person
{"name": "John", "born": 1996}
{"name": "Alice", "born": 1998}
{"name": "Bob", "born": 2011}
{"name": "Michael", "born": 2018}

Consume from gen-z to retrieve the result:

fluvio consume gen-z -Bd
{"name": "Alice", "born": 1998}
{"name": "Bob", "born": 2011}

Clean-up

Exit sdf terminal and remove the topics:

fluvio topic delete person
fluvio topic delete gen-z