Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have data from file and data from DB.
Schema of File :
column_name|datatype
==================
date|datetime
name|String
Salary|Float
da|Float
Schema of DB:
column_name|datatype
==================
date_joining|datetime
fullname|String
sal|Float
da_value|Float
I want to get all rows from DB having same "date" in both DB and File, same "name" in both DB and File and same "salary" in both DB and file and store the success output in a file and also rejected rows in another file.
Can I please know on how to achieve that ?
Hi,
You will have to read the data from bot DB and file and pass the data to a tMap.
In the tMap you need to join them using the name, date and salary columns. The trick is that you will have to use inner join in tMap so that any records which do not have matching condition can be send to different output flow.
In the output section of the tmap, you can create two flows, one for success and other for failure. In the failure flow, please make sure to change Catch inner join reject value as true. This will pick only the rejected records of join.
If you are still facing any issues, I would suggest you to add screens shots of your job flow with sample data for both DB and file + error details. We can take it from there.
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 🙂
Hi,
You will have to read the data from bot DB and file and pass the data to a tMap.
In the tMap you need to join them using the name, date and salary columns. The trick is that you will have to use inner join in tMap so that any records which do not have matching condition can be send to different output flow.
In the output section of the tmap, you can create two flows, one for success and other for failure. In the failure flow, please make sure to change Catch inner join reject value as true. This will pick only the rejected records of join.
If you are still facing any issues, I would suggest you to add screens shots of your job flow with sample data for both DB and file + error details. We can take it from there.
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 🙂
Did the details helped to resolve your query? If yes, please mark the topic as answered.
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 🙂