An Azure service for ingesting, preparing, and transforming data at scale.
Hi Shayan Siddique,
Yes, to store the complete REST API response as raw JSON in a single SQL column, you can use either of the following supported approaches:
Web Activity + Stored Procedure (Recommended for reliability)
Use Web Activity to call the REST API.
Capture full response using: @activity('WebActivityName').output.Response
Pass this output to a Stored Procedure Activity.
Insert into SQL table with a column like NVARCHAR(MAX).
This approach ensures the complete JSON response is preserved exactly as received from the API, without any schema mapping or automatic flattening by Azure Data Factory, and it is more reliable for handling large payloads, especially those exceeding 4 MB.
Copy Activity
In REST dataset → set JSON settings = Single document
In Sink (SQL) → create one column (NVARCHAR(MAX))
In Mapping tab → remove all mappings (important)
Let ADF perform default behavior (schema-agnostic copy)
In Azure Data Factory, arrays may still get flattened by default, so this approach works reliably only when the response is handled as a single JSON document and no tabular or column-level mapping is applied.
Make sure
Ensure column type is NVARCHAR(MAX)
For array responses → Copy Activity may still create multiple rows
For guaranteed single-row storage → Web Activity approach is preferred
For advanced scenarios → use Mapping Data Flow (Aggregate + collect())
To store REST API response as raw JSON in a single row, use Web Activity + Stored Procedure for full control and reliability. Copy Activity can work if configured as a single document with no mappings, but may not consistently handle array responses.
Reference Links:
Azure Data Factory REST connector
Azure Data Factory Web Activity
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
Please do not forget to "up-vote" wherever the information provided helps you, as this can be beneficial to other community members.