• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » I just need a push to start things up!

#1 2008-03-04 21:24:50

javydreamercsw
Member
Registered: 2007-08-09
Posts: 83

I just need a push to start things up!

Tags: [error, mysql, tos2.3.1]

Here's what I want to do:

There's a list of product codes I get from a DB2 database and I want to populate a dimension with that data. So basically I make a query to get the product list, pass it thru a filter (to get out garbage data) and enter it to a tMap. This is working fine.

I'm trying to make the tMap compare the incoming list with the records currently in the dimension table so the new ones are added to the dimension.  Also pass the next key for new items (select (case when max(product_key)+1 is null then 1 else max(product_key)+1 end) newKey from product) which gets 1 if the dimension is empty or the next key otherwise.

Is this the correct approach? I'm totally wrong?

Help is really appreciated!


Uploaded Images

Offline

#2 2008-05-16 15:20:33

SMaz
Member
Registered: 2008-04-21
Posts: 186
Website

Re: I just need a push to start things up!

There are some SCD (Slowly Changing Dimension) components.  I haven't looked into these too much.  But, it looks like you want some sort of effective dating / tracking.  I believe that's what these do.

As for the key - I'd recommend (if you can) that you let DB2 do the working of tracking the next sequential key either via an insert trigger or define that column as an identity column.  Something like this in the DDL:

"YourColumnName" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY ( 
            START WITH +1 
            INCREMENT BY +1 
            MINVALUE +1 
            MAXVALUE +9000000 
            NO CYCLE 
            CACHE 20 
            NO ORDER )

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » I just need a push to start things up!

Board footer

Powered by FluxBB