Azure Data factory - copy data from mysql to mssql json type issue

benny.wong 26 Reputation points
2021-03-24T02:26:13.12+00:00

I am trying to migrate db from mysql to mssql via copy data in data factory. When the type of column is JSON, it's converted to Byte[] automatically and the data is converted to byte as well. Then, the data in mssql is byte, not string after migration. ![80818-screenshot-2021-03-24-at-100907-am.png][1] [1]: /api/attachments/80818-screenshot-2021-03-24-at-100907-am.png?platform=QnA Can I change the type of source and destination before migration?

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

Accepted answer
  1. HimanshuSinha-msft 19,376 Reputation points Microsoft Employee
    2021-03-24T22:23:32.097+00:00

    Hello @benny.wong ,
    Thanks for the ask and using the Microsoft Q&A platform .

    JSON is not a supported data type for MYSQL in ADF , please do check out the support data types here . For the second part of the ask you you please share the JSON ( please obfusticate the actual data ) ?

    .
    Thanks
    Himanshu
    Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. benny.wong 26 Reputation points
    2021-03-25T02:59:58.107+00:00

    Hello @HimanshuSinha-msft ,

    Thanks for your answer.
    For the first question, if ADF cannot support json type, then I should change the type in advance.
    For the second question, I found that the data loss is due to the type TEXT in mysql not enough length to store the data. It will be fine when I use the type MEDIUMTEXT or LONGTEXT.

    Thanks again to reply my question.