I need to prevent loading data into my fact table if any of the incoming data has a [DateId] that already exists in the fact table. The field [DateId] is an integer value.
The Lookup action in SSIS allows you to fail on non-matches, but I actually need a failure if any match is found. How can I get the package to fail when there's a match?
If you just want non-matches to flow through the lookup, just use the "Lookup No Match Output" to connect to the next component in your data flow.
Since the Lookup Match Output isn't hooked up to anything, all that data will just "stop" there. This is the equivalent of the SQL pattern LEFT JOIN WHERE --some left column-- IS NULL
.