toJSON Method | DATASET Data Type | VantageCloud Lake - toJSON - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

toJSON converts any DATASET data type instance into a JSON text instance.

Result Type

toJSON returns a JSON-encoded Avro or CSV value. The character set of the resulting JSON object is UNICODE.

CSV values can contain multiple records, so the JSON value is an array of objects where each object contains the fields in a CSV record. For empty fields, the value equals the JSON null value. The resulting JSON object is in the same character set as the CSV value.

If there is no header record or schema with field names, default CSV field names generate. For defined field names with a record containing more than fields, default field names generate for the extra fields in the record. For example, if three field names are defined and a record contains four fields, the fourth field is named csv_fld4.