How to run "ingest" command - soft delete as a function whenever the database is updated in realtime to delete the duplicate?

Nguyen Huu Minh Tri (UTOP.PROD) 1 Reputation point
2022-10-12T03:51:33.643+00:00

Dear supporters,
I would like to ask for a solution. I am facing the problem of duplicated data on Kusto when synchronize data real-time. I have searched and find out the solution of deleting dup data as soft-delete. But ask I knew, it is a "system command" and it cannot be attached into a function and is called automatically when update policy - database is updated. Therefore, I would like to ask for any solution to call the soft delete whenever the database is updated so as to remove the duplicate data.
Regards,
TriNHM1

Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
480 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde 28,311 Reputation points MVP
    2022-11-17T16:28:43.963+00:00

    Hello,

    although I'm not familiar with your architecture, I faced a potential duplication of data too.

    Data ingested on a source table was duplicated to other target tables.

    I use the soft delete though:

    .alter-merge table MySourceTable policy retention softdelete = 0s  
    

    I'm encouraging you to just try it out.

    See also my blog post.

    0 comments No comments