Forum Discussion
Update method "allow delete" is not working in data flow
- 9 months ago
Hi AnHell ,
Thank you for the update.
Please try below structure to your data flow.
1. In Source 1, Your filtered view from Fabric warehouse returns 1 record. In Source 2, The Dataverse destination table with 10 records.
2. Exists Transformation, Configure to find records in Dataverse (Source 2) that do not exist in Source 1. This identifies records that should be deleted.
3. Alter Row Transformation, Use deleteIf(true()) for all rows coming from the Exists transformation.
4. Sink Transformation, Connect to Dataverse. Please enable Allow delete and Allow upsert. Set the Alternate Key Name to the correct primary key field.
Note: Make sure the key column is defined so ADF can match rows for deletion.
5. Run in a Pipeline, Not Just Debug Mode. Deletes won’t execute in debug mode. You must run the data flow inside a pipeline using an Execute Data Flow activity.
Please refer below links.
Sink transformation in mapping data flow - Azure Data Factory & Azure Synapse | Microsoft Learn
in dataflow the update method allow delete is not working - Microsoft Q&A
Data Flow - "Delete If" setting in Alter Row - Microsoft Q&A
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Hi v-dineshya ,
I'm sorry, I haven't managed to get it working yet, but the situation has changed slightly.
Here's where I stand.
I have a dataflow that reads from a view in a Fabric warehouse. The view is filtered to always return the same record, just one.
The destination is a table in Dataverse with 10 records.
The primary key field from the source is written to the primary key field in the destination.
Before the sink, I have an alter row box where the condition for both the DELETE IF and UPSERT IF statements is set to true().
In the sink's Settings tab, I have "Allow delete" and "Allow upsert" checked, and in the Alternate key name dropdown, I've selected the primary key field from the destination.
When I run this dataflow, I expected all the records in the destination to disappear, leaving only this single record, but nothing is deleted.
I'm still investigating what I'm doing wrong, but I can't find the problem.
Thanks!
Hi AnHell ,
Thank you for the update.
Please try below structure to your data flow.
1. In Source 1, Your filtered view from Fabric warehouse returns 1 record. In Source 2, The Dataverse destination table with 10 records.
2. Exists Transformation, Configure to find records in Dataverse (Source 2) that do not exist in Source 1. This identifies records that should be deleted.
3. Alter Row Transformation, Use deleteIf(true()) for all rows coming from the Exists transformation.
4. Sink Transformation, Connect to Dataverse. Please enable Allow delete and Allow upsert. Set the Alternate Key Name to the correct primary key field.
Note: Make sure the key column is defined so ADF can match rows for deletion.
5. Run in a Pipeline, Not Just Debug Mode. Deletes won’t execute in debug mode. You must run the data flow inside a pipeline using an Execute Data Flow activity.
Please refer below links.
Sink transformation in mapping data flow - Azure Data Factory & Azure Synapse | Microsoft Learn
in dataflow the update method allow delete is not working - Microsoft Q&A
Data Flow - "Delete If" setting in Alter Row - Microsoft Q&A
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
- AnHell9 months agoHelper I
Hi, v-dineshya
That was the problem! ... I wasn't using the exit transformation.
I finally fixed it by adding the sink as a source that I use to do a join and detect the null values that I need to delete. But with the exit transformation, I find it easier to implement.
Thank you very much for everything!