Hello!! Knime expert
I am facing following issue, please guide to resolve…
Input:
table-1
combine string
789
790
791
792
793
794
795
1
0
0
0
Upward
downward
0
upward
2
Upward
0
Upward
0
downward
upward
0
3
0
0
downward
downward
downward
upward
0
4
0
0
upward
downward
0
upward
downward
5
Downward
Upward
0
0
0
upward
downward
6
0
Upward
0
0
0
0
0
Table-2
combine string
789
790
791
792
793
794
795
1
0
0
0
Upward
downward
0
upward
2
Upward
0
Upward
0
upward
downward
0
3
0
0
upward
downward
downward
upward
0
4
0
0
upward
upward
0
upward
upward
5
upward
Upward
0
0
0
upward
downward
6
0
0
0
0
0
0
0
Requirement:
Compare Table-1 with Table-2
And give Output As “True” if cell are matching, and “false” where cells are not matching
Output Required:
combine string
789
790
791
792
793
794
795
1
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
2
TRUE
TRUE
TRUE
TRUE
FALSE
FALSE
TRUE
3
TRUE
TRUE
FALSE
TRUE
TRUE
TRUE
TRUE
4
TRUE
TRUE
TRUE
FALSE
TRUE
TRUE
FALSE
5
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
TRUE
6
TRUE
FALSE
TRUE
TRUE
TRUE
TRUE
TRUE
@armingrudd @ipazin @HansS @SimonS
Please Guide.
tommy
May 22, 2020, 8:57am
2
Hi @ravi13 ,
I would start with concatenate followed by group by.
Unfortunately you have to loop afterwards in order to transform 1/2 to false/true. Is there a way without loop?
see here:
Hope this helps, Tommy
you can join these two table base on combine string and then use rule engine node and compare two column
for example:
$789$ = $789 (#1 )$ => TRUE
FALSE
And you can use column list loop start to avoid writing rules for each column
2 Likes
Hi there @ravi13 ,
check here how you can deal with this:
Hi Everyone,
I am using the workflow “Compare Two Tables”. I have 50 columns, but when the flow compares the columns, it compares “column 1” not only to “column 1” but also to column 11, 12, 13 etc.
How can I change this in the workflow so it only compares two the same columns (so only column 1 with column 1, and column 11 to column 11)?
Any help is much appreciated, thanks!
Please refrain from mentioning specific people who have not been involved in this or any other discussion around this topic. Thank you!
Br,
Ivan
4 Likes
Ok!!
@ipazin will take care from next time.
1 Like
Hi!! @Vossoughi_h
Firstly sorry for late reply.
I am facing following issue…
As i have done transpose, I am not able to use rule engine node…because Column is not define whether it’s String or Number
Please guise.
Hi @ravi13 ,
you can use Column Auto Type Cast which will probably convert all column into string in your case. Then you can either work with strings either use String To Number node.
Br,
Ivan
1 Like
system
Closed
November 24, 2020, 1:20am
8
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.