MetricSign
EN|NLRequest Access
Medium severitydata source

Power BI Refresh Error:
DF-Cosmos-IdPropertyMissed

What does this error mean?

The ADF Mapping Data Flow Cosmos DB sink requires an 'id' property on every document being written, but the incoming data stream does not contain a column named 'id' or the column contains null values.

Common causes

  • 1The incoming data stream does not have a column named 'id' (case-sensitive) — Cosmos DB requires this exact property name as the document identifier
  • 2An upstream Select or Derived Column transformation renamed the id column to something else (e.g., 'document_id' or 'Id' with a capital I)
  • 3The id column exists in the stream but contains null values for some rows, which Cosmos DB rejects

How to fix it

  1. 1Enable data flow Debug mode and preview the incoming stream at the Cosmos DB sink — check whether a column named exactly 'id' is present and populated.
  2. 2If the id column has a different name, add a Derived Column transformation before the sink to create a column named 'id' with the appropriate value.
  3. 3If the id values need to be generated (e.g., for new documents), add a Derived Column transformation with an expression like uuid() to generate a unique id per row.
  4. 4If the id column exists but contains nulls, add a Filter transformation to exclude null-id rows or a Derived Column to set a default id value.

Frequently asked questions

Is the 'id' property case-sensitive in Cosmos DB?

Yes — Cosmos DB requires the document identifier to be exactly 'id' (lowercase). 'Id', 'ID', or 'document_id' are treated as regular properties and do not satisfy the id requirement.

What happens if I generate duplicate id values?

Cosmos DB upserts documents with the same id — the new document replaces the existing one. If inserting new records and you want to preserve existing ones, ensure the id generator produces globally unique values.

How do I generate a unique id automatically in a Mapping Data Flow?

Add a Derived Column before the sink with `uuid()` — this generates a random UUID per row, which Cosmos DB accepts as a valid id.

Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide

Other data source errors