CREATE FOREIGN TABLE Syntax | Teradata Vantage - 17.10 - CREATE FOREIGN TABLE Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)
CREATE [MULTISET] FOREIGN TABLE table_specification 
  [ , table_option [,...] ]
  [ , external_security_clause ]
  [ ( location_column, { payload_column | data_column_definition }) ]
  USING (
    LOCATION ( 'external_file_path' ) 
    [ PATHPATTERN ( 'value' ) ]
    [ MANIFEST ( { 'TRUE' | 'FALSE' } ) ] 	
    [ ROWFORMAT ( 'encoding_format' ) ]
    [ STOREDAS ( { 'TEXTFILE' | 'PARQUET' } )]
    [ HEADER ( { 'TRUE' | 'FALSE' } ) ]
    [ STRIP_EXTERIOR_SPACES ( { 'TRUE' | 'FALSE' } ) ]
    [ STRIP_ENCLOSING_CHAR ('NONE') ]
  )
  [ [,] NO PRIMARY INDEX ] 
  [ [,] PARTITION BY COLUMN ] [;]
table_specification
[database_name. | user_name.] table_name
external_security_clause
EXTERNAL SECURITY [ { INVOKER | DEFINER } TRUSTED ]
  [ database_name.| user_name.]authorization_name

The total number of specified columns cannot exceed 2048.