Maintaining Surrogate key

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
das_nirmalya
Participant
Posts: 59
Joined: Thu Mar 20, 2008 12:11 am

Maintaining Surrogate key

Post by das_nirmalya »

Using NextkeyGen() to create and insert surrogate key in target table . Jobs are in schedule. But due to regular insert surrogate key value exceeding the column limit . So its not able to insert data in table.

What is the process should i use in project to refresh the surrogate key values keeping data consistency and integrity within the tables.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sounds like you should make your surrogate key columns larger in your tables. How are they defined now?
-craig

"You can never have too many knives" -- Logan Nine Fingers
das_nirmalya
Participant
Posts: 59
Joined: Thu Mar 20, 2008 12:11 am

Post by das_nirmalya »

chulett wrote:Sounds like you should make your surrogate key columns larger in your tables. How are they defined now? ...
Sure , its a process to overcome this issue. But i want a permanant solution like- it refresh all the surrogate key values , again re-generate it from starting
kris007
Charter Member
Charter Member
Posts: 1102
Joined: Tue Jan 24, 2006 5:38 pm
Location: Riverside, RI

Post by kris007 »

The permanent solution is to increase your column length.
again re-generate it from starting
That won't help you maintaining the integrity among the tables.
Last edited by kris007 on Wed Aug 11, 2010 12:25 pm, edited 1 time in total.
Kris

Where's the "Any" key?-Homer Simpson
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First define what you mean by "refreshing", generally rolling over a surrogate and starting to reuse them is not a good idea so I assume you mean something else.

ps. That really should be the permanent solution as well, properly sized key values should never overflow... unless we're talking about gi-nor-mous amounts of records here?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply