Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Flowheater Download

Produce 2 output rows from 1 input row

More
10 years 9 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:
OUTPUTROW1: TRXTYPE-A,F1,F2

I woudl now want to generate additional output rows:

OUTPUTROW2: TRXTYPE-B,F3,F4

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 to join the conversation.

More
10 years 9 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.
Attachments:

Please Log in to join the conversation.

Time to create page: 0.311 seconds

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Rechtliches

Support & Contact

Kontaktinformation

Telefon:0951 / 99339792 E-Mail:This email address is being protected from spambots. You need JavaScript enabled to view it.

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