Forum Discussion
Unexpected error: Internal error DirectQueryUnexpectedEndOfStream eror while refreshing
- 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:
- Enable Diagnostic Tracing (File โ Options โ Diagnostics)
- Review Power Query steps: disable them one-by-one and test
- 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!
```
- ๐ฅ Dataflow connectivity issues:
Hi AP_83 ,
Just wanted to check if your query is resolved and if the responses provided were helpful. If further assistance is needed, please reach out.
Thank you.