Execute ADF dataflow based on the value from Get Metadata activity

Kumar, Arun 336 Reputation points
2023-05-17T06:33:02.5866667+00:00

I am creating a pipeline activity where Get Metadata checks for the file in a folder and if it exists then it should trigger a dataflow, else stop the activity and not execute the dataflow.

Any suggestions how to do it

So far i have done like below. Check for the file and pass to a If Condition and if TRUE execute Dataflow. The problem is if FALSE (fileNotExists) is getting captured in the variable but activity is not stopping. Also how to get the rowsWritten from the dataflow and pass that to another if condition outside?

User's image

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

Accepted answer
  1. Subashri Vasudevan 11,226 Reputation points
    2023-05-17T07:45:33.18+00:00

    Hi @Kumar, Arun

    please check this video to stop the pipeline when no file found https://youtu.be/ISc0-TiU-do

    Hope this helps. Pl let us know otherwise, if you have further questions.

    Thanks

    Suba


1 additional answer

Sort by: Most helpful
  1. Vedant Desai 656 Reputation points
    2023-05-17T07:45:33.39+00:00

    Hey Arun,

    Please put the rest of the pipeline activities in the True Part of the If condition. This will ensure that the rest of the activities will only execute if the condition is True.

    To get the RowsWritten from the dataflow and pass that to another activity, please refer to the following thread:

    https://learn.microsoft.com/en-us/answers/questions/945957/how-to-get-number-of-rows-written-to-a-sink-in-adf

    Please don't forget to click on 130616-image.png

    if you find this helpful.

    1 person found this answer 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.