Teradata Database Message 5728 - 5728 - Analytics Database - Teradata Vantage

Teradata® VantageCloud Lake - Analytics Database Messages

Edition
Lake
Product
Analytics Database
Teradata Vantage
Published
October 2022
Language
English (United States)
Last Update
2024-02-26
dita:mapPath
tzr1629746512312.ditamap
dita:ditavalPath
ft:empty
dita:id
vza1585613049811
lifecycle
latest
Product Category
Teradata® Vantage™
Message
Partitioning violation for table %DBID.%TVMID.
Explanation
1) An insert or update occurred to a table whose primary index partitioning definition does not allow that data. Or, 2) an ALTER TABLE statement attempted to alter the primary index partitioning but there are existing rows that are not allowed by the new partitioning expression and a WITH DELETE/INSERT clause was not specified. For rows of a table with a single-level, 2-byte partitioned primary index, there is an implied check constraint of "(CAST((partitioning expression ) AS INTEGER) ) BETWEEN 1 AND max" where max is 65535 or smaller. The CAST is not included if the partitioning expression is already INTEGER or consists solely of a RANGE_N function. A smaller value for max is used when the partitioning expression consists solely of a RANGE_N or CASE_N function; in that case, max is the number of ranges/partitions defined by the function. Note that if the partitioning expression results in NULL, the constraint is violated. For rows of a table with a multilevel or 8-byte partitioned primary index, there is an implied check constraint of "partitioning_expression_1 IS NOT NULL [AND partitioning_expression_n IS NOT NULL]...". A row that violates this constraint is not allowed to occur in the table and, therefore, cannot be inserted into the table or, for an update, replace a row in the table. Additionally, if an existing row violates a new partitioning expression and a WITH DELETE/INSERT clause is not specified for the ALTER TABLE statement, the new partitioning cannot be applied. %TVMID indicates the table with the partitioning constraint violation. %DBID indicates the database containing the table.
Generated By
STP modules.
For Whom
End User.
Notes
None
Remedy
For 1), correct the values of the columns referenced in the partitioning expressions and resubmit the request. For 2), alter the table with a new partitioning expressions that allows for all existing rows or use a WITH DELETE/INSERT clause.