Forum Discussion

timahenning2's avatar
timahenning2
Helper II
6 months ago
Solved

Data mirror - Exception reading the data file.

Hi,   I received this error from the Data Mirror UI.   "We encountered an error while parsing data file being used, please fix the file and try again. The error is: Exception reading the data fil...
  • v-karpurapud's avatar
    6 months ago

    Hi timahenning2 
    Thank you for reaching out to the Microsoft Fabric community forum.
     

    The replication failure is due to very large values in the NVARCHAR(MAX) columns, particularly in the comments column where some rows are over 500 KB. When Data Mirror syncs, Microsoft Fabric converts each SQL table into Delta Parquet files in OneLake. Parquet is a columnar storage format, and extremely large string values can require significant memory during encoding. If a string exceeds the processing limits during Parquet serialization, the process can fail with an error like: System.OverflowException: Array dimensions exceeded supported range.
    This error is not due to a SQL schema issue or data corruption, but happens when encoding large variable-length text values into Parquet.
     

    Currently, Data Mirror does not display row-level diagnostics in the user interface. The Fabric monitoring only shows overall replication status and table-level information, such as whether a table is running, has warnings, failed, stopped, row counts, and last completed time. More details can be found in the Monitor Mirrored Database Replication documentation:[Monitor Mi...soft Learn | Learn.Microsoft.com]
     

    Additional logs are available through Mirrored Database Operation Logs (workspace monitoring), which provide execution-level details, processed rows and bytes, operation names, and failure messages, but not errors for individual rows.[Mirrored d...soft Learn | Learn.Microsoft.com]
     

    To fix the issue, it is recommended to mirror a view instead of the base table and cast or truncate NVARCHAR(MAX) columns to a fixed size like NVARCHAR(4000). Limiting string length ensures values stay within the processing limits for Parquet encoding, allowing successful Data Mirror replication.

     

    If you have any further questions, feel free to reach out and we'll be glad to assist.
     

    Regards,

    Microsoft Fabric Community Support Team.