• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Work with loadno and Insert/Update tmssqloutput

#1 2011-06-10 10:17:17

mpa
Member
Company: Thinking Solutions
Registered: 2010-12-17
Posts: 257
Website

[resolved] Work with loadno and Insert/Update tmssqloutput

Tags: [mssql, output, update]

Hi,

I'm wondering how


I'm using a context variable for the LoadNo and i'm assigning it in a tMap component to my LoadNo column.

Job looks like:
tFileInputDelimited ==> Tmap ==> TmssqlOutput

The problem is that every record is getting updated and getting the last LoadNo because he thinks the row has changed because the LoadNo column is always getting the last LoadNo.

Is it possible to only update my LoadNo column if one of the other columns changes?

I tried using field options and disable LoadNo from updateable but then it never gets updated.


Anyone know a solution for this?


Regards,
Mario De Pauw

Offline

#2 2011-06-10 16:10:44

JohnGarrettMartin
Member
Registered: 2009-01-07
Posts: 762

Re: [resolved] Work with loadno and Insert/Update tmssqloutput

Please take a look at the screenshots below.

The idea is that you "fake out" the SCD logic using some inner joins. To do so, you join your output table to your input data. rows that do not join have either changed or are all together new, and rows that do join have not changed.

you then use a second join to decide if the (inner join rejects) changed/new rows are updates or inserts.


Uploaded Images

Offline

#3 2011-06-10 17:25:50

mpa
Member
Company: Thinking Solutions
Registered: 2010-12-17
Posts: 257
Website

Re: [resolved] Work with loadno and Insert/Update tmssqloutput

Thanks! I'll give it a try!

Offline

#4 2011-06-15 15:38:38

mpa
Member
Company: Thinking Solutions
Registered: 2010-12-17
Posts: 257
Website

Re: [resolved] Work with loadno and Insert/Update tmssqloutput

Your solution works perfectly! Thanks a lot!!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Work with loadno and Insert/Update tmssqloutput

Board footer

Powered by FluxBB