exam questions

Exam DP-203 All Questions

View all questions & answers for the DP-203 exam

Exam DP-203 topic 2 question 113 discussion

Actual exam question from Microsoft's DP-203
Question #: 113
Topic #: 2
[All DP-203 Questions]

You have an Azure SQL database named DB1 and an Azure Data Factory data pipeline named pipeline1.

From Data Factory, you configure a linked service to DB1.

In DB1, you create a stored procedure named SP1. SP1 returns a single row of data that has four columns.

You need to add an activity to pipeline1 to execute SP1. The solution must ensure that the values in the columns are stored as pipeline variables.

Which two types of activities 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
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
[Removed]
Highly Voted 1 year, 10 months ago
Selected Answer: AC
https://learn.microsoft.com/en-us/answers/questions/925742/how-to-process-output-from-stored-procedure-in-azu SP Activity does not capture result.. use lookup instead of script
upvoted 8 times
...
andie123
Highly Voted 1 year, 9 months ago
why not CD? A Lookup activity can be used to execute a query or stored procedure against a data source and retrieve a single row of data. The returned values can then be stored as pipeline variables and used in subsequent activities. A Stored Procedure activity can be used to directly execute a stored procedure against a data source. The returned values can be captured as output parameters and stored as pipeline variables for use in subsequent activities.
upvoted 6 times
tmz1
6 months, 1 week ago
Tested on ADF D: Stored Procedure activity is not correct. This activity cannot return rows as an output and therefor it cannot be used to store values in columns as pipeline variables. Script and Lookup activities can output results of stored procedure. A & C are correct answers
upvoted 1 times
...
...
seranvijay
Most Recent 6 months, 1 week ago
Selected Answer: C
When the stored procedure has Output parameters, instead of using stored procedure activity, use lookup acitivty and Script activity. Stored procedure activity does not support calling SPs with Output parameter yet. https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-stored-procedure
upvoted 1 times
...
GSE_aQ
8 months, 3 weeks ago
correct answers are A and C "When the stored procedure has Output parameters, instead of using stored procedure activity, use lookup acitivty and Script activity. Stored procedure activity does not support calling SPs with Output parameter yet. If you call a stored procedure with output parameters using stored procedure activity, following error occurs. Execution fail against sql server. Please contact SQL Server team if you need further support. Sql error number: 201. Error Message: Procedure or function 'sp_name' expects parameter '@output_param_name', which was not supplied." https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-stored-procedure
upvoted 1 times
...
swathi_rs
1 year ago
Selected Answer: CD
correct answer is C and D
upvoted 2 times
...
Dusica
1 year ago
AC cannot capture SP output params with sP activity
upvoted 1 times
...
Azure_2023
1 year, 3 months ago
Selected Answer: AC
When the stored procedure has Output parameters, instead of using stored procedure activity, use lookup activity and Script activity. Stored procedure activity does not support calling SPs with Output parameter yet. https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-script
upvoted 3 times
...
be8a152
1 year, 3 months ago
A. Script & C. Lookup are the correct answers Incorrect D.Stored procedure activity doesn't return any values. B.Copy Activity is meant for copying data only
upvoted 1 times
...
[Removed]
1 year, 8 months ago
Selected Answer: AC
Script lookup
upvoted 1 times
...
Mal2002
1 year, 8 months ago
Here is an example of how we can use the Script activity to execute SP1: Script activity (name: "ExecuteSP1Script") { ScriptSource = "<![CDATA[ var results = SqlCommand('EXEC SP1', connection); var myVar = results[0]; ]]>" } In this example, the ScriptSource property specifies the script that is used to execute SP1. The script first executes the SQL statement EXEC SP1. The script then stores the results of SP1 in the variable myVar. Correct Answers are: A & D
upvoted 1 times
...
kkk5566
1 year, 8 months ago
Selected Answer: AC
is correct
upvoted 1 times
...
[Removed]
1 year, 10 months ago
sorry, Answer - AC
upvoted 1 times
...
[Removed]
1 year, 10 months ago
Answer is wrong - https://learn.microsoft.com/en-us/answers/questions/925742/how-to-process-output-from-stored-procedure-in-azu Answer is CD. SP act cannot emit result..
upvoted 3 times
...
Mani_V
1 year, 10 months ago
CD is the rite answer
upvoted 2 times
...
vctrhugo
1 year, 11 months ago
Selected Answer: AD
https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-stored-procedure https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-script
upvoted 4 times
...
WayOps
1 year, 11 months ago
C. Lookup D. Stored Procedure Explanation: C. Lookup: The Lookup activity is used to retrieve a dataset from a data source and the output can be used in subsequent activities. It is often used to fetch a small amount of data to be used as parameters in other activities. In this case, it can be used to execute the stored procedure and capture the result into pipeline variables. D. Stored Procedure: The Stored Procedure activity is used specifically to execute stored procedures. You can capture the output of the stored procedure and assign it to pipeline variables. This activity is designed specifically for executing stored procedures, making it a direct option for this requirement. A. Script: There is no "Script" activity in Azure Data Factory. B. Copy: The Copy activity is primarily used for copying data from a source to a destination and is not suitable for executing a stored procedure and capturing its output into pipeline variables.
upvoted 3 times
vctrhugo
1 year, 11 months ago
There is Script activity in ADF. "The script may contain either a single SQL statement or multiple SQL statements that run sequentially. You can use the Script task for the following purposes: [...] Run stored procedures. [...]" https://learn.microsoft.com/en-us/azure/data-factory/transform-data-using-script
upvoted 4 times
...
...
mehroosali
1 year, 11 months ago
I think the correct answer is C and D.
upvoted 1 times
vctrhugo
1 year, 11 months ago
You use lookup to consume, not to get.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago