Examples

Teradata Vantageā„¢ DATASET Data Type

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

Example: Retrieving the Schema of an Avro Instance of the DATASET Data Type

SELECT avroFile.getSchema() FROM myAVROTable06;
> {
	"type":"record",
	"name":"rec_0",
	"fields":[
		{
			"name":"Sale",
			"type":{
				"type":"record",
				"name":"rec_1",
				"fields":[
					{"name":"Item_ID","type":"int"},
					{"name":"Item_Name","type":"string"},
					{"name":"Item_Color","type":"string"},
					{"name":"Item_Style","type":"string"},
					{"name":"Quantity_Purchased","type":"int"},
					{"name":"Item_Price","type":"double"},
					{"name":"Total_Price","type":"double"}
				]
				}
			}
		]
	  }

Example: Retrieving the Schema of a CSV Instance of the DATASET Data Type

SELECT csvFile.getSchema() FROM myCSVTable06;

> {
   "field_delimiter" : "&",
   "record_delimiter" : "#",
   "field_names" :
    [
     "Item_ID",
     "Item_Name",
     "Price"
    ]
  }