Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
AP_83
Regular Visitor

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 refreshing the preview for one table which as ~ 200K line items. its in Import mode only. Due to this not able to refresh at desktop level.

 

Power bi desktop version: Version: 2.145.1105.0 64-bit (July 2025)  ,faced this with JUN-2025 as well hence updated.

 

Thanks in advance for response.

--------------------------------------

Unexpected error: Internal error DirectQueryUnexpectedEndOfStream.
Details:
Microsoft.Mashup.Evaluator.Interface.ErrorException: Internal error DirectQueryUnexpectedEndOfStream. ---> Microsoft.ServicePlatform.Exceptions.Common.Runtime.ValidationFailedException: Internal error DirectQueryUnexpectedEndOfStream. ---> Microsoft.ServicePlatform.Exceptions.Common.Runtime.ValidationFailedException: Internal error DirectQueryUnexpectedEndOfStream.
at Microsoft.ServicePlatform.Exceptions.Core.Check.ThrowValidationFailedException(ServicePlatformErrorCode errorCode,MessageClass messageClass,Object[] messageParameters)
at Microsoft.Dataflows.Core.Platform.Transport.ReadWithCertaintyStream.Read(Byte[] buffer,Int32 offset,Int32 count)
at Microsoft.PowerBI.DataMovement.Pipeline.OleDbBase.Serialization.PageReader.Read(Byte[] buffer,Int32 offset,Int32 count)
at Microsoft.PowerBI.DataMovement.Pipeline.OleDbBase.Serialization.PageReader.Read(Void* dst,Int32 length)
at Microsoft.PowerBI.DataMovement.Pipeline.OleDbBase.Serialization.PageReader.ReadArray(UInt64[] values,Int32 offset,Int32 count)
at Microsoft.PowerBI.DataMovement.Pipeline.OleDbBase.Serialization.PageReader.ReadArray(T[] values,Int32 offset,Int32 count,Func`2 func)
at Microsoft.PowerBI.DataMovement.Pipeline.OleDbBase.Serialization.PageReader.ReadArray(DateTime[] values,Int32 offset,Int32 count)
at Microsoft.PowerBI.DataMovement.Pipeline.OleDbBase.Column`1.Deserialize(PageReader reader)
at Microsoft.PowerBI.DataMovement.Pipeline.OleDbBase.Serialization.ColumnsPage.Deserialize(PageReader reader)
at Microsoft.Dataflows.Core.Platform.Transport.PagingDataReader.ReadNewPage()
at Microsoft.Dataflows.Core.Platform.Transport.PagingDataReader.Read()
at Microsoft.Mashup.Engine1.Library.Common.TracingDbDataReader.Read()
at Microsoft.Mashup.Engine1.Library.Common.ProgressDbDataReader.Read()
at Microsoft.Mashup.Engine1.Library.Common.DbData+CachingDbDataReader+<>c__DisplayClass48_0.<WrappedRead>b__0()
at Microsoft.Mashup.Engine1.Library.Common.DbValueBuilder+PageCachingEnumerator.WrapWithTracingAndDbExceptionHandling(Action action)
at Microsoft.Mashup.Engine1.Library.Common.DbData+CachingDbDataReader.WrappedRead()
at Microsoft.Mashup.Engine1.Library.Common.DbData+CachingDbDataReader.Read()
at Microsoft.Mashup.Engine1.Library.Common.DbValueBuilder+PageCachingEnumerator.MoveNext()
at Microsoft.Mashup.Engine1.Runtime.SkipTakeEnumerator`1.MoveNext()
at Microsoft.Mashup.Engine1.Library.Common.DbValueBuilder+PagingEnumerator.MoveNext()
at Microsoft.Mashup.Engine1.Runtime.SkipTakeEnumerator`1.MoveNext()
at Microsoft.Mashup.Engine1.Language.Query.JoinAlgorithm+JoinPrologue.Read(JoinParameters parameters,Boolean readLeft,Boolean readRight)
at Microsoft.Mashup.Engine1.Language.Query.JoinAlgorithm+DynamicJoinAlgorithm+DynamicJoinEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.ProjectColumnsQuery+SelectColumnsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.SkipTakeEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.ProjectColumnsQuery+SelectColumnsEnumerable.GetEnumerator()
at Microsoft.Mashup.Engine1.Language.Query.QueryTableValue.GetEnumerator()
at Microsoft.Mashup.Engine1.Runtime.TableValue.Microsoft.Mashup.Engine.Interface.ITableValue.GetEnumerator()
at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator+ValuePreviewValueSource+TableValuePreviewValueSource.SerializeRows(Int32 count)
at Microsoft.Mashup.Evaluator.SimpleDocumentEvaluator+ValuePreviewValueSource+TableValuePreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource+<>c__DisplayClass0_0.<RunStub>b__0()
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(String entryName,IEngineHost engineHost,IMessageChannel channel,Action action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator+Service+<>c__DisplayClass12_0`1.<OnBeginGetResult>b__0()
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace,IEngineHost engineHost,IMessageChannel channel,Action action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator+Service.OnBeginGetResult(IMessageChannel channel,BeginGetResultMessage message,Action`1 action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator+Service.OnBeginGetPreviewValueSource(IMessageChannel channel,BeginGetPreviewValueSourceMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel,Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger+ChannelMessageHandlers.TryDispatch(IMessageChannel channel,Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel,Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel,MessageWithUnknownChannel messageWithUnknownChannel)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel,Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger+ChannelMessageHandlers.TryDispatch(IMessageChannel channel,Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel,Message message)
at Microsoft.Mashup.Evaluator.EvaluationHost.Run()
at Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args)
at Microsoft.Mashup.Evaluator.SafeThread2+<>c__DisplayClass9_0.<CreateAction>b__0(Object o)
at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)
at Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args)

