17.10 - Examples - 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)

Example: Converting a DATASET Data Type Instance into a JSON Text Instance (AVRO)

	SELECT avroFile.toJSON() FROM myAVROTable06;
	>{
			"Sale" : {
				"Item_ID" : 55,
				"Item_Name" : "bicycle",
				"Item_Color" : "red",
				"Item_Style" : "boys",
				"Quantity_Purchased" : 1,
				"Item_Price" : 100.00,
				"Total_Price" : 100.00
			}
		}

Example: Converting a DATASET Data Type Instance into a JSON Text Instance (CSV)

SELECT csvFile.toJSON() FROM myCSVTable06;

> [{"Item_ID":"55","Item_Name":"bicycle","Price":"89.99"}]