DATASET Type Cast | DATASET Data Type | VantageCloud Lake - DATASET Type Cast - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
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 cause 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. Any schema associated with the CSV value is not included.