Dhiraj
Dhiraj

Reputation: 3696

Transactional update policy for multiple tables with the same source table

Let's say I have two tables on which I define two different update policies but with the same source table. Both the update policies are transactional. So basically the two update policies look like this:-

.alter table Target1 policy update @'[{"IsEnabled": true, "Source": "MySource", "Query": "UpdatePolicy1_MySource()", "IsTransactional": true, "PropagateIngestionProperties": false}]'

.alter table Target2 policy update @'[{"IsEnabled": true, "Source": "MySource", "Query": "UpdatePolicy2_MySource()", "IsTransactional": true, "PropagateIngestionProperties": false}]'

Now since both of the update policies are transactional, as per the documentation

If transactional and the update policy fails, the source table is not updated

So what will happen in my case where only one of the update policy fails? Source table for both the update policies is the same in my case , does it mean that all the update policies for a given source table have to succeed before source table is updated ?

Upvotes: 1

Views: 264

Answers (1)

yifats
yifats

Reputation: 2744

Yes, if the update policies are transactional, all have to succeed for commit to take place. If any update policy fails, there will be no ingestion to any of the tables.

Upvotes: 4

Related Questions