Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to do a search on one column, and if the field matches a pattern or value, then a different column in the row gets a value.
What is the proper way to do this?
check tReplaceList make 2 inputs from the same file
This seems like a brutal workaround, why doesn't replace offer separate lookup/replace columns?
I'm also completely unsure how you propose I use treplacelist, what do you mean two inputs?
there are many ways could help to achieve the same result, you task - check and choose the best for you (especially when you did not share all information 😉 )
but all of them as described require self-join - multiple use the same table as different source and join them
it could be tMap with main flow and 1-* lookup inputs, it could be tReplaceList, in all cases - as you describe you want to search not in the same row, but in all rows from a different column, so you will need for each row from main flow make a lookup for all rows from lookup columns
Woah, not all rows, the other column is known beforehand and will be in the same row.
Don't need to search all rows, the other column is known beforehand and will be checking a field in the same row.
Given example:
column_1, column_2, column_3 AAA, BBB, CCC AAA. BBB, CCC AAB, BBB, CCC
So for each row, if column_1 = "AAA", then column_3 = "DDD", The expected output would be:
column_1, column_2, column_3 AAA, BBB, DDD AAA. BBB, DDD AAB, BBB, CCC
Hi,
if all in same row, it is simple:
in tMap in col3 put
col1.equals("AAA")?"DDD":col3
Not a bad option, I've used one just like that prior, but is there any way to handle a large amount of them?