Teradata allows for specifying a PRIMARY INDEX in the create table DDL statement. This primary index can be different then the primary key and needs to be scripted in the table statement. Currently we are not correctly extracting and scripting the primary index information. Example:
CREATE TABLE TEST_PKPI ( PI_COL1 INTEGER NOT NULL, PK_COL2 INTEGER NOT NULL, PU_COL3 INTEGER NOT NULL, PU_COL4 INTEGER NOT NULL, PU_COL5 INTEGER NOT NULL, PRIMARY KEY (PK_COL2) ) UNIQUE PRIMARY INDEX _ads_index_01 (PI_COL1, PU_COL5) GO ALTER TABLE TEST_PKPI ADD CONSTRAINT _ADS_UKEY_IVAN UNIQUE (PU_COL3) GO CREATE INDEX TEST_PKPI_IDX_01("PU_COL5") ON "TEST_PKPI" GO CREATE INDEX TEST_PKPI_IDX_02("PU_COL3", "PU_COL4", "PU_COL5") ON "TEST_PKPI" GO
The UNIQUE PRIMARY INDEX _ads_index_01 on columns PI_COL1 and PU_COL5 needs to be extracted and scripted with the table ddl statement and not as a index object. There is no support for a CREATE PRIMARY INDEX statement, instead this information must be provided in the create table statement or modified through the atler table statment.
|
95 KB
|
132 KB
|
158 KB
|
180 KB
|
142 KB
![]() |
1 KB
|
163 KB
|
273 KB
|
116 KB
|
478 KB
|
554 KB
Create table will now have the following options in the storage tab for teradata 13+ under the General section:
[Primary Index Columns] : If columns are selected, this option will build the primary index column string list.
[Unique Primary Index] : If set on and primary index columns are selected, this will set the UNIQUE flag for the primary index.
Both of these options are only enabled when the [No Primay Index] option is set off.
GUI is also available in ERM. The primary index will not be displayed in the ERM index node though, even though the primary index will continue to display in the schema tree index node.
Committed revision: 53540
Create table will now have the following options in the storage tab for teradata 13+ under the General section:
[Primary Index Columns] : If columns are selected, this option will build the primary index column string list.
[Unique Primary Index] : If set on and primary index columns are selected, this will set the UNIQUE flag for the primary index.
Both of these options are only enabled when the [No Primay Index] option is set off.
GUI is also available in ERM. The primary index will not be displayed in the ERM index node though, even though the primary index will continue to display in the schema tree index node.
Committed revision: 53540
Verified in ADS-18.0.4-6
As per Ivan's comment "Primary Index Columns" and "Unique Primary Index" option are available in Create table GUI->Storage->General and ERM
Please refer screenshot
Verified in ADS-18.0.4-6
As per Ivan's comment "Primary Index Columns" and "Unique Primary Index" option are available in Create table GUI->Storage->General and ERM
Please refer screenshot
Script create full action was passing include supporting index flag incorrectly for teradata. Issue fixed with Committed revision: 53548
and a fix for the scripting syntax with Committed revision: 53551
This was fixed and checked into 18 and 19. The revision numbers above are for 18
Script create full action was passing include supporting index flag incorrectly for teradata. Issue fixed with Committed revision: 53548
and a fix for the scripting syntax with Committed revision: 53551
This was fixed and checked into 18 and 19. The revision numbers above are for 18
Issue #15075 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build v18.0.4-4 |
No time estimate |