Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
My requirement is as below,
1. Do the validation like validation 1 (Table A Inner Join Table B). Capture inner join reject and if inner join reject record count is greater than zero then capture a validation error message as "Validation 1 Failure" using tWarn_1.
2. Do the validation like validation 2 (Table B Inner Join Table A). Capture inner join reject and if inner join reject record count is greater than zero then capture a validation error message as "Validation 2 Failure" using tWarn_2.
3. If both the above validation are trigger then i want to concatenate the error message of tWarn_1 & tWarn_2 and my error message should be "Validation 1 is failure; Validation 2 Failure"
Could anyone help me on this
Hi,
You can try to do it in following steps.
a) Using a tMap, perform inner join. In the output of tMap, add the condition to capture inner join rejects.
You can take the count of this result set coming out of tMap and if it is more than zero, you can issue tWarn.
Since its an inner join, the result set is same. So I am not understanding why you need to do two types of validations for same result set error.
Hope you got the clue to move forward in your case.
Warm Regards,
Nikhil Thampi
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 🙂
Thank you Nikhil,
I did the exactly same already for Validation 1 and insert a record in my error log table. Also did the same for 2nd validation and this also inserting another record in my error log table. But my concern is I do not want to insert 2 records instead should insert 1 record only.
The 2 types of validations are,
We have 10 tables in our source system, but we need to ingest only 5 tables and In those 5 we do not want to ingest all the columns only specific columns. So we are maintaining the list of required tables and columns of the table in a csv file.
Before extracting data from table we need to validate, any columns exist in the CSV file is also exist in actual table or not (validation-1). If not exist insert a record in error_log table.
Another validation is columns exist in actual table is also exist in the CSV file or not (validation). If not exist insert a record in error_log table with warning status. If any table has both above validation failure, then i should insert only one record instead of 2 records.
I agree with @dgm01 . You should use temporary tables to hold the interim data till all your validations are complete.
Then you can push the data to final table based on validation errors.
Warm Regards,
Nikhil Thampi
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 🙂