--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.EvaluationHost.<>c__DisplayClass27_0.<TryReportException>b__1()
at Microsoft.Mashup.Common.SafeExceptions.IgnoreSafeExceptions(IEngineHost host, IHostTrace trace, Action action)
at Microsoft.Mashup.Evaluator.EvaluationHost.TryReportException(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Exception exception)
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(String entryName, IEngineHost engineHost, IMessageChannel channel, Action action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.<>c__DisplayClass12_0`1.<OnBeginGetResult>b__0()
at Microsoft.Mashup.Evaluator.EvaluationHost.ReportExceptions(IHostTrace trace, IEngineHost engineHost, IMessageChannel channel, Action action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetResult[T](IMessageChannel channel, BeginGetResultMessage message, Action`1 action)
at Microsoft.Mashup.Evaluator.RemoteDocumentEvaluator.Service.OnBeginGetPreviewValueSource(IMessageChannel channel, BeginGetPreviewValueSourceMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.OnMessageWithUnknownChannel(IMessageChannel baseChannel, MessageWithUnknownChannel messageWithUnknownChannel)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.EvaluationHost.Run()
at Microsoft.Mashup.Container.EvaluationContainerMain.Run(Object args)
at Microsoft.Mashup.Evaluator.SafeThread2.<>c__DisplayClass9_0.<CreateAction>b__0(Object o)
at Microsoft.Mashup.Container.EvaluationContainerMain.SafeRun(String[] args)
at Microsoft.Mashup.Container.EvaluationContainerMain.Main(String[] args)
--- End of inner exception stack trace ---
at Microsoft.Mashup.Evaluator.EvaluationHost.OnException(IEngineHost engineHost, IMessageChannel channel, ExceptionMessage message)
at Microsoft.Mashup.Evaluator.MessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.ChannelMessenger.ChannelMessageHandlers.TryDispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.MessageHandlers.Dispatch(IMessageChannel channel, Message message)
at Microsoft.Mashup.Evaluator.Interface.IMessageChannelExtensions.WaitFor[T](IMessageChannel channel)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.WaitFor(Func`1 condition, Boolean disposing)
at Microsoft.Mashup.Evaluator.RemotePreviewValueSource.PreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Evaluator.Interface.TracingPreviewValueSource.get_SmallValue()
at Microsoft.Mashup.Host.Document.Analysis.PackageDocumentAnalysisInfo.PackagePartitionAnalysisInfo.SetPreviewValue(EvaluationResult2`1 result, Func`1 getStaleSince, Func`1 getSampled)

5 REPLIES 5
Shahid12523
Memorable Member
Memorable Member

Disable background preview (Options → Data Load).

Reduce preview rows / load only needed columns.

Try in a blank PBIX with just that table.

Roll back to an older stable PBI Desktop version (May 2025).

Break query into smaller steps.

Turn off parallel loading of tables.

👉 Most often it’s a preview refresh bug, not the actual data load.

Shahed Shaikh
v-veshwara-msft
Community Support
Community Support

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.

v-veshwara-msft
Community Support
Community Support

Hi @AP_83 ,

Just checking in to see if you query is resolved and if any responses were helpful.
Otherwise, feel free to reach out for further assistance.

Thank you.

v-veshwara-msft
Community Support
Community Support

Hi @AP_83 ,
Thanks for sharing the detailed error message and also appreciate the valuable suggestions shared earlier by @SolomonovAnton .

 

Could you please confirm if the issue is now resolved and if the suggestions shared earlier were helpful?

If the issue still persists, please try updating to the latest version of Power BI Desktop and check if the error still occurs.
Download Microsoft Power BI Desktop from Official Microsoft Download Center

You can also download it from the Microsoft Store, where the August version is already released - updates happen automatically when installed from the Store.

 

Feel free to reach out if you need any further assistance.

Thank you.

SolomonovAnton
Super User
Super User

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!

```

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.