toJSON Method | DATASET Data Type | Teradata Vantage - toJSON - 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ā„¢

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 always 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.