An Azure service for ingesting, preparing, and transforming data at scale.
The catch here is the wrapper. ADF's REST sink sends data as a plain JSON array of records ([ {..}, {..} ]). It can reshape each record with mapping, but it can't add your outer dataload / Metadata / Data.Rows envelope. So the Copy activity alone won't produce the format your API needs.
Since the data already sits in Unity Catalog / ADLS, I'd build the batches where the data is and let ADF orchestrate:
- In a Databricks notebook, read the table and split it into chunks of 500,000 rows or fewer (for example by row number ranges).
- For each chunk, build the exact body your API expects (Metadata block plus
Data.Rowswith theValuesarrays) and POST it withrequests. Use gzip if the API accepts it, since 500k rows is a large payload. - Send the chunks one after another, with a short delay, and log the response for each batch so a failed batch can be re-sent alone.
- In ADF, call that notebook with a Databricks Notebook activity, passing the table name and batch size as parameters.
With 2 million rows that's only 4 requests, well within the 20-request limit.
Does the API expect the Metadata block in every request, or only in the first one?
If this approach works for your load, please consider accepting it as the answer. If the API rejects the batched bodies, let me know and I'll be happy to keep helping.
Reference: