# Compare all values of all columns and if One value is repeated, the value in the new column created will be "1"

#12

Hi!

In group by node in each loop iteration you need different Row. So first time it is Row0, then Row1, Row2ā¦
You will get this by controlling aggregation column name with flow variable. When you use this loop there is automatically created flow variable currentColumnName with name of current column in loop. Use it.

In Rule engine node if you use TRUE => 1 you will add (or replace depending on node configuration) column with all 1s. This way you can use TRUE => āflow variable nameā that holds number of rows.

Br,
Ivan

#13

Hi !

Can you explain your logic because here we compare numbers and I need to compare ( String) because all columns there type is String.
And what I should do in the first 'Rule EngineāNode ,

I donāt understand how to add numbers ?? because here for the first time I have āRow0ā ( I know that the loop will treat for each iteration)

it a little bit hard for me to understand this because is the first time for me that iām using these concepts.

Thank you again.
Bests Regards.

#14

Hi!

My idea is to compare number of unique values in row with total number of values in that row so it doesnāt matter if you have numeric or string values. If the number is same then all values in that row are unique so you will put 0. Else you put 1 because there is less unique values then the total number of values in row meaning you have one or more values repeated.

In this Rule engine node you add following rule:
TRUE => Number of Rows (double click from Flow Variable list)

Br,
Ivan

#15

Hi again !

I will have to come back to you on that again ,

1- I havenāt finshed the workflow yet, and I wanted to test the Loop operation. I get that Error in the Group By :

How I can fix it, Sorry for annoying you !, but iām new in tha manipulation of flow variables.
2- for the column expressions, I havenāt find it even I upgrate the version to knime 3.6.

Thank you .
Bestes Regards.

#16

Hi @TIZIZ -

To get the Column Expressions node, you have to install the KNIME Expressions extension, shown here:

#17

No problem. You should go through some tutorials regarding Knime. That is good (mandatory) for start. Then creating workflows will be easier and more fun

Here is a one for flow variables. Flow variables are controlled on flow variables tab

https://www.knime.com/knime-introductory-course/chapter7/section1/creation-and-usage-of-flow-variables

Br,
Ivan

#18

Hi ScottF,

After upgrading to knime 3.6, I wanted to add the extensions of āKnime Expressionsā and I get this Error:

PS: I donāt have the probleme of Firwall.
How I can fix it Please!
@ipazin wish one of Attribute that i have to add the CurrentColumnName variable in these parametrs:

And what is the goal of using the Column expressions and how to parameter it ?
Thank you very much for helping me, really I need your support !
Best Regards !

#19

Hi @TIZIZ!

Click a little bit and you will find it

As you are doing manual aggregations then it is under aggregationColumn --> columnNames

Here 0 represents first column or in your case only column you have added on Manual Aggregation tab.

Regarding column expressions node it is used only to calculate difference and you do not have to use flow variables here. You just subtract two columns. But first install this node, read its description and you can use Knime NodePit (https://nodepit.com/category/) to find example workflows with it

Br,
Ivan

#20

Hi @ipazin,

is this the configuration that I have to do in ā0ā attribut !!! :

Thank you again !
Br.

#21

Yes
Ivan

#22

Thank you very much for your help!

Here Iām using the column expressions, I choose the function āequalsā , and I it seems not the right one :

what do you think ?.

Br.

#23

You can use column(0) which is the first column and column(1) which is the second column and calculate difference with minus operator.

#24

thatās what I have tried too but the expressions seems not the right one !!!

:ā(
And how the names of columns will changes for each iteration with loop ( Row0,Row1,Row3,ā¦) even Iām not using in this node the flow variable ?!!
Br.

#25

As I said you should use column(0) and column(1)ā¦
Ivan

#29

heey @ipazin,

I could solve the probleme thank you !

now I have a problĆØme in the Loop End, and the error is the console is :

may be the probleme is in the second rule Engine node that I configurate in that way :

Have I configurate the flow variable again in this Node ?!! How to do this please !
may you help be in this ? may be is the last question ! I donāt want to give up because itās so urgent for me to resolve this !

thank you .

BR.

#30

Have you used column filter node to leave only column result?
This error means you have different column types in different iterationsā¦
Ivan

#31

ooh yes sorry I forget it !!

In fact The loop End stop in the seconde iteration, and the error now is :

is that du to the seconde Role Engine Node because I have not configurate the flow variable in it , how to do that ?

Thank you VERY MUCH !

#32

This error means you have different column types in different iterationsā¦
Go iteration by iteration and see what is result from first iteration and what from second one.
Donāt think so it is due to second Rule engine.
Ivan

#33

Hi @ipazin,

Thank you very much for your help.and iām very grateful for you !

In fact ,In the beginning I had 996233 rows , with transpose node the loop have to treat then 996233 column to get if there a repeated value. And that taked a lot of time (more than 2 days).
Is there any Solution for make that more fast, because I have to work a lot with this workflow ! and present the result in a report data.
Thank you again.
Bests Regards
I wish you a very good day !

#34

Hi @TIZIZ!