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
- 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.
- 2In the Derived Column expression, use: toInteger(shortColumnName) to upcast the column.
- 3Enable data flow Debug mode and preview the sink input to identify all columns with short data type.
- 4After adding the cast, re-run the data flow to confirm the error is resolved.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide