Using Views To Control Access To The Partitions of a PPI Table - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

You can use views to control access to the partitions of a PPI table. For instance, 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.

If you define a view on a PPI table, that view does not contain the system-derived PARTITION column or the system-derived PARTITION#L n columns, where the value of n ranges from 1 - 15, inclusive, unless you specify it explicitly in the select list of its definition.

In general, you should not include the system-derived PARTITION or PARTITION#L n columns from the underlying tables in view definitions to prevent users from referencing them. A better strategy is to specify conditions on the partitioning columns, because the values of PARTITION (or a given PARTITION#L n) might change for rows if the partitioning of an underlying base table is altered. See ALTER TABLE (Basic Table Parameters).

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