INSERT IGNORE

Moderator: NorbertKrupa

Post Reply
Brett
Beginner
Beginner
Posts: 49
Joined: Fri Oct 11, 2013 1:19 am

INSERT IGNORE

Post by Brett » Sun Oct 27, 2013 5:29 am

Hi,

Is there an INSERT IGNORE option in Vertica? It's a MySQL feature that will let an insert run without error if there is a PK or UK violation.

harryrundles
Intermediate
Intermediate
Posts: 96
Joined: Thu Jul 19, 2012 12:33 am

Re: INSERT IGNORE

Post by harryrundles » Sun Oct 27, 2013 3:43 pm

Brett, you are in luck! Vertica doesn't error when you insert records that violate a primary or unique key :) :lol:

Make sure to check for table dups or handle (i.e. eliminate) them in the ETL process. That's what we do now!
Thanks,
Harry

User avatar
nnani
Master
Master
Posts: 302
Joined: Fri Apr 13, 2012 6:28 am
Contact:

Re: INSERT IGNORE

Post by nnani » Tue Oct 29, 2013 7:14 am

#Brett,

You can use either Insert / COPY statement to load data into Vertica.
Either way you load data, Vertica will not throw any constraint violation error, even though you have primary keys and foreign keys defined on tables.
The only point when the table will give a Constraint Violation error is when the two tables having referential relation will be joined with each other on their Primary and Foreign keys.


Hope this helps.. :)
nnani........
Long way to go

You can check out my blogs at vertica-howto

pborne
Newbie
Newbie
Posts: 20
Joined: Mon Feb 18, 2013 1:37 am

Re: INSERT IGNORE

Post by pborne » Sat Jan 11, 2014 6:44 pm

@nnani: This is not correct. Before commiting the new data loaded, you can run ANALYZE_CONSTRAINTS() to ask the engine to check constraint violations.

Check this thread:

viewtopic.php?f=48&t=845

Post Reply

Return to “New to Vertica”