17.10 - Table-Level Alterations - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

Example: Update Map

ALTER FOREIGN TABLE ParquetTab1, MAP = TD_MAP2;

Example: Update Simplified Authorization

ALTER FOREIGN TABLE ParquetTab1, EXTERNAL SECURITY s3_auth1;

Example: Update Legacy Authorization

ALTER FOREIGN TABLE ParquetTab1, EXTERNAL SECURITY DEFINER TRUSTED TDAWSEDBS_AUTH2;

Example: Update FALLBACK Attribute and Authorization

ALTER FOREIGN TABLE JSONTab1, FALLBACK,
EXTERNAL SECURITY DEFINER TRUSTED TDAWSEDBS_AUTH2;

Example: Update LOCATION

ALTER FOREIGN TABLE ParquetTab1
UPDATE
LOCATION ('/s3/td-usgs-public.s3.amazonaws.com/PARQUETDATA/09394500');

Example: Update PATHPATTERN and ROWFORMAT

ALTER FOREIGN TABLE CSVTab1
UPDATE
PATHPATTERN ('$year/$month/$day')
ROWFORMAT ('{"record_delimiter":"\n","character_set":"UTF8"}')
;

Example: Alter Both Column-Level and Table-Level Attributes

DROP is a column-level alteration; UPDATE is a table-level alteration.

ALTER FOREIGN TABLE ParquetTab1
DROP Precipitation
UPDATE LOCATION  ('/s3/td-usgs-public.s3.amazonaws.com/PARQUETDATA/09394500')
       PATHPATTERN  ('$Var1/$Var2/$var3');