CREATE TABLE STORAGE Option - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The CREATE TABLE statement with the STORAGE option specifies the type of storage on which to place the table.

The available storage objects are stored in the DBC.Storage table. The storage access object specifies the type of storage, such as Object File System (TD_OFSSTORAGE) or Block File System (TD_NDSSTORAGE). The storage access object also specifies the location of the data (such as the path to external object storage), and other attributes. The storage access objects are set up at system initialization.

Before creating the table, view the storage access objects:

SELECT * FROM DBC.StorageV;

Your result is similar to the following:

StorageName
---------------------
TD_NDSSTORAGE
TD_OFSSTORAGE

Example: Create a row table on Object File System using the storage access object called TD_OFSSTORAGE:

CREATE MULTISET TABLE Orders,
 STORAGE=TD_OFSSTORAGE, NO Fallback,MAP=TD_MAP1
( StoreNo SMALLINT
, OrderId INTEGER
, OrderDate DATE FORMAT 'YYYY-MM-DD’
, OrderTotal INTEGER
)

ORDER BY (OrderDate, OrderTotal)
NO PRIMARY INDEX;
For Object File System tables, NO FALLBACK is ignored.