
Answer-first summary for fast verification
Answer: Script, Lookup
## Analysis of Activity Options for Executing Stored Procedure SP1 ### Requirements: - Execute stored procedure SP1 from Azure SQL Database DB1 - SP1 returns a single row with four columns - Column values must be stored as pipeline variables - Each correct answer presents a complete solution ### Evaluation of Options: **A: Script Activity** ✅ - The Script activity allows executing SQL scripts and stored procedures against SQL databases - It can capture query results and assign them to pipeline variables - The activity output can be configured to store result set values as variables - Supports parameter binding and result set processing - Can handle single-row results effectively **B: Copy Activity** ❌ - Primarily designed for data movement between sources and destinations - Not suitable for executing stored procedures and capturing output as variables - Focuses on bulk data transfer rather than procedural execution - Cannot directly store individual column values as pipeline variables **C: Lookup Activity** ✅ - Specifically designed to retrieve datasets from data sources - Can execute stored procedures and capture the output - Returns the result set which can be accessed in subsequent activities - For single-row results, column values can be extracted and stored as variables - Well-suited for parameter retrieval scenarios **D: Stored Procedure Activity** ❌ - While designed to execute stored procedures, it has limitations with output parameters - According to Microsoft documentation, the Stored Procedure activity does not support calling stored procedures with output parameters - Cannot reliably capture and store column values as pipeline variables - More suitable for procedures that perform operations without returning result sets ### Optimal Solution: The correct activities are **Script (A)** and **Lookup (C)** because: - Both can execute stored procedures against Azure SQL Database - Both can capture and process the single-row result set - Both allow storing column values as pipeline variables for use in subsequent activities - Both provide reliable mechanisms for parameter handling and result processing ### Why Other Options Are Less Suitable: - **Copy Activity (B)**: Designed for data movement, not procedural execution with variable assignment - **Stored Procedure Activity (D)**: Limited support for output parameters and result set processing, making it unreliable for storing column values as variables
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You have an Azure SQL database named DB1 and an Azure Data Factory pipeline named pipeline1. A linked service to DB1 is configured in Data Factory.
A stored procedure named SP1 is created in DB1. SP1 returns a single row of data containing four columns.
You need to add an activity to pipeline1 to execute SP1. The column values from the result must be stored as pipeline variables.
Which two activity types can you use to execute SP1? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A
Script
B
Copy
C
Lookup
D
Stored Procedure