MetricSign
EN|NLRequest Access
Medium severityconfiguration

Power BI Refresh Error:
DF-Xml-InvalidSchema

What does this error mean?

The schema stored in the ADF XML dataset does not match the XML file being processed — imported from a different version, or the file structure has changed since the last import.

Common causes

  • 1The XML source files changed structure (elements renamed, added, or removed) but the dataset schema was not re-imported
  • 2The schema was imported from a sample file that did not represent all structural variations in the actual file set
  • 3The data flow was created with schema drift disabled, and the incoming XML has fields not present in the stored schema
  • 4An XSD validation schema is configured and the XML file does not conform to the XSD definition
  • 5The row delimiter element path in the dataset settings does not match the actual element hierarchy in the current XML files

How to fix it

  1. 1Open the XML dataset in ADF Studio and click Import Schema — use the most representative current XML file to import the schema.
  2. 2After re-importing, open the data flow source that uses this dataset and verify the schema in the Projection tab — clear and re-import the projection if it shows old field names.
  3. 3Enable debug mode and run a Data Preview on the source to confirm the fields are correctly mapped with the new schema.
  4. 4If XML files have varying structures across the file set, enable schema drift on the data flow source — this allows ADF to handle additional fields without failing.
  5. 5If XSD validation is active and the file is legitimately non-conforming, either fix the XML file, update the XSD, or disable validation in the dataset settings.
  6. 6Check the row delimiter element path — if the hierarchy changed (e.g., the row element moved from /Root/Items/Item to /Root/Records/Record), update the dataset setting to match.

Frequently asked questions

What is schema drift in data flows and should I enable it for XML sources?

Schema drift lets the data flow handle fields not in the stored schema — useful when producers add elements. Drifted fields are not automatically mapped to the sink; use auto-mapping or handle them explicitly.

How do I update the data flow projection after re-importing the XML dataset schema?

After re-importing the dataset schema, open the data flow source transformation and go to the Projection tab. Click 'Clear schema' then 'Import projection' — without this step the data flow still uses the old projection.

Can this error appear on some XML files but not others from the same source?

Yes — if XML files from the same source have structural variations, non-conforming files fail while others succeed. Import schema from a file that includes all possible elements and enable schema drift for optional fields.

Will downstream Power BI datasets be affected?

Yes — the pipeline fails and the downstream table receives no new data.

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

Other configuration errors