Forum Discussion

AP_83's avatar
AP_83
Regular Visitor
1 year ago
Solved

Unexpected error: Internal error DirectQueryUnexpectedEndOfStream eror while refreshing

Unexpected error: Internal error DirectQueryUnexpectedEndOfStream while impoting from dataflow an hour ago Hi Folks, Not all times but many times i get this error in Power bi query, while re...
  • SolomonovAnton's avatar
    1 year ago

    The DirectQueryUnexpectedEndOfStream error in Power BI typically indicates an issue with data streaming โ€” often related to connectivity or internal data handling, even when you're using Import mode. Power Query still pulls data via a streamed preview from Dataflows, which can cause this error, especially with large datasets (~200K rows in your case).

    ๐Ÿš‘ Possible Causes and Fixes:

    • ๐Ÿ’ฅ Dataflow connectivity issues:
      Make sure the connection to your Dataflow is stable. Corporate firewalls, VPNs, or proxy servers may interrupt the data stream.
    • ๐Ÿ“Š Complex transformations in Power Query:
      If you're using operations like Merge, Join, or custom steps, try simplifying them or disabling data previews (via โš™๏ธ Options > Data Load).
    • ๐Ÿ”„ Try the following:
      • In Power Query: right-click the table โ†’ disable and re-enable Enable Load
      • Ensure Allow Native Queries is enabled (if applicable)
      • Split the table using filters by date or key to load smaller chunks
    • โš ๏ธ Dataflow limitations:
      Even in Import mode, Dataflows might truncate streams due to service-side limitations (e.g., memory, timeout, row limits).

    ๐Ÿ”ง Debug Recommendations:

    1. Enable Diagnostic Tracing (File โ†’ Options โ†’ Diagnostics)
    2. Review Power Query steps: disable them one-by-one and test
    3. Try refreshing from Power BI Service โ€” does the error happen there too?

    This issue may relate to known Dataflow streaming bugs, which persist even in Power BI Desktop July 2025 (v2.145.1105.0). Consider temporarily avoiding Dataflows if possible.

    ๐Ÿงช Workarounds:

    • Export the Dataflow to a CSV or Excel file and import it locally
    • Create an intermediate staging table in SQL or a flat file source

    Try the suggestions above and let me know at which point the error still occurs. I can help you isolate the failing step in Power Query.

    ๐Ÿ“˜ Useful links:

     

    โœ”๏ธ If my message helped solve your issue, please mark it as Resolved!

    ๐Ÿ‘ If it was helpful, consider giving it a Kudos!

    ```