Execute Stored Procedure and Return Values in Fabric Pipeline

Answer Correct answer: D — Add a Lookup activity to execute the stored procedure and make the returned values available to downstream activities.

You have a Fabric tenant. You are creating an Azure Data Factory pipeline. You have a stored procedure that returns the number of active customers and their average sales for the current month. You need to add an activity that will execute the stored procedure in a warehouse. The returned values must be available to the downstream activities of the pipeline. Which type of activity should you add?

  1. Switch
  2. Copy data
  3. Append variable
  4. Lookup Correct Answer

Community Votes

D
100%

100% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

The question tests executing a stored procedure and passing its output downstream, where the common trap is assuming a dedicated Stored Procedure activity exists or choosing a data movement activity like Copy data.

The Lookup activity in a Fabric Data Factory pipeline executes a stored procedure and makes its returned values available to downstream activities. This page establishes Lookup as the correct activity type for retrieving data from a warehouse execution.

Choosing Copy data or assuming a specific Stored Procedure activity is needed, failing to recognize that Lookup activity executes queries/stored procedures and captures their output for downstream use.

Community Discussion (13 comments)

calvintcy 👍 12
I took the test today, and this question was included. The options were: Switch, Copy Activity, Script, and Stored Procedure. I chose Script.
Fer079 👍 6 Selected: D
Lookup activity reads and returns the content of a configuration file or table. It also returns the result of executing a query or stored procedure. The output can be a singleton value or an array of attributes, which can be consumed in a subsequent copy, transformation, or control flow activities like ForEach activity. https://learn.microsoft.com/en-us/azure/data-factory/control-flow-lookup-activity
2fe10ed 👍 2 Selected: D
Script or Lookup activity https://learn.microsoft.com/en-us/fabric/data-factory/lookup-activity https://blog.fabric.microsoft.com/id-id/blog/automate-fabric-data-warehouse-queries-and-commands-with-data-factory?ft=All
matmat25810 👍 2
Script -> https://learn.microsoft.com/en-us/fabric/data-factory/tutorial-preprocess-data-with-stored-procedure-load-into-lakehouse
sandy789 👍 1
Stored proc would be the answer
72bd3bc 👍 3
Lookup activity reads and returns the content of a configuration file or table. It also returns the result of executing a query or stored procedure. The output can be a singleton value or an array of attributes, which can be consumed in a subsequent copy, transformation, or control flow activities like ForEach activity. the quote from https://learn.microsoft.com/en-us/fabric/data-factory/lookup-activity so I suppose the answer is correct. But why Append variable isn't correct?
Murtaza_007 👍 1
The correct answer is D
louisaok 👍 1
https://learn.microsoft.com/en-us/azure/data-factory/tutorial-pipeline-failure-error-handling Upon Success: (Default Pass) Execute this path if the current activity succeeded Upon Failure: Execute this path if the current activity failed Upon Completion: Execute this path after the current activity completed, regardless if it succeeded or not Upon Skip: Execute this path if the activity itself didn't run
hello2tomoki 👍 2
https://pragmaticworks.com/blog/azure-data-factory-lookup-and-stored-procedure
Nefirs 👍 2
I'd say D
earlqq 👍 1
it`s strange, because there is activity stored proc in fabric pipes.
clux 👍 2 Selected: D
Correct
prabhjot 👍 2
ANS D - Lookup

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

The Lookup activity in Azure Data Factory and Fabric Data Factory is specifically designed to retrieve data by executing a query or stored procedure. Its primary feature is that it returns the output—either a singleton value or an array of attributes—which can then be consumed by downstream activities like ForEach or conditional executions. This perfectly matches the requirement to execute a stored procedure and make the returned values available to subsequent pipeline steps.

Why the Other Options Are Wrong

The Switch activity is a control flow activity used for routing based on conditions, not for executing queries or returning data. The Copy data activity is designed for data movement between sources and sinks, not for executing stored procedures and capturing scalar or tabular outputs for downstream logic. The Append variable activity is used to add values to an array variable, but cannot execute a stored procedure or retrieve data from a warehouse on its own.

Community Comment Notes

Several commenters pointed out that the Lookup activity "returns the result of executing a query or stored procedure" which can be consumed downstream, as Fer079 noted. However, calvintcy mentioned that in their actual exam, the options were "Switch, Copy Activity, Script, and Stored Procedure," and they chose Script, indicating that Microsoft may have updated the options to include Fabric-specific activities like Script. Given the provided options in this prompt, Lookup is the only valid choice that fulfills the requirement.

Official Reference

Exam Strategy

When a pipeline requires executing a stored procedure and capturing its output for downstream logic, identify the Lookup activity as the bridge between execution and data retrieval. Do not confuse data movement activities with control flow or data retrieval activities.

Related Analysis

Practice All DP-600 Questions

Access 115 questions with complete answers and detailed explanations.

View Full DP-600 Practice Test →

← Back to DP-600 Study Guide