Examples - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantageā„¢ DATASET Data Type

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1198-162K

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"}]