Two output comparison

Highlighted
Six Stars

Two output comparison

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 ?

 


Accepted Solutions
Employee

Re: Two output comparison

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 :-)


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)

All Replies
Employee

Re: Two output comparison

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 :-)


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)
Employee

Re: Two output comparison

@arunshankar

 

     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 :-)

 

 


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.