- Posts: 27
Add a record to each record of the 'write' side
- Gennaro
- Topic Author
- Offline
- User
Less
More
12 years 8 months ago #2215
by Gennaro
Add a record to each record of the 'write' side was created by Gennaro
hi,
i'd need to add the same record to each record on the wite side.
for example, on the read side i have the following data:
code amount date
2333 23,3 2011
2333 22,3 2010
2300 28,4 2011
2300 25,3 2011
2300 20,8 2010
2333 22,0 2011
the (fixed) record to add on the wite side is:
code company notes
2999 abc bde
so, i wuould get an ouput file or table like:
is there a way to make it with flowheater?
thanks!
i'd need to add the same record to each record on the wite side.
for example, on the read side i have the following data:
code amount date
2333 23,3 2011
2333 22,3 2010
2300 28,4 2011
2300 25,3 2011
2300 20,8 2010
2333 22,0 2011
the (fixed) record to add on the wite side is:
code company notes
2999 abc bde
so, i wuould get an ouput file or table like:
is there a way to make it with flowheater?
thanks!
Attachments:
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
12 years 8 months ago #2218
by FlowHeater-Team
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.
Replied by FlowHeater-Team on topic Re:Add a record to each record of the 'write' side
Hi Gennaro,
To make copies from some rows you have to use the GroupOut Heater. Furthermore you need for each field one IF-THEN-ELSE Heater to decide which content you want to move to the WRITE side.
I guess in your case you want only copy rows per each group (CODE Field)? For this you need a little script to do this. The script decides on the CODE Field if the GroupOut Heater has to copy this row.
Then you need one AutoID Heater with activated GroupOut option for the IF-THEN-ELSE Heater condition. The AutoID Heater counts from 1 to … for each (copied) group.
If the AutoID Heater returns 1 the static header line is presented otherwise the data from the (CSV) text file are presented.
Please have a look to the brief example in the attachment.
To make copies from some rows you have to use the GroupOut Heater. Furthermore you need for each field one IF-THEN-ELSE Heater to decide which content you want to move to the WRITE side.
I guess in your case you want only copy rows per each group (CODE Field)? For this you need a little script to do this. The script decides on the CODE Field if the GroupOut Heater has to copy this row.
Then you need one AutoID Heater with activated GroupOut option for the IF-THEN-ELSE Heater condition. The AutoID Heater counts from 1 to … for each (copied) group.
If the AutoID Heater returns 1 the static header line is presented otherwise the data from the (CSV) text file are presented.
Please have a look to the brief example in the attachment.
Attachment groupout_copy_input_rows.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.
Time to create page: 0.256 seconds