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
- 1Open the XML dataset in ADF Studio and click Import Schema — use the most representative current XML file to import the schema.
- 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.
- 3Enable debug mode and run a Data Preview on the source to confirm the fields are correctly mapped with the new schema.
- 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.
- 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.
- 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
Official documentation: https://learn.microsoft.com/en-us/azure/data-factory/data-flow-troubleshoot-guide