I'm taking a skillshare course and creating my own tables.  I tried to import some data from a csv file and it didn't work. I thought I had done it just like the example on the video, and also checked some other online sources which seemed to do it the same way.

Attached is the file I'm trying to import.

The table I'm importing to was created as follows:

CREATE TABLE public.markets
(
    id integer NOT NULL,
    "Market" character varying(50) COLLATE pg_catalog."default" NOT NULL,
    CONSTRAINT markets_pkey PRIMARY KEY (id),
    CONSTRAINT unique_market UNIQUE ("Market")
)

TABLESPACE pg_default;

ALTER TABLE public.markets
    OWNER to postgres;
COMMENT ON TABBLE public.markets
    IS 'Market used as the price index (posted, Platts, Opis, Argus,  etc...)';

The import fails with the following error:  Failed (exit code -6)

I can't find "exit code -6" anywhere.  What's wrong with my import?

I've had one reply to this that brought up encoding.  I left the encoding blank at first, as did the instructor in the skillshare video.  Since then I've tried the UTF8 suggested by the person who brought it up.  I also tried BIG5, EUC_CN, SQL_ASCII and WIN1250.

All efforts ended with the same result. Is there a list of exit codes anywhere?  What's "exit code -6"?

Thanks,

Scobey






id,market
1,Platt's US Gulf Coast pipe mean
2,Platt's US Gulf Coast waterborne mean
3,Platt's NY barge mean
4,Platt's NJ pipe mean
5,Platt's LA pipe mean
6,Platt's Chicago pipe mean
7,Platt's Group 3 mean
8,Platt's Mediterranean FOB mean
9,Platt's Mediterranean FOB high
10,Platt's NWE CIF mean
11,Platt's NWE CIF high
12,Platt's Rotterdam barge mean
13,Platt's Rotterdam barge high
14,Platt's Singapore mean
15,Argus NY barge mean
16,Argus US Gulf Coast pipe mean
17,Argus US Gulf Coast waterborne mean
18,Argus Chicago pipe mean
19,Argus Group 3 mean
20,Opis US Gulf Coast pipe mean
21,Opis LA pipe mean

Reply via email to