Load Data from External Object Storage Using Native Object Store - Teradata VantageCloud Lake

Lake - Manage and Move Data

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
atx1683670417382.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
atx1683670417382

When source data resides in object storage external to VantageCloud Lake, one data loading approach is to use a foreign table to do an INSERT-SELECT into your target table. The steps involved are as follows:

  1. Set up data access privileges. For details, see Use Native Object Store to Work with Data in External Object Storage.
  2. Provide security credentials to read the source files, if required. For details, see Use Native Object Store to Work with Data in External Object Storage.
  3. Define the layout of the source file by following the steps in CREATE FOREIGN TABLE.
  4. Issue an INSERT-SELECT statement to load the data from the source files to the target table in the Object File System. For details, see INSERT-SELECT Statement.

The following are examples of setting up security credentials and a foreign table to read the source files:

  • Setting up security credentials to read the source files.

    Example: Set up an authorization object.

    CREATE AUTHORIZATION MyAuthObject
    USER 'access_key_ID'
    PASSWORD 'access_secret_key';
    
  • Setting up a foreign table to read the source files.

    Example: Set up a foreign table.

    CREATE FOREIGN TABLE ForeignTableName
    USING ( LOCATION('/connector/external_file_path/) );
    

The following are examples of loading data in different formats:

Example: CSV and Parquet

INSERT INTO MyLocalTableName
SELECT Column1, Column2, ColumnN
FROM ForeignTableName;

Example: JSON

INSERT INTO MyLocalTableName
SELECT payload.Column1, payload.Column2,payload.ColumnN 
FROM ForeignTableName