Copying Data from a Source Table to an OTF Table - Teradata Vantage

Apache Iceberg and Delta Lake Open Table Format on VantageCloud Lake Getting Started

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
December 2024
ft:locale
en-US
ft:lastEdition
2025-01-03
dita:mapPath
bsr1702324250454.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
bsr1702324250454

The INSERT INTO..SELECT SQL can be used to copy data from a source table to an OTF table. The source table can be a BFS, OFS, or OTF table. The WHERE clause can be used to copy a subset of the data from the source table to the OTF table.

Syntax

INSERT INTO TABLE <datalake_name>.<OTFdatabase_name>.<OTFtable_name> 
    SELECT * | <column-name>[, ...] 
    FROM [database_name.]<source_table> |
         <datalake_name>.<OTFdatabase_name>.<OTFtable_name>
    [WHERE where_clause];
<datalake_name> ::= !! name of the data lake object
<OTFdatabase_name> ::= !! name of the database in the OTF catalog
<OTFtable_name> ::= !! name of the OTF table
<database_name> ::= !! Teradata identifier
<source_table> ::= !! Teradata table

Example

INSERT INTO datalake_glue.MyDatabase.Tab2
   SELECT * FROM datalake_glue.MyDatabase.Tab1
   WHERE country='France'; 

Usage Considerations: Iceberg

  • The following are not supported:
    • Non-Positional inserts.
    • Writing ORC data files.
    • Writing to a BLOB column.
    • Parameterized SQL for Array Insert for an OTF table.