Forum Discussion
I wanted to Store Rest API Response as A JSON in the SQL Database Table
Hi Shayan12378 ,
Have you tried enabling the checkbox "Map complex values to string"
Thanks,
Srisakthi
Yes
- Srisakthi5 months agoSuper User
- Shayan123785 months agoRegular Visitor
Srisakthi With the Below Mapping
It is not writting any data in my SQL Table Field{"dataRead": 833639,"dataWritten": 0,"sourcePeakConnections": 1,"sinkPeakConnections": 1,"rowsRead": 60,"rowsCopied": 142,"copyDuration": 21,"throughput": 166.728,"errors": [],"effectiveIntegrationRuntime": "AutoResolveIntegrationRuntime (East US)","usedDataIntegrationUnits": 4,"billingReference": {"activityType": "DataMovement","billableDuration": [{"meterType": "AzureIR","duration": 0.016666666666666666,"unit": "DIUHours"}],"totalBillableDuration": [{"meterType": "AzureIR","duration": 0.016666666666666666,"unit": "DIUHours"}]},"usedParallelCopies": 1,"executionDetails": [{"source": {"type": "RestService"},"sink": {"type": "AzureSqlDatabase","region": "East US"},"status": "Succeeded","start": "3/12/2026, 7:14:16 PM","duration": 21,"usedDataIntegrationUnits": 4,"usedParallelCopies": 1,"profile": {"queue": {"status": "Completed","duration": 12},"transfer": {"status": "Completed","duration": 5,"details": {"readingFromSource": {"type": "RestService","workingDuration": 1,"timeToFirstByte": 0},"writingToSink": {"type": "AzureSqlDatabase","workingDuration": 0}}}},"detailedDurations": {"queuingDuration": 12,"timeToFirstByte": 0,"transferDuration": 5}}],"dataConsistencyVerification": {"VerificationResult": "Unsupported"},"durationInQueue": {"integrationRuntimeQueue": 0}}- Srisakthi5 months agoSuper User
Hi Shayan12378 ,
Consider this example, I have my json like this format and i want to store orders entire json into one of my column in my sql db table.
under mapping section of ADF, click on import schemas, select "Map complex values as string" and then if you see orders json come as array and then select column name to store. Exclude other columns
sometime it takes time to refresh the arrays properly
You can also check this link for reference https://sarnendude.com/azure-data-factory-copy-activity-how-to-save-json-data-as-string-in-azure-synapse-analytics-sql-pool/
Regards,
Srisakthi