Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric Data Days Monthly is back. Join us on March 26th for two expert-led sessions on 1) Getting Started with Fabric IQ and 2) Mapping & Spacial Analytics in Fabric. Register now

Reply
Anonymous
Not applicable

Handling Output Parameter for Identity Field in Stored Procedure with ADF

Hi everyone,

I'm currently working on a data migration task using Azure Data Factory (ADF) and encountering an issue with handling an output parameter that is also an identity field in a SQL Server stored procedure.

 

Objective:

Migrate data from a JSON file stored in Azure Blob Storage to a SQL Server table using a stored procedure.

 

Context:

Source: JSON file stored in Azure Blob Storage.

ADF Activities:Lookup1 Activity:

Successfully fetches data from the JSON file.

Stored Procedure Activity: Uses a stored procedure ([dbo].[Trip]) to insert data into the SQL Server table.

Stored Procedure Details:The stored procedure inserts records into the table and generates an ID field as an identity column.

The ID field is also defined as an output parameter in the stored procedure.

 

Issue: The Stored Procedure activity fails due to the output parameter.

 

How can I handle the output parameter (which is also an identity field) in the stored procedure when using Azure Data Factory? Is there a workaround to successfully execute the stored procedure and retrieve the generated identity value?

 

Any insights or suggestions would be greatly appreciated.

 

Thank you!

1 REPLY 1
NandanHegde
Super User
Super User

You can use Lookup activity or script activity to execute a Stored procedure with an output value.

SP activity is only for SP execution with no output value




----------------------------------------------------------------------------------------------
Nandan Hegde (MSFT Data MVP)
LinkedIn Profile : www.linkedin.com/in/nandan-hegde-4a195a66
GitHUB Profile : https://github.com/NandanHegde15
Twitter Profile : @nandan_hegde15
MSFT MVP Profile : https://mvp.microsoft.com/en-US/MVP/profile/8977819f-95fb-ed11-8f6d-000d3a560942
Topmate : https://topmate.io/nandan_hegde
Blog :https://datasharkx.wordpress.com

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Fabric Update Carousel

Fabric Monthly Update - February 2026

Check out the February 2026 Fabric update to learn about new features.