MetricSign
EN|NLRequest Access
Medium severitydata source

Power BI Refresh Error:
DF-Cosmos-ShortTypeNotSupport

What does this error mean?

The ADF Mapping Data Flow Cosmos DB connector encountered a column of type 'short' (16-bit integer) in the incoming data stream, which Cosmos DB does not support as a native document property type. The connector cannot serialize this data type to JSON.

Common causes

  • 1The upstream source (e.g., SQL Server, Synapse) contains a SMALLINT or short column that the data flow infers as type 'short', which Cosmos DB JSON serialization does not support
  • 2A schema imported from a relational source includes 16-bit integer columns that need to be cast to a wider integer type before writing to Cosmos DB

How to fix it

  1. 1Add a Derived Column or Cast transformation before the Cosmos DB sink to convert short (16-bit integer) columns to integer (32-bit) or long (64-bit) data types.
  2. 2In the Derived Column expression, use: toInteger(shortColumnName) to upcast the column.
  3. 3Enable data flow Debug mode and preview the sink input to identify all columns with short data type.
  4. 4After adding the cast, re-run the data flow to confirm the error is resolved.

Frequently asked questions

Which data types does Cosmos DB support via the ADF Mapping Data Flow connector?

Cosmos DB supports string, integer (32-bit), long (64-bit), double, boolean, and null. Short (16-bit), byte, and other narrow numeric types must be upcast before writing.

How do I identify short-type columns in my data flow?

Enable Debug mode and preview the source data. Hover over column names in the data preview to see inferred types, or check the source transformation's Schema tab.

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

Other data source errors