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

Repeat field if empty

More
9 years 1 month ago #2347 by Heinz
Repeat field if empty was created by Heinz
Hi there,

I have an input text file that has the following format (simplified for the question):

ID,F1,F2,F3
A,1,2,3
,3,4,5
,6,7,8
B,9,10,11
,12,13,14

The data is "grouped" by the ID field in the input (not sorted) and the blank ID field in a row means the data "belongs" to the last ID received. I want to generarte an output file with the ID in each row:


ID,F1,F2,F3
A,1,2,3
A,3,4,5
A,6,7,8
B,9,10,11
B,12,13,14

etc.

Hope this makes sense.

And on a related question - can I specify different filters for multiple output layers? You recently introduced the nice function of adding more than one write layer. But on the above example, I would want to generate 1 file for all the rows where ID is not blank and one file (in different format) with the details described in my question above.

i solve this for now by simply passing the file through 2 configs..

PS - as always, I am extremely happy with flowheater, its a great product!! Keep up the good work.

Heinz

Please Log in to join the conversation.

More
9 years 1 month ago #2348 by FlowHeater-Team
Replied by FlowHeater-Team on topic Repeat field if empty
Hello Heinz,

This can be done very easy with the power if FlowHeater Parameters and one IF-THEN-ELSE Condition .

The IF-THEN-ELSE Condition checks whether the field “ID” is empty or not. In case the field content is not empty the FlowHeater Parameter “tempID” will be overridden by using the Set Parameter Heater with the current content. In case the field is empty the last value of the FlowHeater Parameter “tempID” will be used the value are retrieved by Get Parameter Heater .

In the attachment you’ll find a simple example.

Remark: I used the Parameter name “tempID” just to demonstrate that Parameter names are different to the Field names. You could of course use “ID” for the Parameter name as well.

Your second question: Currently this is not possible, your mentioned solution is the only way to implement such filters. But this feature is of course planned for a further version.

File Attachment:

File Name: repeat-fie...mpty.zip
File Size:2 KB

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.309 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.