I have the below flow set up for reading json data and convert it to csv using the convertRecord processor. However, the output flowfile is only populated with single record (I am assuming only the first record) instead of all the records.
Can someone help provide the correct configuration?
Source json data:
{"creation_Date": "2018-08-19", "Hour_of_day": 7, "log_count": 2136}
{"creation_Date": "2018-08-19", "Hour_of_day": 17, "log_count": 606}
{"creation_Date": "2018-08-19", "Hour_of_day": 14, "log_count": 1328}
{"creation_Date": "2018-08-19", "Hour_of_day": 20, "log_count": 363}
flow:
ConvertRecord processor config:
JsonTreeReader controller config:
CSVrecordsetWriter controller config:
AvroSchemaRegistry controller config:
{
"type": "record",
"name": "demo_schema",
"fields":
[
{ "name": "creation_Date", "type": "string"},
{ "name": "Hour_of_day", "type": "string"},
{ "name": "log_count", "type": "string"}
]
}
Flowfile content that I am getting:
creation_Date,Hour_of_day,log_count
2018-08-16,0,3278
what I need:
creation_Date,Hour_of_day,log_count
2018-08-16,0,3278
2018-08-17,4,278
2018-08-18,10,6723
Hope I was elaborate to explain the situation and would appreciate if someone can help correct the configuration so that I get the complete data. Thank you in advance!