17.10 - Example: Returning a JSON-Encoded Avro Value Instead of an Avro Instance as its Result - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - DATASET Data Type

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
amv1590702100517.ditamap
dita:ditavalPath
amv1590702100517.ditaval
SELECT id, 
avroCol.AvroProjectToJSON('{"type":"record","name":"rec_0","fields":[{"name":"First","type":"string"},{"name":"Age","type":"int"}]}') 
FROM avroTable ORDER BY id;
id
avroCol.AvroProjectToJSON(…)
1
{"First":"Leo","Age":187}
2
{"First":"Mark","Age":180}
3
{"First":"William","Age":451}
4
{"First":"Charles","Age":203}