DP-203 · Question #416
You have an Azure subscription that contains an Azure SQL database named SQL1 and an Azure data factory named ADF1. You need to create a pipeline in ADF1 that will perform the following actions…
The correct answer is D. Lookup. The ADF Lookup activity executes a query or stored procedure and returns the result set, which can then be iterated over or used to set variables in downstream activities.
Question
You have an Azure subscription that contains an Azure SQL database named SQL1 and an Azure data factory named ADF1. You need to create a pipeline in ADF1 that will perform the following actions:
- Execute a stored procedure to retrieve three configuration values
from SQLI.
- For each value, execute the Set Variable activity.
Which activity should you use to retrieve the configuration values?
Options
- AGet Metadata
- BCopy
- CStored procedure
- DLookup
How the community answered
(21 responses)- A10% (2)
- B5% (1)
- C5% (1)
- D81% (17)
Why each option
The ADF Lookup activity executes a query or stored procedure and returns the result set, which can then be iterated over or used to set variables in downstream activities.
The Get Metadata activity retrieves metadata properties of a dataset (such as column names, row count, or last modified time) but cannot execute a stored procedure to retrieve custom configuration values.
The Copy activity moves data from a source to a sink and is not designed to retrieve small result sets for use as pipeline variables in subsequent activities.
The Stored Procedure activity executes a stored procedure in Azure SQL but does not expose the output result set to downstream activities; it is used for side-effect operations, not for retrieving values.
The Lookup activity in Azure Data Factory is specifically designed to retrieve a dataset or row set from a linked service, including by executing a stored procedure. The returned rows can be directly referenced in subsequent activities such as ForEach and Set Variable, making it the correct choice for retrieving configuration values for downstream use.
Concept tested: ADF Lookup activity for stored procedure result retrieval
Source: https://learn.microsoft.com/en-us/azure/data-factory/control-flow-lookup-activity
Topics
Community Discussion
No community discussion yet for this question.