Notes on Data Vault and Teradata. Posted on 2012/09/20; by Dan Linstedt; in Data Vault, DV Standards; in this entry i will explore the use of implementation of data vault on teradata. However, this entry is applicable to everyone in the data vault community, as it covers definitions and descriptions of primary keys, indexing, surrogate keys, natural keys, and performance and tuning. Nov 19, 2019 Teradata Identity Columns The advantage of an IDENTITY column is that a new surrogate key is generated by the system as soon as a row is inserted into the key table. However, it is important to define the IDENTITY column so that no duplicates are created. For this, the IDENTITY column must be defined with GENERATED. ➠ How to generate surrogate key in Teradata By using analytical functions By using CSUM analytical function, Syntax/Example 1: SELECT (SELECT ZEROIFNULL(MAX(empno)) FROM employee) + CSUM(1,1) AS surrogatekey1newempno,empno,empname from employee; Single AMP (usually vproc 0). Surrogate keys are typically arbitrary system-generated sequential integers. See “CREATE TABLE (Column Definition Clause)” in SQL Data Definition Language Detailed Topics for information about how to generate surrogate keys in Teradata Database. Rules for Primary Keys There are several rules that define the bounds of primary keys.