Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Loading dimension from an ODS table with insert/update doesn't work !

Hello folks, I am gonna need your help over here!  I am using Talend open studio Version: 6.3.0 and I am trying to load a dimension (cnamDIM) from an ODS table (cnamODS) using the Insert/update method. 

I have created 2 variables in my t_map component:

-The first variable will check if the CodeCNAM (Unique attribute) already exists in cnamDim. If it doesn't exists , talend will insert the inside row into cnamDim table.

-The second variable will check if the CodeCNAM already exists and that the value of the column "Contact" had been changed or not compared to the one that already exists cnamDim. In this case , talend will update Contact column with it's new value.

 

Here is the issue, in the case the CodeCnam dosn't exists, the job is inserting new data inside cnamDim table. Unfortunatly in the case that CodeCNAM already exists in cnamDim , talend do ,not update the contact collumn with it's new value once changed into the cnamODS table.

You can find bellow screenshots of my job configuration. 

Thanks for your help in advance !

0683p000009Ltsn.png0683p000009Ltnl.png0683p000009Ltoq.png0683p000009LtwZ.png0683p000009LtiK.png0683p000009LtSO.png0683p000009Ltwe.png0683p000009LtQM.png0683p000009Ltwt.png0683p000009Ltx8.png

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hello
Do a left outer join, change the expression of variable1 to :
row2.Contact==null?false:true
// if row2.Contact is null, means the CodeCNAM does not exist in cnamDim table, otherwise, it exists.
change the expression of variable2 to:
Var.Existe==true&&!row1.Contact.equals(row2.Contact)?true:false


Regards
Shong