In Teradata, when a view is created using CREATE VIEW, the columns in the view's select list are stored in the dictionary along with their associated metadata. When the view is queried, the result set must match the metadata and column definitions stored in the dictionary. Client tools and utilities rely on this consistency to function correctly.
create view v1 as sel * from datalake_iceberg_glue.otftestdb.cdata;
*** Failure 9134 CREATE VIEW is not supported for OTF queries.
Statement# 1, Info =0
*** Total elapsed time was 1 second.
Workaround for Lack of View Support in OTF
Due to the absence of native view support for OTF tables, users can adopt the following workarounds:
- Alias Tables
- CREATE TABLE AS …
- CREATE VOLATILE TABLE AS …
Alias tables do not store column-level metadata in the dictionary, which allows them to avoid the issues typically associated with runtime views. They retrieve data from the current snapshot and are compatible with time travel queries.
The CREATE TABLE forms used in this context generate local database tables, functioning similarly to materialized views. However, unlike true OTF tables, they import data from the data lake into local storage, which means they do not fully adhere to the principles of the OTF.