How to pull data from cosmos db (mongo db) to azure data explorer using data factory without duplicates

OctavioCunha-8450 25 Reputation points
2023-06-15T15:52:32.78+00:00

Hey,

We have a requirement where we need to replicate Azure cosmos DB for Mongo DB collection to a Azure data explorer table.

  • Using copy data tool we were able to copy this data from our mongo db collection to our data explorer table. But each time the pipeline runs and pulls data all records will be created again in data explorer.
  • We tried also building a dataflow to perform this task, but cosmos DB for Mongo DB is not supported as a source currently.

How can we pull data from mongo db collection our azure data explorer table (with a certain frequency) without ending up with duplicate records?

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.
577 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,914 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,655 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bhargava-MSFT 31,261 Reputation points Microsoft Employee Moderator
    2023-06-19T16:56:40.4866667+00:00

    Welcome to the MS Q&A platform.

    To avoid duplicate records, one option is by using control command in Azure data explorer command activity and clear the Kusto table before loading data into the Kusto table using copy activity.

    Management (control commands) overview

    Video tutorial for Azure data explorer activity

    clear table data command

    User's image

    I hope this helps.

    If this answers your question, please consider accepting the answer by hitting the Accept answer and up-vote as it helps the community look for answers to similar questions.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.