Hi @Simon Jespersen, you can use extract text processor and get status attribute to ff and then convert csvtoavro then use routeonattribute processor to split the data into 2 routes.
we need to extract status value as attribute for this purpose we need to split our file into each record in to seperate flowfile.
so that the input to ExtractText processor would be one record as ff.
Connect the splits relation to ExtactText processor.
We mentioned in processor configs LineSplitCount as 1 output of splittext splits the file into individual records as one record per flowfile.
Evaluates one or more Regular Expressions against the content of a FlowFile. The results of those Regular Expressions are assigned to FlowFile Attributes.
We need to extract status value from ff content as attribute of ff by using Regex.
add a new property to extract status value as attribute to the flowfile
In this processor we have extracted the status value as attribute to every flowfile.
Then use InferAvroSchema processor and ConvertAvrotoJSON and then use
to split the flowfiles by adding below properties.
Then make use of these two properties to connect to another processors
Once make sure in your flow that you have connected only the exact same relations that are in screenshot to the next processors.
Hope this will helps ...!!!