CSV Conversion | DATASET Data Type | VantageCloud Lake - CSV Conversion - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905
The CSV DATASET data type is only supported on the Block File System on the primary cluster. It is not available for the Object File System.

With the system-defined CSV conversion feature, you can convert data in the CSV format to a JSON or DATASET data type with storage format Avro or CSV. This section describes the table operators that allow for conversion.

Examples in the section use the following table multiple times:

CREATE TABLE myCSVTable09(
	id INTEGER,
	csvFile CLOB);

Result:

csv09.txt (the record delimiter is shown as '\n')
Item_ID,Item_Name,Item_Color,Item_Style,Quantity_Purchased,Item_Price,Total_Price \n55,bicycle,red,boys,1,100.00,100.00 \n88,toy boat,pink,,1,15.10,15.10 \n105,soap,,,1,0.99,0.99|1
.import vartext file csv09.txt
USING (c1 VARCHAR(1000), c2 INTEGER)
INSERT INTO myCSVTable09(:c2,:c1);

The CSV data is included for reference:

Item_ID Item_Name Item_Color Item_Style Quantity_ Purchased Item_Price Total_Price
55 bicycle red boys 1 100.00 100.00
88 toy boat pink ? 1 15.10 15.10
105 soap ? ? 1 0.99 0.99