I use COPY to load many flat files to one table. I want to save the file name to one column of the table in order to verify the data later. Below is an example of my COPY command. But I do not know how to save the file name to one column of the table in Vertica. Anybody has any ideas? thanks.
\set t_pwd 'pwd'
\set input_file '\'':t_pwd'/flat/*Payer.txt\''
truncate table _dicPayer;
copy _dicPayer
(
ID,
PAYERID,
PAYERNAME,
INSERTDATETIME
)
from local :input_file
escape as E'\001' delimiter E'|' skip 0 exceptions '/tmp/pb_ex' rejected data '/tmp/pb_rej' direct;
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

