Hi WAJIH Arfaoui,
Thanks for reaching out to Microsoft Q&A.
Ensure that the parameter is properly defined and referenced in your pipeline and activity settings. Validate the following steps to narrow down the issue.
- Define the Pipeline Parameter:
- Go to your Synapse pipeline -->Add a pipeline parameter by going to the "Parameters" section on the pipeline canvas.
- Name the parameter 'DateParam'.
- Set the Type to 'String'.
- Enter a default value, such as '2024-08-06'.
- Configure the Stored Procedure Activity:
- In your Stored Procedure Activity, ensure you have the correct SQL Stored Procedure that accepts a parameter. Based on your description, it seems you have this set up already.
- Go to the “Settings” tab of the Stored Procedure Activity. Under “Stored Procedure Parameters,” add a new parameter.
- Set the "Parameter Name" to match the parameter in your stored procedure (e.g., '@DateParam').
- In the "Value" field, instead of using '@pipeline().parameters.DateParam' directly in your SQL code, you should set this in the Expression field: '@pipeline().parameters.DateParam'. Make sure to select the Expression tab (fx) when setting this value.
- Validate the Expression:
- Double-check that you have entered the expression correctly: '@pipeline().parameters.DateParam'. Make sure there are no extra spaces or syntax errors in the expression.
- Debugging Tips:
- Before running the pipeline, try to manually set the 'DateParam' parameter in the debug/run settings to see if the pipeline executes correctly. Check the SQL code in the stored procedure to ensure there are no errors and that it correctly uses the parameter passed to it.
Try and let me know
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.