Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a file with 10 values..based on the different parameters i filter out the file to one value..now i have to pass the values to a db and create a flag...i dont have common id in file and database..its just based on the values from file i have create a if condition with database rows and create a flag ...
Eg.
My file has values
Row1 A
Row 2 B
row 3 C
Database
row 1 A
Row 2 B
Row 3
Now i have to create a condition
If file.row1 equals to db.row1 or file.row2 equals db.row2 then flag equals Y
How to achieve this..
Hi
Add a sequence id for each row after reading data from file and DB, the expression to generate a sequence id is:
Numeric.sequence("file",1,1)
and for DB is:
Numeric.sequence("DB",1,1)
and then do an inner join based on the sequence id on tMap
In the output table, add a new column let's call it flag, set its expression like:
row1.columnName.equals(row2.columnName)?"Y":"N"
Hope it helps!
Regards
Shong
Hi
Add a sequence id for each row after reading data from file and DB, the expression to generate a sequence id is:
Numeric.sequence("file",1,1)
and for DB is:
Numeric.sequence("DB",1,1)
and then do an inner join based on the sequence id on tMap
In the output table, add a new column let's call it flag, set its expression like:
row1.columnName.equals(row2.columnName)?"Y":"N"
Hope it helps!
Regards
Shong
Thank u..this helps 👍👍