Medium severitydata source
Power BI Refresh Error:
DF-Cosmos-PartitionKeyMissed
What does this error mean?
The ADF Mapping Data Flow Cosmos DB sink configuration is missing a partition key mapping. Cosmos DB requires every document to include the partition key property, but neither the sink settings nor the incoming data stream specifies which column to use as the partition key.
Common causes
- 1The partition key property is not configured in the Cosmos DB sink transformation settings — the 'Partition key name' field is empty
- 2The column designated as the partition key was dropped by an upstream Select transformation before reaching the sink
- 3The data flow was copied from a Cosmos DB container with a different schema, and the partition key column name in the copy does not exist in the new source schema
How to fix it
- 1Open the Cosmos DB sink transformation in ADF Studio and go to Settings tab.
- 2Set the 'Partition key name' field to the column that contains the partition key values — this must match the container's partition key path without the leading slash.
- 3Confirm the named column exists in the incoming stream using Debug data preview on the sink input.
- 4If the column was dropped upstream, trace back through Select and Rename transformations to restore it before the sink.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide