About DATASET Type Cast | DATASET Data Type | Teradata Vantage - About DATASET Type Cast - Advanced SQL Engine - Teradata Database

DATASET Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
des1556232910526.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1198
lifecycle
previous
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.