Problem while connecting with oracle

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
sdasavi
Premium Member
Premium Member
Posts: 5
Joined: Wed Mar 09, 2011 4:36 am

Problem while connecting with oracle

Post by sdasavi »

Hi,

My job design is, two sequencial files (source). Target is oracle database. In between i added the change capture stage to record changes. The output is given to filter stage, by using change_code in filter three outputs are given to three modify stages (update, insert, delete). All the three are stotred to oracle database by using odbc connector. Whole process is done through run time propagation.

My problem is I am getting insert data to oracle, but the problem is with delete,update stages. And I am not having any primary keys from source files. Can anyone please solve this problem.
battaliou
Participant
Posts: 155
Joined: Mon Feb 24, 2003 7:28 am
Location: London
Contact:

Post by battaliou »

Define your primary keys in the output columns of your filter stage.
3NF: Every non-key attribute must provide a fact about the key, the whole key, and nothing but the key. So help me Codd.
sdasavi
Premium Member
Premium Member
Posts: 5
Joined: Wed Mar 09, 2011 4:36 am

Post by sdasavi »

battaliou wrote:Define your primary keys in the output columns of your filter stage.
Hi Battaliou,

The source files are sent by the client and there are no primary keys defined. Is there any way to solve the logic with out defining primary keys
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

As the Oracle table apparently has key columns defined, your data needs to have those columns defined as well. If they do not exist, or do not have the correct data, then you will be unable to update or delete existing records. It's just the way database processing works.

Determine from Oracle what the primary keys for the table are (ask your DBA if necessary). Then determine which columns on the source data will map to those columns, either directly or through a set of business rules. I would expect that information to be available somewhere, but you may just have to make a best guess.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply