Msg 8152, Level 16, State 14, Line 1 String or binary data would be truncated. The statement has been terminated??

Anmol Ganju 166 Reputation points
2022-01-20T06:11:26.34+00:00

I had come up with a strange issue while working with the ADF V2, I have a pipeline that we run for multiple table where only thing is required to execute the stored procuedres, now we have 10-15 lines of code writtent to execute the stored procedure that takes data from stage tables and populate the facts and dimensions, whenever we run the procedure from SSMS it runs successfuly without any issues, but when we try to run this using ADF stored procedure activity it fails delebraetly with this error:

Msg 8152, Level 16, State 14, Line 1
String or binary data would be truncated.
The statement has been terminated.

both our tables are in Synapse Analytics, when we look depper into the procedure and tried to increase the length of the data type from 50 to 150 the stored procedure worked from ADF itself, but not sure I understand this earlier this was working from SSMS itself and not from ADF and after increase the length of the data type this started to work. Any insights would be helpful

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,343 questions
{count} votes