Capture pipeline run date in Logic App.

hannaS 201 Reputation points
2021-02-09T00:11:00.493+00:00

I am copying files from an SFTP and following this https://learn.microsoft.com/en-us/azure/data-factory/solution-template-copy-new-files-lastmodifieddate to pick the latest file. My files, however, are being added once a month, so instead of adding Tumbling Window trigger I want to set up Logic App that would trigger my pipeline upon the file drop to SFTP. The above mentioned tutorial specifies parameters LastModified_From = @Trigger ().outputs.windowStartTime and LastModified_To = @Trigger ().outputs.windowEndTime, which seems to only be possible to use with Tumbling Window trigger.

Is there a way I can combine copying new and changed files by LastModifiedDate and triggering pipeline with Logic app?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,990 questions
0 comments No comments
{count} votes

Accepted answer
  1. hannaS 201 Reputation points
    2021-02-11T19:13:01.74+00:00

    Hi! Thank you for your response.

    Putting default values for the parameters gives the following error.
    67201-2021-02-11-11-09-20-ppd-azure-data-factory.jpg
    67142-datetimeerror.jpg

    However putting same values directly into the "Filter by last modified" fields worked.
    67143-lastmodified.jpg

    And I ended up adding regular monthly trigger and setting it to run on a specific day of the month.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,476 Reputation points Microsoft Employee
    2021-02-09T23:02:31.87+00:00

    Hello @Goutham Kannekanti ,
    Thanks for the ask and using the Microsoft Q&A platform .

    Just to clearfy first the template which you are following is passing a set of parameters to the pipeline , see the snapshot from the same article .
    Since we are triggering the pipeline from a TWT we are passing the start and end time as the start time of the TWT and passing that to the pipeline .

    66067-2021-02-09-14-44-12-copy-new-and-changed-files-by.png

    In your case the things will change , since you mentioned that the file always arrives once in month , you can pass the start and end time as default as shown below or you can pass the same parameters when you call the pipeline from logic apps ( may the function names will be different , I am not very sure about that )

    66019-2021-02-09-14-43-52-copy-new-and-changed-files-by.png

    Thanks
    Himanshu
    Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

    0 comments No comments

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.