
Hi ALL I encountered a problem using a COPY INFO The command to execute: [hotel@02 data_visual_monetdb]$ mclient -u monetdb -d hotel-revenue -s "COPY 1727300 RECORDS INTO hotel_revenue_octopus_hotel_info FROM '/home/ping.gao/data_visual_monetdbinfo.data' USING DELIMITERS ',','\\n'<smb://n'>,'\"'" password: Failed to import table Leftover data '"0”' Data Format(Line separator —> \n): “test”,”test”,”test”,”test”

Hai, looks like it works for me: $ cat /tmp/test.csv "test1","test2","test3","test4" "test5","test6","test7","test8" $ mclient -s 'create table t (s1 varchar(10), s2 varchar(10), s3 varchar(10), s4 varchar(10));' operation successful $ mclient -s "copy 3 records into t from '/tmp/test.csv' using delimiters ',','\\n','\"'" 2 affected rows $ mclient -s 'select * from t;' +-------+-------+-------+-------+ | s1 | s2 | s3 | s4 | +=======+=======+=======+=======+ | test1 | test2 | test3 | test4 | | test5 | test6 | test7 | test8 | +-------+-------+-------+-------+ 2 tuples Which version of MonetDB are you using? I’m using: $ hg branch Dec2016 $ hg head . changeset: 62466:b19c518bbe33 branch: Dec2016 user: Sjoerd Mullender <sjoerd@acm.org> date: Fri Dec 23 10:42:32 2016 +0100 summary: Remove carriage returns. If your problem persists, please provide us the schema and sample data to reproduce the problem. Regards, Jennie
On 26 Dec 2016, at 10:11, ping gao 高平(0) <ping.gao@corp.elong.com> wrote:
Hi ALL I encountered a problem using a COPY INFO
The command to execute: [hotel@02 data_visual_monetdb]$ mclient -u monetdb -d hotel-revenue -s "COPY 1727300 RECORDS INTO hotel_revenue_octopus_hotel_info FROM '/home/ping.gao/data_visual_monetdbinfo.data' USING DELIMITERS ',','\\n','\"'" password: Failed to import table Leftover data '"0”'
Data Format(Line separator —> \n):
“test”,”test”,”test”,”test”
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list

Thank you for your reply. I have found the cause of the problem.Is a problem with importing data, column already contains the specified delimiter。Make a suggestion, hope unusual tips to clear the cause of the problem. Thanks again 在 2016年12月30日,下午10:22,Ying Zhang <Y.Zhang@cwi.nl<mailto:Y.Zhang@cwi.nl>> 写道: Hai, looks like it works for me: $ cat /tmp/test.csv "test1","test2","test3","test4" "test5","test6","test7","test8" $ mclient -s 'create table t (s1 varchar(10), s2 varchar(10), s3 varchar(10), s4 varchar(10));' operation successful $ mclient -s "copy 3 records into t from '/tmp/test.csv' using delimiters ',','\\n'<smb://n'>,'\"'" 2 affected rows $ mclient -s 'select * from t;' +-------+-------+-------+-------+ | s1 | s2 | s3 | s4 | +=======+=======+=======+=======+ | test1 | test2 | test3 | test4 | | test5 | test6 | test7 | test8 | +-------+-------+-------+-------+ 2 tuples Which version of MonetDB are you using? I’m using: $ hg branch Dec2016 $ hg head . changeset: 62466:b19c518bbe33 branch: Dec2016 user: Sjoerd Mullender <sjoerd@acm.org<mailto:sjoerd@acm.org>> date: Fri Dec 23 10:42:32 2016 +0100 summary: Remove carriage returns. If your problem persists, please provide us the schema and sample data to reproduce the problem. Regards, Jennie On 26 Dec 2016, at 10:11, ping gao 高平(0) <ping.gao@corp.elong.com<mailto:ping.gao@corp.elong.com>> wrote: Hi ALL I encountered a problem using a COPY INFO The command to execute: [hotel@02 data_visual_monetdb]$ mclient -u monetdb -d hotel-revenue -s "COPY 1727300 RECORDS INTO hotel_revenue_octopus_hotel_info FROM '/home/ping.gao/data_visual_monetdbinfo.data' USING DELIMITERS ',','\\n'<smb://n'>,'\"'" password: Failed to import table Leftover data '"0”' Data Format(Line separator —> \n): “test”,”test”,”test”,”test” _______________________________________________ users-list mailing list users-list@monetdb.org<mailto:users-list@monetdb.org> https://www.monetdb.org/mailman/listinfo/users-list _______________________________________________ users-list mailing list users-list@monetdb.org<mailto:users-list@monetdb.org> https://www.monetdb.org/mailman/listinfo/users-list
participants (2)
-
ping gao 高平(0)
-
Ying Zhang