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


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

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

 

 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads