17.10 - CSVファイル - Advanced SQL Engine - Teradata Database

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

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

CREATE FOREIGN TABLE文

CREATE FOREIGN TABLE riverflow_csv
USING ( LOCATION ('/s3/td-usgs-public.s3.amazonaws.com/CSVDATA/') );

SHOW TABLE文

次を実行します。

SHOW TABLE riverflow_csv;

結果:

CREATE MULTISET FOREIGN TABLE NOS_USR.riverflow_csv ,FALLBACK ,
     MAP = TD_MAP1
     (
      Location VARCHAR(2048) CHARACTER SET UNICODE CASESPECIFIC,
      GageHeight2 DECIMAL(3,2),
      Flow DECIMAL(3,2),
      site_no INTEGER,
      datetime TIMESTAMP(0) FORMAT 'Y4-MM-DDBHH:MI',
      Precipitation DECIMAL(3,2),
      GageHeight DECIMAL(3,2))
USING
(
      LOCATION  ('/s3/td-usgs-public.s3.amazonaws.com/CSVDATA/')
      MANIFEST  ('FALSE')
      PATHPATTERN  ('$var1/$site_no/$var3/$var4/$var5')
      ROWFORMAT  ('{"field_delimiter":",","record_delimiter":"\n","charact
er_set":"LATIN"}')
      STOREDAS  ('TEXTFILE')
      HEADER  ('TRUE')
      STRIP_EXTERIOR_SPACES  ('FALSE')
      STRIP_ENCLOSING_CHAR  ('NONE')
)
NO PRIMARY INDEX ;