suggestion/feature request CSVREAD respect column names

21 views
Skip to first unread message

Rinse Lemstra

unread,
Feb 13, 2020, 9:33:48 AM2/13/20
to H2 Database

with CSVREAD one can insert/merge records from a .csv file.

Although the csv file does containt column names, they are not respected.

Wouldn't it be nice if CSVREAD could respect these column names while importing the data?

regards,

Rinse

Thomas Mueller Graf

unread,
Feb 13, 2020, 9:41:56 AM2/13/20
to H2 Google Group
From the docs: http://h2database.com/html/functions.html#csvread
"If the column names are specified (a list of column names separated with the fieldSeparator), those are used, otherwise (or if they are set to NULL) the first line of the file is interpreted as the column names"



--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/fcb3efb8-74d9-473b-bbee-9dae23b0e828%40googlegroups.com.

Evgenij Ryazanov

unread,
Feb 13, 2020, 9:43:08 AM2/13/20
to H2 Database
On Thursday, 13 February 2020 22:33:48 UTC+8, Rinse Lemstra wrote:
Although the csv file does containt column names, they are not respected.

Hello.

The documentation of this function describes how to use custom names or use column names from the file:
If the column names are specified (a list of column names separated with the fieldSeparator), those are used, otherwise (or if they are set to NULL) the first line of the file is interpreted as the column names.
Reply all
Reply to author
Forward
0 new messages