Search code examples
monetdb

Loading TPCH in MonetDB


i am having trouble importing the data of the TPCH-Benchmark into my monetDB-Database.

I am creating the first table like this:

CREATE TABLE "tpch"."customer" ( "c_custkey"    INTEGER       NOT NULL,  "c_name"       VARCHAR(25)   NOT NULL,"c_address"    VARCHAR(40)   NOT NULL,"c_nationkey"  INTEGER       NOT NULL,"c_phone"      VARCHAR(15)   NOT NULL,"c_acctbal"    DOUBLE        NOT NULL,"c_mktsegment" VARCHAR(10)   NOT NULL,"c_comment"    VARCHAR(117)  NOT NULL);

and then when i try to insert data into it with the following:

COPY INTO tpch.customer FROM 'PATH/tpcdskew/customer.tbl' using delimiters '|','\n';

i get the following error:

'ailed to import table Leftover data '

the "f" that seems to be missing at the start is actually missing for me and the ' are there in the output too.

thank you :)


Solution

  • How do you generate the TPCH data? Probably you have to remove the last "|" at end of each line.

    I use "sed 's/.$//' oldfile.tbl > newfile.tbl" to do that.

    Afterwards you should be able to fill your tables.