Created 09-14-2018 01:02 AM
Hi All,
I have the following requirement:
Split a single NiFi flowfile into multiple flowfilesof each of the flowfiles as a separate data
Sample input flowfile:
fieldname value
id 1
name ankit
address ____
id 2
name john
address ______
Desired output files:
Flowfile 1:
fieldname value
id 1
name ankit
address ____
Flowfile 2:
fieldname value
id 2
name john
address ______
.
Created on 09-14-2018 01:34 AM - edited 08-17-2019 11:09 PM
Use SplitText processor with below configs:
We are keeping header line count as 1 i.e first line treated as header and this header is added to each split and we are splitting 3 lines as one split.
InputFlowFile:
fieldname value id 1 name ankit address ____ id 2 name john address ______
Use Splits relationship from Splittext processor
OutputFlowfiles:
ff1:
fieldname value id 1 name ankit address ____
ff2:
fieldname value id 2 name john address ______
For more details refer to this link for more details regards to SplitText processor.
-
If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.
Created 01-17-2019 07:05 AM
I try this but file split into only one fiile which contain top 3 lines