Why didn't UpdateIf work instead UpsertIf?

Cezario Abrantes 0 Reputation points
2024-06-09T19:08:52.5933333+00:00

Hi! I'm having trouble understanding this article from Microsoft Learning:

https://microsoftlearning.github.io/dp-203-azure-data-engineer/Instructions/Labs/10-Synpase-pipeline.html

There's this information at some point:

Alter row conditions: Edit the existing condition and use the + button to add a second condition as follows (note that the expressions are case-sensitive):

InsertIf: isNull(ProductKey) UpsertIf: not(isNull(ProductKey))

The alter row step configures the kind of load action to perform for each row. Where there’s no existing row in the table (the ProductKey is NULL), the row from the text file will be inserted. Where there’s already a row for the product, an upsert will be performed to update the existing row. This configuration essentially applies a type 1 slowly changing dimension update.

In this exercise, there's only one line to be updated (ProductID AR-5381; column Discontinued, from 0 to 1). Contradicting what's proposed in the exercise, I've tried to perform UpdateIf instead UpsertIf at this point, since the line already exists - it would meet the condition not(isNull(ProductKey))

But the line wasn't updated. When I tried with UpsertIf, it worked.

My question is: Why didn't UpdateIf work???

Thanks in advance.

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,986 questions
0 comments No comments
{count} votes