Using Views to Control Access to Partitions of a PPI Table - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

You can use views to control access to the partitions of a PPI table. For example, create a view for SELECT ACCESS to the table and another view for data maintenance. Conditions in the views can restrict access to only the appropriate partitions. The views can be replaced to vary the conditions. Grant privileges only on the views.

A view defined on a PPI table contains the following system-derived columns only if you specify them in the select list of the definition:
  • PARTITION column
  • PARTITION#L n columns, with n in the range [1, 15]

Teradata recommends not including the preceding system-derived columns in view definitions, to prevent users from referencing them. Instead, specify conditions on the partitioning columns, because the values of the preceding system-derived columns may change for rows if the partitioning of an underlying base table is altered. See ALTER TABLE Usage Notes (Basic Table Parameters).

View definitions that include the system-derived PARTITION column or the system-derived PARTITION#L n columns are appropriate for DBAs.