I am using Azure Data Factory pipeline.
I want to use if condition
to check if the number of rows in “Employee” table in Azure SQL is greater than 1M
.
if the rows > 1000000
then proceed further with Copy Data
Activity and other Activities
else just stop the pipeline.
I Know we have an if block
in iterations & conditionals
. But, somehow I am not able to achieve what I want.
I also tried to use SQL in Script
in General
<code>--Table name is Employee
-- Employeeid is a column in Employee
declare @EmpId int
set @EmpID = (select count(Employeeid) from Employee);
case when @EmpId > 1000000
then ....
</code>
<code>--Table name is Employee
-- Employeeid is a column in Employee
declare @EmpId int
set @EmpID = (select count(Employeeid) from Employee);
case when @EmpId > 1000000
then ....
</code>
--Table name is Employee
-- Employeeid is a column in Employee
declare @EmpId int
set @EmpID = (select count(Employeeid) from Employee);
case when @EmpId > 1000000
then ....
But, I am kind of lost as I don’t know how to connect this to if Activity
in ADF.
Please let me know if my questions is clear.
I appreciate your help.