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
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1198-171K
Language
English (United States)
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}