Foreign tables enable Teradata Vantage™ to access data in external object storage, such as semi-structured and unstructured data in Amazon S3, Azure Blob storage, and Google Cloud Storage. In-database integration of this data allows data scientists and analysts to read and process this data with Vantage, using standard SQL. You can join external data to relational data in Vantage, and process it using built-in Vantage analytics and functions.
The external data can be in standard data formats such as JSON, CSV, and Parquet.
Creating a foreign table requires specifying the location of the data. You must also specify the credentials, except if you are using AWS IAM.
CREATE FOREIGN TABLE creates a foreign table with a PARTITION BY clause even if you do not specify one. The PARTITION BY clause determines the virtual columns. HELP TABLE output identifies virtual columns.
- CREATE FOREIGN TABLE Syntax
- CREATE FOREIGN TABLE Syntax Elements
- CREATE FOREIGN TABLE Usage Notes
- CREATE FOREIGN TABLE Examples
ANSI Compliance
This statement is a Teradata extension to the ANSI SQL:2011 standard.
Required Privileges
You must have the CREATE TABLE privilege on the database or user in which the table is created.
Privileges Granted Automatically
- DROP TABLE
- SELECT