1

Loading the .tbl file I've got this error:

[nicola@localhost ~]$ mclient -d dbmonet  -s  "COPY  INTO  monet.SUPPLIER  FROM  STDIN  USING  DELIMITERS ',','\\n','\"'" - < /home/nicola/Scrivania/tabellemonetdb/supplier.tbl
user(nicola):monetdb
password:
missing separator ',' line 0 expecting 6 got 1  fields
failed to import table
current transaction is aborted (please ROLLBACK)
syntax error, unexpected sqlINT in: "0201"

Why do I get this error? I'm using an ssb schema.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Mark
  • 141
  • 1
  • 3
  • 15

1 Answers1

1

Without knowing anything about the structure of the supplier.tbl file, my guess (from having used SSBM before) would be that it does not use "," as a field separator, but "|".

My SSBM loading command for the supplier table looks like this:

COPY INTO SUPPLIER FROM '/path/to/supplier.tbl' USING DELIMITERS '|', '|\n' LOCKED;
Hannes Mühleisen
  • 2,542
  • 11
  • 13
  • when I create table in monetdb, right? Another thing: I've generated tables data with ssb-dbgen-master, I've edited makefile in this way: DATABASE= MONETDB MACHINE = LINUX WORKLOAD = SSBM and in tpcd.h I added these rows: #ifdef MONETDB #define GEN_QUERY_PLAN "EXPLAIN" #define START_TRAN "BEGIN TRANSACTION" #define END_TRAN "END TRANSACTION" #define SET_OUTPUT ".SET FORMAT OFF\n.EXPORT REPORT file=" #define SET_ROWCOUNT ".SET RETCANCEL ON\n.SET RETLIMIT %d\n" #define SET_DBASE ".LOGON %s\n" #endif Then I use make and generate data...it's right? – Mark Jan 04 '14 at 10:28
  • In my setup, I simply set the values in makefile to DATABASE=DB2 MACHINE=LINUX WORKLOAD=SSBM That should be enough. – Hannes Mühleisen Jan 04 '14 at 12:49