Hi,
I try to get number of rejected lines but the function get_num_rejected_rows() give me a result x 2.
Here is my dockerfile on which I run my vertica 9 environment:
https://github.com/ypiel-talend/docker-vertica/blob/ypiel/docker-vertica9/Dockerfile
You have to get the vertica 9 .deb installer for ubuntu/debian
then rename it as vertica9.deb
and then run docker command : docker build -t vertica9 .
all files must be in the same folder : Dockerfile and vertica9.deb
Then run the container: docker run -p 5433:5433 docker9
Here is what I do:
--------------------------
CREATE TABLE IF NOT EXISTS Public.customers (
id integer PRIMARY KEY NOT NULL,
name varchar(10),
age integer,
comment varchar(10)
);
COPY Public.customers FROM LOCAL 'C:/temp/data.txt'
STREAM NAME 'talend' DELIMITER ';'
TRAILING NULLCOLS SKIP 1 RECORD TERMINATOR E'\n'
ENCLOSED BY E'"' ESCAPE AS '\' ENFORCELENGTH
REJECTMAX 1000 NULL 'none'
DIRECT REJECTED DATA 'C:/temp/Vertica_rejected.csv' EXCEPTIONS 'C:/temp/Vertica_exception.log' NO COMMIT
select get_num_rejected_rows()
--------------------------
In attachment the data.txt file with 3 wrong ID (5, 10, 15) that are rejected.
The result of get_num_rejected_rows() is 6.
Can you explain me why this value is multiplied by 2 ? Do I miss something ?
Thanks for help.