How to Insert hexadecimal value(timestamp data type) from SQL Server to syapse Delta lake table as string type

heta desai 247 Reputation points
2022-09-18T19:17:33.217+00:00

There is a column in SQL Server with timestamp datatype which stores hexadecimal value like '0x00000000018B8199 ' . I want to load this data into synapse delta lake table as string. I am using pipeline and data load Data from SQL Server to synapse delta lake.

I have used below query to read data using dataflow but it stores junk characters are into delta lake table.

SELECT CONVERT(varchar(100),CONVERT(varbinary(64), column1)) AS NewColumn FROM dbo.test  

Please suggest me the way hex data as a string into synapse delta lake

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,402 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 112.5K Reputation points
    2022-09-18T19:27:22.857+00:00

    Did you try CONVERT(varchar(100), CONVERT(varbinary(64), column1), 1)?