none
How to pass the parameter for stored procedure through ADFv2

    Question

  • Hi,

    I want to pass the pipeline trigger date for stored procedure through ADFv2. But i'm getting "Activity SP_RecordSplit failed: Procedure SP_RecordSplit has no parameters and arguments were supplied." error. Could anyone please help me to fix this issue. A variable @slicetime is passed in the stored procedure.

    Below attached the code I'm used on the adf.

    "typeProperties": {
    "storedProcedureName": "[dbo].[SP_RecordSplit]",
    "storedProcedureParameters": {
    "Slicetime": {
    "value": {
    "value": "@pipeline().TriggerTime",
    "type": "Expression"
    },
    "type": "DateTime"
    }
    }
    },

    Thanks.

    Sunday, September 9, 2018 10:35 AM

Answers

  • Hi Sadiqh,

    According to the json code you post, I believe you were using stored procedure activity in ADF. Didn't find anything wrong in the json code, please make sure the "Slicetime" you specified in "storedProcedureParameters" is exactly the right name of the parameter in the stored procedure "[dbo].[SP_RecordSplit]", don't forget to watch the capitalization in the parameter name. Thanks.


    • Edited by Wang Zhang Sunday, September 9, 2018 1:52 PM
    • Marked as answer by Sreeprasad K S Tuesday, September 11, 2018 5:22 PM
    Sunday, September 9, 2018 1:49 PM

All replies

  • Hi Sadiqh,

    According to the json code you post, I believe you were using stored procedure activity in ADF. Didn't find anything wrong in the json code, please make sure the "Slicetime" you specified in "storedProcedureParameters" is exactly the right name of the parameter in the stored procedure "[dbo].[SP_RecordSplit]", don't forget to watch the capitalization in the parameter name. Thanks.


    • Edited by Wang Zhang Sunday, September 9, 2018 1:52 PM
    • Marked as answer by Sreeprasad K S Tuesday, September 11, 2018 5:22 PM
    Sunday, September 9, 2018 1:49 PM
  • Hi Sadiqh,

    I want to pass the @trigger().scheduledTime as parameter for stored procedure to get the trigger scheduled time. But when I pass @trigger().scheduledTime as parameter, I'm getting "Activity SP_RecordSplit failed: 'The template language expression 'trigger().scheduledTime' cannot be evaluated because property 'scheduledTime' doesn't exist, available properties are 'name, outputs, startTime, endTime, trackingId, clientTrackingId, status'." error.

    I'm able pass @trigger().startTime as parameter.

    Could you please advise me what will be issue here ?

    typeProperties": {
    "storedProcedureName": "[dbo].[SP_RecordSplit]",
    "storedProcedureParameters": {
    "slicetime": {
    "value": {
    "value": "@trigger().scheduledTime",
    "type": "Expression"
    },
    "type": "Date"
    }
    }
    },

    Thanks


    Tuesday, September 11, 2018 5:27 PM
  • Hi there,

    You could find the solution in this thread.

    Thanks.

    Wednesday, September 12, 2018 5:33 AM