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

Five Stars

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 !

1.png2.png3.png4.png5.png6.png7.png8.png9.png10.png

Community Manager

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

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

----------------------------------------------------------
Talend | Data Agility for Modern Business

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

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch