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

Teradata Vantageā„¢ - DATASET Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1198-171K
Language
English (United States)
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.