Validation

Vineet S 750 Reputation points
2024-08-25T15:01:42.18+00:00

Hi, 3+2 ; select case when count(emp) = coun(dept) then pass or fall end from emp (How to validate condition and send extract to blob storage as results.. Pls share screenshot

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

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 32,816 Reputation points Microsoft Employee
    2024-08-26T08:25:56.9866667+00:00

    Hi @Vineet S ,

    Thankyou for posting your query on Microsoft Q&A platform.

    Based on your query, it seems like you are trying to validate whether the count of employees is equal to the count of departments and then send the result to blob storage.

    To validate a condition and send the results to Blob Storage using Azure Data Factory (ADF), you can follow these steps:

    1. Lookup Activity: Execute the SQL query: SELECT CASE WHEN COUNT(emp) = COUNT(dept) THEN 'pass' ELSE 'fall' END AS result FROM emp;

    2. If Condition Activity: Check if the result is 'pass'. Use the below expression to evaluate:

    @equals(activity('Lookup1').output.firstRow.result, 'pass')

    3.Copy Data Activity: Inside true block of If condition 'pass', use copy activity to copy the result to Blob Storage by configuring the source and sink datasets.

    Hope it helps. Kindly accept the answer by clicking the Accept answer button. Thankyou


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.