Example: Returning Results that are Not Aggregated - 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

In the following AVRO example, the results are not aggregated. For example, each row of a table results in one DATASET data type instance.

SELECT * FROM DATASET_PUBLISH
(
	ON (SELECT * FROM employeeTable) 
	RETURNS (data DATASET STORAGE FORMAT AVRO)
	USING DO_AGGREGATE('N')
) AS avroFiles;

data
7B226E616D65223A22656D706C6F7965655461626C65222C2274797065223A227265636F7264222C226669656C6473223A5B7B226E616D65223A22656D704944222C2274797065223A22696E74227D2C7B226E616D65223A22656D704E616D65222C2274797065223A22737472696E67227D2C7B226E616D65223A22656D7044657074222C2274797065223A22737472696E67227D5D7D00021847656F72676520536D697468144163636F756E74696E67

7B226E616D65223A22656D706C6F7965655461626C65222C2274797065223A227265636F7264222C226669656C6473223A5B7B226E616D65223A22656D704944222C2274797065223A22696E74227D2C7B226E616D65223A22656D704E616D65222C2274797065223A22737472696E67227D2C7B226E616D65223A22656D7044657074222C2274797065223A22737472696E67227D5D7D00041C5061756C696E65204B72616D6572044852

7B226E616D65223A22656D706C6F7965655461626C65222C2274797065223A227265636F7264222C226669656C6473223A5B7B226E616D65223A22656D704944222C2274797065223A22696E74227D2C7B226E616D65223A22656D704E616D65222C2274797065223A22737472696E67227D2C7B226E616D65223A22656D7044657074222C2274797065223A22737472696E67227D5D7D00061853746576656E204D617A7A6F16456E67696E656572696E67

The results are not aggregated in the CSV example:

SELECT * FROM DATASET_PUBLISH
(
	ON (SELECT * FROM employeeTable) 
	RETURNS (data DATASET STORAGE FORMAT CSV)
	USING DO_AGGREGATE('N')
) AS csvFiles;
fileSchema fileData
Null empId,empname,empDept

1,George Smith,Accounting

Null empId,empname,empDept

2,Pauline Kramer,HR

Null empId,empname,empDept

3,Steven Mazzo,Engineering