For example: Input Data:
{"date":"03-11-22", "message":"This is message"},
{"date":"03-30-22", "message":"This is message"},
{"date":"04-03-22", "message":"This is message"},
{"date":"04-15-22", "message":"This is message"},
{"date":"08-18-22", "message":"This is message"},
{"date":"08-28-22", "message":"This is message"}
The output should generate the file name according to the month and push the data in that month's file.
Output: Given input should create 3 files,
032022_data.log
042022_data.log
082022_data.log
The
pathfield of thefileoutput supports interpolation. Please try the following config:It produces the following files:
Update: Based on the comments, I believe this pipeline should do what you need:
It creates these files:
I'm not really sure where that
20in between the month and the year is supposed to come from, so I left it out.