Hi, I have a fixed flow input producing three rows, each with the field 'name' and 'role.
I want to output all of the rows in a single row and single field in the fileoutputdelimited.
The reason for this is that I need to convert the incoming rows to a json like format.
(I already know about the component to write json fields - it's not what I need)
I've tried using jJavaFlex with the main block building a string and the end block propagating the row, but it seems to just pass a row out for each incoming row anyway.
Hi, Try this: tFixedFlowInput------row1---(main)------tJavaRow suppose you put your three colmun in a context variable In your tJavaRow : context.mergethreerow=row1.column1+row1.column2+row1.column3;
Thanks, but I actually need values from each row to combine into a single field in a single row e.g.
So input rows are (just an example):
Row1
--------
name: Mike
role: Author
Row2
------
name:Jo
role: Illustrator
Output would be 1 row containing:
Attributex: { "contributors" : }
If anyone can achieve this exact output using another component that already exists please let me know.
In my real job, I don't want to append the rows to a variable and then use a separate subjob, because this flow is contributing to an XML file that's being built, and I don't think I can add into the XML structure after the file is written? he above is just an example to illustrate the principle of many rows to one.
HI ,
I have the Table with columns "REPORT_INFO_ID","REPORT_ID","SECTION_CODE","SOURCE_NAME","JSON_OUTPUT","METRIC_NAME","SEQUENCE"
"JSON_OUTPUT" column has JSON format in multiple levels (Means each record in that column has a json format).
json files are there as per source systems...now how i can process the data.
sample data as in below: