Archives of the TeradataForum
Message Posted: Tue, 09 Jul 2002 @ 15:47:16 GMT
This may be off-topic (or it may be a dumb idea from the uneducated Peanut Gallery), but doesn't Teradata already generate a unique surrogate called ROWID that accomplishes exactly what you want? (unique identification of a row)
To guarantee uniqueness across all batch load cycles, you could prepend either MAX(ROWID) from PROD or a unique ROWID per batch cycle (a simple BatchID table with integers 1 to 1,000,000 or whatever )
I guess what I'm suggesting is Fastload to a table unique on your multi-part natural key and let Teradata generate ROWID. Then, INSERT- SELECT to your production target using BatchROWID || ROWID as your Unique Primary Index.
I'm prepared to be roasted for this idea, so fire away!
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|