tumbling trigger

Vineet S 1,390 Reputation points
2024-03-12T00:35:58.3766667+00:00

The tumbling trigger is created to trigger and copy files from location A for every 5 mins if any files modified... but even there is no files modified in Location A (Source) , it is refreshing the modified date at Location B (Target) where the files are moving

Location A----- Copy

Location ----B ---Paste

issue even no change ... it is modifying modifed date files at B

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
{count} votes

Answer accepted by question author
  1. Karni Gupta (MSFT) 95 Reputation points Microsoft Employee
    2024-03-14T13:02:58.13+00:00

    Hi Vineet,

    Here’s a high-level overview of how you can create an Azure Data Factory (ADF) pipeline to copy only modified data from Source A to Source B using a trigger that runs every 5 minutes.

    1. Create Linked Services: Create linked services in ADF for both Source A and Source B. These linked services will act as connection strings to your data sources.
    2. Create Datasets: Create datasets for Source A and Source B. These datasets represent the structure of your data.
    3. Create a Pipeline: Create a new pipeline in ADF.
    4. Add a Copy Activity: In your pipeline, add a ‘Copy Data’ activity. This activity will be responsible for copying the data from Source A to Source B.
    5. Configure the Copy Activity: In the ‘Source’ tab of the copy activity, select the dataset for Source A. In the ‘Sink’ tab, select the dataset for Source B.
    6. Incremental Load: To copy only the modified data, you need to set up an incremental load. This can be done by parameterizing your dataset to accept a ‘last modified’ timestamp. Then, in your copy activity, you can write a query to select only the rows where the ‘last modified’ timestamp is later than the parameter value.
    7. Create a Trigger: Finally, create a new trigger that runs every 5 minutes. Attach this trigger to your pipeline.

    Here’s a sample code snippet for the Copy Activity with incremental load:

    User's image

    Please replace [SourceA], [last_modified] with your actual table name and column name.

    Remember to replace the sqlReaderQuery and type in both source and sink based on your actual data source and destination type.

    This is a high-level overview and the actual implementation might vary based on the specifics of your data sources and requirements. You might want to refer to the official Azure Data Factory documentation for more detailed steps and instructions.

    If you find my answer helpful, please consider marking it as the ‘Answer’ and giving it an ‘Upvote’ using the thumbs-up option. This can also benefit other community members who may have the same question.

    Thanks,

    Karni.G

    P.S. - The answer was generated with the help of Co-Pilot.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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