Stored Procedure Error

Madhusudan Reddy Mandala 1 Reputation point
2021-08-16T11:42:18.95+00:00

Cannot create Sql Source. Please double check the connection string, stored procedure are set with correct format. Error: The value of the property 'Value' is invalid for the stored procedure parameter 'RunID'

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

3 answers

Sort by: Most helpful
  1. Madhusudan Reddy Mandala 1 Reputation point
    2021-08-16T13:23:10.093+00:00

    ADF Pipeline

    123587-adf-pipeline.png

    Error

    123610-adf-pipeline-2.png

    Stored Procedure

    123635-adf-pipeline-25.png

    JSON Code of Lookup Activity

    123565-json-of-lookup-activity.png

    Parameters of Stored Procedure

    123489-adf-pipeline-3.png

    Dynamic Content of RunID

    123627-dynamic-parameter-of-runid.png

    0 comments No comments

  2. Nandan Hegde 36,716 Reputation points MVP Volunteer Moderator
    2021-08-16T13:38:19.697+00:00

    Hey,

    PFB the sample code:
    Declare @test varchar(255)
    Set @test = '@{pipeline().DataFactory}'
    Select @test

    123641-issue.png

    Add the value in quotes as Ids are Guid values and close the parameter with } .
    In case if your RunId is some internal int value no need to add it in quotes, just terminate the bracket


  3. Ryan Abbey 1,186 Reputation points
    2021-08-16T20:45:04.4+00:00

    I'd suggest putting all that logic in to a "Lookup Activity" stored procedure (not sure if you're doing a stored procedure or select max in that activity) so that the correct ID is returned

    PS what if this process is kicked off twice concurrently, they'd both end up with ID 1000?


Your answer

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