question

javier-8889 avatar image
1 Vote"
javier-8889 asked marusyk answered

Does ADF Mapping Flows support Cosmos DB Serverless?

Hi I'm trying to insert records in bulk using ADF Mapping Flows. Source is in csv format. However I get the following error when debugging:

 {"StatusCode":"DFExecutorUserError","Message":"Job failed due to reason: at Sink 'sink1': java.lang.IllegalStateException: com.microsoft.azure.documentdb.DocumentClientException: Reading or replacing offers is not supported for serverless accounts.\r\nActivityId: 6bfbf055-49fb-4547-94b9-0b09f4b15ecc, Microsoft.Azure.Documents.Common/2.11.0, StatusCode: BadRequest","Details":"at Sink 'sink1': java.lang.IllegalStateException: com.microsoft.azure.documentdb.DocumentClientException: Reading or replacing offers is not supported for serverless accounts.\r\nActivityId: 6bfbf055-49fb-4547-94b9-0b09f4b15ecc, Microsoft.Azure.Documents.Common/2.11.0, StatusCode: BadRequest"}


My understanding is that ADF is trying to change an offer and that conflicts with the fact that my db is in serverless mode. Is there any setting that I am missing to adjust here?

azure-data-factoryazure-cosmos-db
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KeshavKiran-MSFT avatar image
0 Votes"
KeshavKiran-MSFT answered marusyk commented

Hi @javier-8889 ,

Welcome to Microsoft Q&A platform and thank you for your query.

With regards to the specific error that you have highlighted, I reproduced and observed the same. Seems CosmosDB Serverless is not currently supported as Sink for the Data flow in the Azure data factory. I reached out to Product team and they confirmed the same, there is a plan in backlog to implement this in future but there is no planned timeline for the release yet. We will also work with them to add the same to this document.

Meanwhile as a workaround ,you can try using copy activity in your pipeline and specifying the Cosmos DB Serverless as a sink in the data factory.

Thank you for your continued patience.



  • Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

The cosmos serverless is no more in preview. Do you have any updates about this?

0 Votes 0 ·
ZhangyiYu-0992 avatar image
1 Vote"
ZhangyiYu-0992 answered

Today the cosmos serverless is at preview status https://devblogs.microsoft.com/cosmosdb/serverless-preview/, when it is stable and GA, we will support this in ADF dataflow. Before that, you can try using copy activity and specifying the Cosmos DB Serverless as a sink in the data factory

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

marusyk avatar image
1 Vote"
marusyk answered

Cosmos DB serverless was released a long time ago. Do you have any plans to support it in DF?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.