Reputation: 11
I have a requirement where I have a string type json value which I need to write to varbinary type column in Azure SQL db. No matter what I do, I get complained during copy activity that type doesn't match. The string value in JSON is already a hexadecimal, I'm just not sure how can I translate that to a varbinary type in copy activity.
Any help would be appreciated
I have tried changing the sink column type to Byte[] array, varbinary
Upvotes: 0
Views: 108
Reputation: 8402
. To write a string type to SQL table you need to use lookup with the script activity to insert ta data.
Insert into <table_name> values (1,Convert(varbinary(max),'@{activity('Lookup1').output.firstRow}'))
Upvotes: 0