Add a tag to a data field

Hi Everyone,

What would be the best method to perform the operation on the capture below?

field_double_value.txt (524 Bytes)

In my text file, there are several fields that have the same name, I would like to add an indicator when this field appears a second time.
example:
ipAddress (first occurrence)
ipAddress 'second occurrence) => ipAddress_1

Note that this procedure is to be adapted per group.

Thank you for your comments.

Hello @stef_pf,

use Counter Generation followed by Rank node where grouping attributes are group and filed columns while Ordinal raning is done ascending on Counter column.

Does this also solves issue from this topic?

Br,
Ivan

Hello Ipazin,

Thank you for your answer, I am still a beginner in Knime, is this the way to configure the nodes?

Br,
Stef
Field_Tag.knwf (22.1 KB)

You could try using RowID, twice. First time, use it to replace the current row IDs with the contents of the column containing your field, and make sure you check the option to generate unique IDs. In the second node, use it to store the row IDs in a new column

Steve

2 Likes

Hello @stef_pf,

group identifier needs to be in separate column. Check out workflow example:
Field_Tag_ipazin.knwf (58.7 KB)
Now Pivoting works as expected.

Nice idea Steve :wink:

Br,
Ivan

2 Likes

Hi ipazin, Steve

It’s the expected result, I just have to convert it into metanode in my main workflow.
The forum is very responsive, thank you very much.
BR,
Stef

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.