开发者

Greenplum COPY not filtering duplicate entries

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