ADF pipeline passing string parameter to stored procedure error

Boddington, Nick (HARVEY NASH) 0 Reputation points
2024-04-10T15:07:35.92+00:00

I have a stored procedure in an Azure SQL Server DB which expects a parameter '@StagingTableName' of type NVARCHAR(50).

CREATE PROCEDURE dbo.spValidateImportGeneric

(@StagingTableName NVARCHAR(50))

AS...

When I try to pass the parm from the pipeline as @variables('ImportTableName') - which is defined as a String, I get this error:

Cannot create Sql Source. Please double check the connection string, stored procedure are set with correct format. Error: The value of property 'storedProcedureParameters' is in unexpected type 'IDictionary`2'.

Can anyone suggest a solution.

Thanks

Nick

Azure SQL Database
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,696 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Boddington, Nick (HARVEY NASH) 0 Reputation points
    2024-04-11T09:43:28.8366667+00:00

    I did resolve the problem by deleting the existing parameter and replacing it with a string. This worked OK.


  2. Bhargava-MSFT 31,021 Reputation points Microsoft Employee
    2024-04-11T16:32:40.3366667+00:00

    Hi Boddington, Nick (HARVEY NASH)

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer .

    Issue:

    Unable to pass parameter to stored procedure

    Error Message:

    Cannot create Sql Source. Please double check the connection string, stored procedure are set with correct format. Error: The value of property 'storedProcedureParameters' is in unexpected type 'IDictionary`2'.

    Solution:

    This issue was resolved by deleting the existing parameter and replacing it with "String" type.

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    I hope this helps!

    0 comments No comments

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.