You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
I have a small scenario where i want to fetch values from a lookup table.
I have gone through some previous posts here to find a solution but could not find one.
So the scenario is :
I have 2 tables src and tgt
when i insert data into tgt from src i want to check if that particular value already exists in the tgt or not .If the value exists in the tgt then i would not insert the src row into the tgt else i will insert into tgt.
For this i thought i could use a left outer join and check if the value that i have got from lookup table is null or not if it is null then value does not exists in tgt else it exists.
How can i achieve this ?
Please help !
Offline

Hi i did what u said.
And it seemed fine to be working for the first time.
e.g
When i ran for the first time :
tgt table had no rows so all rows from src got inserted into tgt.Which even reflected in the DB
Now from DB i deleted the table as in delete from src
Now again i ran the mapping and this time it did not insert any rows .
So i checked the tOracleInput(which i have for tgt to lookup) here when i fire the Query and check it shows all the rows which i had deleted from DB.
Why is that not getting reflected when i run the components again ???
Offline

i m trying to post the pics .But the pics are not getting uploaded.Do not understand the reason.
i committed it to the database.
tgt
|
|
src----->tMap-->tgt-->tOracleCommit
Here,i will try again
Last edited by vital_parsley (2011-12-19 16:33:05)
Offline

Hi,
I m attching my job and tMap view in 2 pics
Last edited by vital_parsley (2011-12-19 16:44:25)
Offline

Here even though there is no data in the tgt still when i check the tOracleInput(GRADE_CODE_MAP) and execute Query in Talend SQLBuilder i get rows that i had already deleted from DB.
The Query Type here is Built-In
Offline

vital_parsley wrote:
Hi i did what u said.
So i checked the tOracleInput(which i have for tgt to lookup) here when i fire the Query and check it shows all the rows which i had deleted from DB.
Why is that not getting reflected when i run the components again ???
Did you commit the change after doing the delete? The rows can't magically reappear in your table.
Offline

i know that theres no magic!
I m just asking if u can figure out from the pictures what i m doing wrong.I think in the job it shows i m using a tOracleCommit to commit chnages.If that is how a commit is done.
What Query type should be kept ? built - In or Repository ?
Please let me know if any other pics u want me to post to figure out the problem.
Offline

How to commit the connection ??
I have an tOracleCommit but the Component List is empty ?
I have connected the tOracleCommit to tgt using On Component OK
Offline

Ok.Thanx for all the help !Appreciate it
I have got it sorted out.
But i would like to know how to commit a transaction ?
Because when i run the job i see rows passed on to the tgt but when i check it in DB i dont see the rows inserted.
So,how do i commit ?
Offline

fINE WILL DO THAT.tHANX FOR UR REPLY.
Offline
Pages: 1