Many of us asking how to incorporate Data Migrator with Oracle Sequence Generator when loading Fact Tables.
This will be fully supported in DM 7.7, but meanwhile, here is one way that will help you.
Make the Surrogate_Key field of the Fact table in the Metadata "Read Only". You will ignore this field in the target transformation.
Create an Oracle Seq Generator for this field;
CREATE SEQUENCE seq_name INCREMENT BY 5 START WITH 10 ;
Create an INSERT trigger on the Fact table;
CREATE OR REPLACE
TRIGGER trigger_name BEFORE INSERT ON fact_table_name
FOR EACH ROW
seq_name.NETXVAL INTO :NEW."surrogate_key_col_name" FROM DUAL; END;
This is very similar to Microsoft Sql Server IDENTETY field type, when the database engine automatically updates the field of new records with a new sequence number.This message has been edited. Last edited by: Kerry,
iWay Data Migrator 7.6.8
Thanks a lot for sharing the info with all.
Focal Point Moderator
Information Builders, Inc.
|Powered by Social Strata|