Error While loading using Copy Command

Hi All, 

 

We are facing some issues while loading the data from S3 bucket to vertica using COPY command

 

we have data will null columns & delimeter by tab . 

 

while loading the null columns are not getting handled & the data is inserting to other columns & throws an error invalid cloumn 

 

can you please help us to handle the empty/null columns also 

 

Script

 

copy dfa_target.dfa_activity
(
activity_time format 'YYYY',
user_id,
advertiser_id,
order_id,
ad_id,
creative_id,
creative_version,
creative_size_id,
site_id,
page_id,
country_id,
state,
browser_id,
browser_version,
os_id,
local_user_id,
activity_type,
activity_sub_type,
transaction_id,
other_data,
ordinal,
click_time format 'YYYY',
event_id,
sv1,
quantity,
revenue,
partnerid1,
md_user_id_numeric,
md_is_user_id_0,
md_acquire_id as 1::int
)
from <'Path'>
null as '\N'
no escape
ENCLOSED BY '"'
record terminator E'\r\n'
REJECTED DATA AS TABLE dfa_target.dfa_activity_rejected
delimiter E'\t'
direct ;

 

 

Error : 
PFA 

Invalid cloumn format 

Comments

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file