I have a problem loading contents to the green plum table using COPY command. What i have is three column table lets say A , B , C and the table should not entertain duplicate elements. So i have made a composite key clubbing the above three
PRIMARY KEY ( A , B , C )
But the input file which开发者_如何学运维 I am using to load the table, has duplicate entries. All I want is, the COPY command to filter off the duplicate elements and continue loading the data. But in my case whenever the COPY encounters a duplicate entry, it aborts the loading. Any leads on how to proceed??
Thanks
Ganesh.R
COPY doesn't work like that.
The first thing I'd try is the system sort.
sort -u old_filename > new_filename
The '-u' argument tells sort
to output only unique lines.
精彩评论