How to insert json object in single Column in Azure Synapse SQL Table through Azure Datafactory?

KUMAR Abhishek 51 Reputation points
2020-07-20T12:06:04.703+00:00

I have a requirement to insert JSON object from json file into single Column in Table of Azure Synapse SQL,

I have tried using Copy activity in data factory but I'm getting below error:

{
"errorCode": "2200",
"message": "Failure happened on 'Sink' side. ErrorCode=JsonUnsupportedHierarchicalComplexValue,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The retrieved type of data JObject with value {\"Offer\":\"CentOS\",\"ServiceType\":\"Standard_A1_v2\",\"xxxx\":\"\",\"Publisher\":\"OpenLogic\",\"Sku\":\"7.5\",\"Meterid\":\"xxxxxxxxxxx\",\"ImageType\":\"\"} is not supported yet. Please either remove the targeted column 'Personalized' or enable skip incompatible row to skip the issue rows.,Source=Microsoft.DataTransfer.Common,'",
"failureType": "UserError",
"target": "Copy data1",
"details": []
}

Can you suggest me if it is possible through Azure Data Factory ?

@KranthiPakala-MSFT

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

1 answer

Sort by: Most helpful
  1. KranthiPakala-MSFT 46,642 Reputation points Microsoft Employee Moderator
    2020-07-22T06:32:06.6+00:00

    Hi @KUMAR Abhishek ,

    Could you please try enabling Map Complex values to string under Mapping section of Copy activity and try to map the complex column to the desired destination column.

    13274-image.png

    This should help to resolve the issue. Please let us know how it goes.

    ----------

    Thank you
    Please do consider to click on "Accept Answer" and "Upvote" on the post that helps you, as it can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.