FlowHeater Demo Video
 
FlowHeater - The Data Import / Export Specialist
 
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Produce 2 output rows from 1 input row

Produce 2 output rows from 1 input row 5 years 6 months ago #2283

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 or Create an account to join the conversation.

Re:Produce 2 output rows from 1 input row 5 years 6 months ago #2284

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 or Create an account to join the conversation.

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.
  • Page:
  • 1

other Languages

en
GB | US

de
DE | AT | CH

FlowHeater Home

de en

Imprint/Contact

Privacy Statement

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

Follow us on

twitter  facebook

YouTube

 de en