SCD IKM issues
765132May 10 2010 — edited May 11 2010Hi
I'm trying to use the Oracle SCD IKM in an easy example. So I have a source table named "clients" and a target named "dim_clients". My columns are :
For clients : ID_CLIENTS, NAME, CITY and I have a PK on ID.
For dim_clients : ID_DIM_CLIENTS, ID_OLD, NAME, CITY, START, END, FLAG and PK on ID_DIM_CLIENTS.
In the options of my target table columns, I set :
ID_DIM_CLIENTS as surrogate key
ID_OLD as natural key
NAME as update if modify
CITY as new row if modify
START as start timestamp
END as end timestamp
FLAF as flag
In my interface, I mapped :
ID_OLD with ID_CLIENTS
NAME with NAME
CITY with CITY
START with "sysdate" on staging area
ID_DIM_CLIENTS with sequence.nextval
My LKM is SQL to Oracle, my IKM Oracle SCD (All KM otpions are default) and my CKM is Oracle
When it is the first run, all row are inserted : OK
If I update the NAME column, my target row is updated too : OK
But when I update the CITY column, there is nothing on my target row (no insert, no update)
Moreover, if I changed the SCD options of my targer table columns as : NAME and CITY as update if modify or insert if modify, an error occured :
First case, step 20 "Flag rows for update" : 920 : 42000 : java.sql.SQLException: ORA-00920 : relationnal operator not valid
-----
update WORK_DEV.I$_DIM_CLIENTS S
set S.IND_UPDATE = 'U'
where (S.ID_OLD)
in (
select T.ID_OLD
from ESIAL.DIM_CLIENTS T
where *>>>>>>>>>>>>> WHERE IS EMPTY*
and T.FLAG = 1
and END = to_date ('01-01-2400', 'mm-dd-yyyy')
)
-----
Second case, step 21 "Update existing rows" : 1747 : 42000 : java.sql.SQLException: ORA-01747 : column specification not valid
-----
update ESIAL.DIM_CLIENTS T
set (
) = (
select
from WORK_DEV.I$_DIM_CLIENTS X
where X.ID_OLD = T.ID_OLD
and X.IND_UPDATE = 'U'
)
where (T.ID_OLD)
in (
select S.ID_OLD
from WORK_DEV.I$_DIM_CLIENTS S
where S.IND_UPDATE = 'U'
) *>>>>>>>>>>> I think the "in" is empty*
and T.FLAG = 1
and DATE_MODIF = to_date ('01-01-2400', 'mm-dd-yyyy')
-----
If anyone can help me or give me a link to a great working tutorial, I'll enjoy :)
Thanks