I have a sql DB which stores hash value in the column of binary data type. I use sql hashbytes of shah256 algorithm in my sql stored procedure to find hash value and store in the db. I want to replicate the same in Azure data factory. I'm seeing sha2(256) algorithm in derived expression in data flow and i'm trying to utilise this function. But this returns the string and i'm trying to convert this to binary and inserting into sql database using sink activity. But i'm getting the below error.
{"message":"at Sink 'EmployeeInsert': java.sql.BatchUpdateException: String or binary data would be truncated.. Details:at Sink 'EmployeeInsert': java.sql.BatchUpdateException: String or binary data would be truncated.","failureType":"UserError","target":"EmployeeDataFlow","errorCode":"DFExecutorUserError"}
Hope i have explained my problem in detail and any help would be appreciated. Thanks in advance.