About DATASET Type Cast | DATASET Data Type | Teradata Vantage - DATASET Type Cast - Analytics Database - Teradata Vantage

DATASET Data Type

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-10-30
dita:mapPath
bka1628112240653.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ekk1458586304878
lifecycle
latest
Product Category
Teradata Vantageā„¢
The DATASET data type implements the following casts:
  • VARBYTE/BLOB to DATASET STORAGE FORMAT AVRO
  • BYTE/VARBYTE/BLOB from DATASET STORAGE FORMAT AVRO
  • VARCHAR/CLOB to DATASET STORAGE FORMAT CSV
  • VARCHAR/CLOB from DATASET STORAGE FORMAT CSV
  • DATASET STORAGE FORMAT CSV CHARACTER SET LATIN to DATASET STORAGE FORMAT CSV CHARACTER SET UNICODE
  • DATASET STORAGE FORMAT CSV CHARACTER SET UNICODE to DATASET STORAGE FORMAT CSV CHARACTER SET LATIN

No other casts are supported.

When casting TO a DATASET data type for the STORAGE FORMAT AVRO or STORAGE FORMAT CSV, data must conform to the default specification. If not, use the CreateDATASET function to create a DATASET data type instance with either storage format Avro or CSV.

When casting FROM a DATASET data type for the STORAGE FORMAT AVRO, if the data is being cast to BYTE/VARBYTE/BLOB, the resulting data contains the schema defined for the instance, encoded in UTF-8 and null-terminated, followed by the binary-encoded Avro value.

When casting TO a DATASET STORAGE FORMAT CSV data type, the CSV schema is not associated with the data. Therefore, no validation is done, and the cast may result in mismatched data and schema. If you want to validate the data, use CreateDATASET.

For STORAGE FORMAT CSV, if data is cast to VARCHAR/CLOB, the resulting data contains a CSV value. If a schema is associated with the CSV value, it is not included.