Unable to write to ODBC file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
jatz_da_way
Participant
Posts: 7
Joined: Wed Jan 26, 2005 11:38 am

Unable to write to ODBC file

Post by jatz_da_way »

HI Guys !!
I am a beginner to Datastage 6.0....
I am trying to do the tutorial that comes along with the Datastage. In Exercise 5 & 6, we are supposed to write some transformed data into the ODBC file... the job gets aborted when I run the job. :(

Whereas if I replace the ODBC with sequential, it runs fine & the data is written into the sequential file. I am unable to fix this prob. Any help wud be appreciated.

Regards,
Jatz
Last edited by jatz_da_way on Wed Jan 26, 2005 5:37 pm, edited 1 time in total.
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
What error message do you get?

Ketfos
jatz_da_way
Participant
Posts: 7
Joined: Wed Jan 26, 2005 11:38 am

Post by jatz_da_way »

Hi Ketfos
This is the error that I am getting from the log generated during the run :

example6..Transformer_1.DSLink5: DSD.BCIPut call to SQLExecute failed.
SQL statement:INSERT INTO SCOTT.FACTS(ORDERDATE, EMPNO, CUSTID, ORDID, PRODID, QTY, TOTALSALE, SHIPDATE) VALUES (?,?,?,?,?,?,?,?)
SQLSTATE=23000, DBMS.CODE=2291
[DataStage][SQL Client][ODBC][Microsoft][ODBC driver for Oracle][Oracle]ORA-02291: integrity constraint (SCOTT.FACTS_TIME_FK) violated - parent key not found

Regards,
Jatz
bryan
Participant
Posts: 91
Joined: Sat Feb 21, 2004 1:17 pm

Post by bryan »

The problem is with referential integrity

the column into which you are writing to is a foreign key and which is also is a primary key to someother table.

This is a database concept. Unless the value is present in Parent table, the value cannot be inserted into child table. This is for data integrity.

Ex: We cant insert any values for columns in fact table that are not primary keys in Dimension table.


OR

it can also be that you didnt enter a value for the primary column(key) of your table
Post Reply