17.05 - CREATE FOREIGN TABLE構文 - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQLデータ定義言語 構文規則および例

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
2021年1月
Content Type
プログラミング リファレンス
Publication ID
B035-1144-175K-JPN
Language
日本語 (日本)

CSVまたはJSONとしてフォーマットされた外部データの場合:

CREATE [MULTISET] FOREIGN TABLE table_specification 
[ table_options ]
[ , external_security_clause ]
[ ( location_column, payload_column ) ]
USING (
  LOCATION ( 'external_file_path' ) 
  [ PATHPATTERN ( 'value' ) ]
  [ MANIFEST ( { 'TRUE' | 'FALSE' } ) ] 	
  [ ROWFORMAT ( 'encoding_format' ) ]
  [ STOREDAS ( 'TEXTFILE' ) ]
  )
[ [,] NO PRIMARY INDEX ] 
[ [,] PARTITION BY COLUMN ] [;]

Parquetとしてフォーマットされた外部データの場合:

CREATE [MULTISET] FOREIGN TABLE table_specification 
[ table_options ]
[ , external_security_clause ]
[ ( location_column, data_column_definition ) ]
USING (
  LOCATION ( 'extemal_file_path' ) 
  [ PATHPATTERN ( 'value' ) ]
  [ MANIFEST ( { 'TRUE' | 'FALSE' } ) ] 	
  STOREDAS ( 'PARQUET' )
  )
[ [,] NO PRIMARY INDEX ] 
[ [,] PARTITION BY COLUMN ] [;]
table_specification
[database_name. | user_name.] table_name
external_security_clause
EXTERNAL SECURITY {
  DEFINER TRUSTED [ authorization_name ] |  
  [ INVOKER ] TRUSTED  authorization_name
}