MetricSign
EN|NLRequest Access
Medium severitydata flow

Power BI Refresh Error:
DF-Hive-InvalidDataType

What does this error mean?

A column in the Hive source or sink uses a data type that ADF Mapping Data Flows cannot handle — common culprits are Hive-specific complex types (ARRAY, MAP, STRUCT) or timestamp formats that don't map cleanly to Spark SQL types. The data flow fails when it encounters the unsupported type during schema inference or write.

Common causes

  • 1The Hive table contains ARRAY, MAP, or STRUCT columns that ADF does not natively support
  • 2A Hive TIMESTAMP column has a format or precision that Spark SQL rejects
  • 3The derived column or cast expression produces a type incompatible with the target Hive column
  • 4Import schema was run when the table was empty or had different types, and the stored schema is now stale

How to fix it

  1. 1In ADF Studio, open the source transformation and click 'Import schema' to refresh the column type list from Hive.
  2. 2Identify the specific column causing the error — check the ADF activity run output for the column name and type in the error detail.
  3. 3Add a Derived Column transformation to cast complex types to STRING before writing: `toString(complexColumn)`.
  4. 4For timestamp precision issues, add an explicit cast: `toTimestamp(timestampCol, 'yyyy-MM-dd HH:mm:ss')`.
  5. 5Enable debug mode and run a data preview on the Source transformation to confirm which columns have type mismatches.

Frequently asked questions

Does ADF support ARRAY or MAP columns from Hive?

No — ADF Mapping Data Flows do not natively support Hive complex types (ARRAY, MAP, STRUCT). You need to cast these columns to STRING using `toString()` in a Derived Column transformation before the sink.

How do I find which column is causing the type error?

The ADF activity run output includes the column name and type in the error message. In ADF Monitor, click the failed activity > View details > Error message to see the specific column.

Will re-importing the schema fix the error?

Only if the mismatch is from a stale schema. If the Hive table genuinely contains unsupported types, add a cast transformation — re-importing only updates ADF's schema knowledge.

Can this error appear mid-flow, after processing starts?

Yes — if the type error appears only in certain rows (e.g., a normally-null column that occasionally holds an array), the data flow processes thousands before failing. Use debug mode with a small sample to catch it early.

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

Other data flow errors