Hello community !
I have 5 files that have the same schema and I want to check then:
If field1 = "a" && field2 = "b" => copy the files to dest1
If field1! = "a" && field2! = "b" => copy the files to dest2
But a problem appears during the execution
When you are reading the columns, you need to do Null check also. The empty strings from an input file will be converted as Null. So you need to check the Null relational check also as shown below.
The above statement will pass null if the input is null else it will pass actual data. You need to do similar null checks before doing matching or add additional null matching logic in if condition.
Also in 4.png, you are trying to match two different strings in both sides. If you want the output of tFlowtoIterate, please give Control+Space and it will show the available variables. You need to select them and then do the matching.
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Find out how to migrate from one database to another using the Dynamic schema