Antony
Antony

Reputation: 1108

ADLS data copy task fail if no data exists

I am trying to copy data from ADLS using Azure Data Factory pipeline. The pipeline will run daily and each day it will copy data for the same day.

In the pipeline start time and end time is provided to get only current days data as shown below. enter image description here

The issue is, even though there is no data in the source, the data copy job succeeds, showing pipeline success status. enter image description here

Is there any way to fail the data copy task if there is no data in the source adls?

Upvotes: 1

Views: 501

Answers (1)

Joel Cochran
Joel Cochran

Reputation: 7728

I don't think you can force Copy activity to fail if the source exists. What I would do is put a GetMetadata activity that captures "Exists" in front of the Copy. If it does not exist, then fail the pipeline.

Upvotes: 2

Related Questions