Cascade FOREIGN KEYS in Redshift


Hi there,

I would like to understand why the foreign keys in Redshift are not set to cascade?

When i delete events, I would like all relating data to be deleted as well.



Foreign keys (along with some other constraints) aren’t enforced by Redshift.


Thanks. We reprocessed some logs and have to deal with duplicated events now.

Are there any good ways of cleaning this up? I was under the impression events that already exists will not be imported again.



The guide that @christophe has written here is probably the most comprehensive docs on deduplication (both pre EMR and post EMR).


Further to @mike’s points - there is no CASCADE in Redshift constraints: