Azure Data Factory Activity for Stored Procedure Output
You are creating an Azure Data Factory pipeline. You need to add an activity to the pipeline. The activity must execute a Transact-SQL stored procedure that has the following characteristics: • Returns the number of sales invoices for a current date • Does NOT require input parameters Which type on activity should you use?
Community Votes
83% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Tests the distinction between activities: use Stored Procedure for execution only, but use Lookup when you need to capture and pass back the result of a query or stored procedure.
The Lookup activity is the correct choice for executing a stored procedure that returns a result set or scalar value, whereas the Stored Procedure activity does not support returning output values.
Candidates often select 'Stored Procedure' because it seems logically appropriate for running SQL code, failing to realize that this specific activity cannot return data to the pipeline.
Community Discussion (5 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The Lookup activity is designed to read data from a data store and return the results to the pipeline. According to Microsoft documentation, it can execute a query or a stored procedure and return the result as an object in the pipeline context. This allows subsequent activities to access the returned count.Why the Other Options Are Wrong
The Stored Procedure activity (Option A) executes the procedure but does not return any output values or result sets to the pipeline; it is used solely for side effects. Get Metadata (Option B) retrieves file/folder metadata, not query results. Append Variable (Option C) modifies variables and does not execute database queries.Community Comment Notes
Comments [1] and [2] correctly cite Microsoft docs stating that the Stored Procedure activity does not allow returning output. Comment [3] reinforces that Lookup is required for SPs with outputs or return values. Comment [5] incorrectly suggests Stored Procedure activity handles results, which contradicts official behavior.Official Reference
Exam Strategy
Remember that if a question requires 'returning' or 'capturing' data from a database operation, choose Lookup. If it only requires 'executing' without needing the result, choose Stored Procedure.