Diff from DB Tables

Four Stars

Diff from DB Tables

Hello everybody,

i have this problem.

I have two tables A,B.

Foreach record stored in A i need to check if it is already stored on table B. if it's true, I run a Job X otherwise I run a Job Y.

How can i do that?

Thanks.


Accepted Solutions
Forteen Stars

Re: Diff from DB Tables

t not possible to answer full - because I can not see, what are You doing in tMap, why it marked as error (red !)

 

but answer for Your original question:

Foreach record stored in A i need to check if it is already stored on table B. if it's true, I run a Job X otherwise I run a Job Y.

You must have 2 output from tMap
- matched

- rejected

 

each of components must be connected to tFlowToIterate and each of them to tRunJob

attache - samples, how tMap INNER JOIN work

 

Screen Shot 2017-08-23 at 1.06.21 PM.png

Screen Shot 2017-08-23 at 1.06.31 PM.png

 

as I understand Your picture, in Your case both connections inside tMap must be from Lar

-----------

All Replies
Forteen Stars

Re: Diff from DB Tables

You can use tMap with Inner Join

 

main flow from Table A

lookup flow from table B

Inner JOIN

both output flow inside tMap from Table A

1 matched, 1 rejected

from each output tFlowToIterate and tRunJob

-----------
Four Stars

Re: Diff from DB Tables

Forgive me, but I'm not so practical about Talend.

I have done the inner join but now I don't Know I can iterate each result and so go on with tRunJob.

As you can see from the image below, I don't know how to handle the tmap and TFlowToIterate.

 

How can I do what you have said?

Thanks

Forteen Stars

Re: Diff from DB Tables

t not possible to answer full - because I can not see, what are You doing in tMap, why it marked as error (red !)

 

but answer for Your original question:

Foreach record stored in A i need to check if it is already stored on table B. if it's true, I run a Job X otherwise I run a Job Y.

You must have 2 output from tMap
- matched

- rejected

 

each of components must be connected to tFlowToIterate and each of them to tRunJob

attache - samples, how tMap INNER JOIN work

 

Screen Shot 2017-08-23 at 1.06.21 PM.png

Screen Shot 2017-08-23 at 1.06.31 PM.png

 

as I understand Your picture, in Your case both connections inside tMap must be from Lar

-----------

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

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

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch