FlowHeater - The Data Import / Export Specialist
See also the general examples available, which may answer your question: Hello World 1 / 2 / 3 , format numbers as character strings , simple If-Then-Else , complex If-Then-ElseIf , filtering and grouping data , consolidate grouped values

Produce 2 output rows from 1 input row

9 years 8 months ago #2283 by Heinz
I woudl like to re-process a input row to produce a second putput row (obviously in the same output format) but using different fields / calculations based on the same input row.

Illustrative example
Input file contains 6 fields
INPUTROW1: F1,F2,F3,F4,F5,F6

Output file contains 3 generic fields and we extract infp from the record into output row 1:

I woudl now want to generate additional output rows:


And maybe even a 3rd - and thus n-th?

OUTPUTROW3: TRXTYPE-C,SomeConstantValue,F2+F6

And now we move on to next input row and continue the process.

I would thus need to be able to define "TRXTYPE" column based on which "additional" row I am generating and it can not be assumed I can use anything in the input row - it would need to be a "constant / X-Value PER additional output row"

Hope this makes sense?

Please Log in or Create an account to join the conversation.

9 years 8 months ago #2284 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:Produce 2 output rows from 1 input row
Hi Heinz,

It's possible but it could be a hard work. The more columns you need the more complicated become.

I try to explain. You need the GroupOut Heater to copy one input row to X output rows. Then you need a static value to decide how many rows you are need. In the example I used 2 additional rows = 3 output rows!

Then you need for each row a condition (IF-THEN-ELSE Heater) to decide which content you would like to overtake.

For example) The first input column should be taken into the second output row and use the second column.

For this you need the AutoID Heater with activated "GroupOut" option. With this you can count the current copy of the row. This is needed for the condition. Last but not least you need before each row one String Append Heater to add more conditions to one field.
I think it shoud be clear after a look to the example, please have a look to the attachment.

Note: I used for each field one separate layer!

Attachment duplicate_csv_records.zip not found

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.

Please Log in or Create an account to join the conversation.

Time to create page: 0.357 seconds

other Languages


FlowHeater Home

de en


Privacy Statement

Copyright © 2009-2023 by FlowHeater GmbH.
All rights reserved.

Follow us on

twitter  facebook


 de en