Search found 7 matches

by shawn_2008
Fri Feb 29, 2008 3:05 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Upsert without a Unique Constraint on DB2 Table
Replies: 1
Views: 734

Upsert without a Unique Constraint on DB2 Table

Hello, I have a Parallel job that reads from a sequential file and does an "Upsert" on a DB2 table based on user-defined sql. The upsert is done on a column which is not part of the primary key. Because of the way the table is partitioned, creating a unique constraint (index) on this colum...
by shawn_2008
Fri Feb 29, 2008 11:36 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Error While Using DB2 Sequence for Surrogate Key
Replies: 10
Views: 4258

Stefan, Your explanation makes perfect sense ! Thank You.
It clears up a number of questions that I had about surrogate key handling.
by shawn_2008
Thu Feb 28, 2008 6:45 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Error While Using DB2 Sequence for Surrogate Key
Replies: 10
Views: 4258

Got it to work finally after three cans of Red Bull and couple of hours of grappling with a slow server... :D :D :D I changed the following setting and the job is running like a charm ! In the DB2/UDB Enterprise Stage, changed STAGE-->ADVANCED-->EXECUTION MODE to "Sequential" , the default...
by shawn_2008
Thu Feb 28, 2008 5:48 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Error While Using DB2 Sequence for Surrogate Key
Replies: 10
Views: 4258

ArndW, Thanks for the response. No, I checked the job thoroughly and I can confirm that I am not using TSNO anywhere else. But, Here's an interesting thing : When I used a DB2/UDB API stage for the table, the job works fine - I was able to insert records based on the sequence. ( all other jobs at ou...
by shawn_2008
Thu Feb 28, 2008 9:16 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Error While Using DB2 Sequence for Surrogate Key
Replies: 10
Views: 4258

Andrw, I am using the following "user defined" insert statement : INSERT INTO TEST_ACCOUNT_LIST (TSNO, TS, TSNOTE) VALUES (NEXTVAL FOR ACC_SEQ, ORCHESTRATE.TS, ORCHESTRATE.TSNOTE) I know for sure, i must be doing something really stupid :x What I am trying to achieve here is : 1) Read a se...
by shawn_2008
Thu Feb 28, 2008 8:38 am
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Error While Using DB2 Sequence for Surrogate Key
Replies: 10
Views: 4258

Ray, Thanks for the information. I removed the column names from the grid, but get a different error message : main_program: Missing field: TSNO in the input dataset. the job structure is : [sequential-file] ---> [transformer]--->db2-table sequential-file structure ( csv) : TS, TSNOTE db2-table-stru...
by shawn_2008
Wed Feb 27, 2008 10:13 pm
Forum: IBM<sup>®</sup> DataStage Enterprise Edition (Formerly Parallel Extender/PX)
Topic: Error While Using DB2 Sequence for Surrogate Key
Replies: 10
Views: 4258

Error While Using DB2 Sequence for Surrogate Key

Hello, I am trying to generate surrogate keys using a DB2 sequence, but keep getting an error. The user-defined-SQL in the DB2/UDB Enterprise stage is : INSERT INTO TEST_ACCOUNT_LIST (TSNO, TS, TSNOTE) VALUES (NEXTVAL FOR ACC_SEQ, ORCHESTRATE.TS, ORCHESTRATE.TSNOTE) and the Error Message is : test_a...