Reputation: 75
I have an ADF pipeline where I have a variable 'ParameterName' with datatype String.
This one is filled with a SQL lookup where I have tried:
SELECT CAST(NEWID() AS VARCHAR(50)) AS ParameterName and SELECT NEWID() AS ParameterName
After that I set the variable with:
@activity('Get ParameterName').output.firstRow.ParameterName
But when I later try to use this as a parameter for a stored procedure (with datatype GUID) it returns an error. I take as value for the parameter: @variables('ParameterName').
The stored procedure is expecting a parameter with datatype UNIQUEIDENTIFIER.
And it seems that the datatype gives issues because I receive this error:
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 'ParameterName'.
So the question is; how to fix this? I can update Stored Proc to let it accept varchar instead of uniqueidentifier but that is not what I prefer. I would like to align datatypes in Data Factory to the type SQL expects it to be.
Somebody has an idea what is the case here?
Upvotes: 0
Views: 1519