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

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