row generator

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dmanish
Participant
Posts: 2
Joined: Tue Sep 19, 2006 4:23 am

row generator

Post by dmanish »

I have to populate test data in two tables EMP and DEPT.
Deptno is the FK in EMP table.

First I have populated 10 rows in DEPT table.
Initially Rowgenerator generated 10 rows in dept table with deptno from 0 to 10 and then I have updated deptno with deptno+10.

After that While generating the data in emp tables it gives error:
ORA-02291: integrity constraint

I have to populated many tables like that for test data generation.

Any sugegstion is much appreciated.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

how are you populating the EMP table, spcially what is the value you are passing to Deptno column, it must be range of 10-20;
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi,
This error is due to the key which does nt exists in the parent table. Check with the key your loading in the table. Next do a search in the forum,we have few posts discussed on this error.
After that While generating the data in emp tables it gives error:
ORA-02291: integrity constraint
dmanish
Participant
Posts: 2
Joined: Tue Sep 19, 2006 4:23 am

Post by dmanish »

keshav0307 wrote:how are you populating the EMP table, spcially what is the value you are passing to Deptno column, it must be range of 10-20;
I am using Row generator stage to populate the data in EMP table.

I have just two stage
Stage1: Row generator
Stage2: Oracle ( table EMP)

is it possible to pass any values for Deptno.
Whether Row generator takes car Fk constraints while populating the child table.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

Is it possible in Oracle to pass any value in FK column??
NO.
so how can you pass in Dstastage....


yes you can pass any value, if you have disabled the contrant in the Table...and before enabling the constrants in table, check what are the different values in the table for deptno column, insert all those values into the DEPT table...
Post Reply