Example of foreign table definition with Latin character set | Teradata Vantage - Example: Creating Foreign Table with Payload Column with Latin Characters - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

This example is like Example: Creating Foreign Table with PATHPATTERN except for the character set of the Payload column—LATIN instead of UNICODE.

CREATE FOREIGN TABLE Statement

CREATE MULTISET FOREIGN TABLE sensordata (
  Location VARCHAR(2048) CHARACTER SET UNICODE CASESPECIFIC,  
  Payload JSON(16776192) INLINE LENGTH 64000 CHARACTER SET LATIN
  ) 
  USING (   
    LOCATION ('/S3/YOUR-BUCKET.s3.amazonaws.com/data/logs')   
    PATHPATTERN ('$Var1/$Var2/$var3/$Var4/$date') 
  )   
  NO PRIMARY INDEX;