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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Issue: "Safe handle has been closed"

Hi community,

 

I am pulling data from Snowflake with an import (SQL) query. Inside the Snowflake web interface, my query works. When I try to run the same query in Power BI Desktop, I get the following error message.

aaa128_0-1663157491806.png

 

Details
"Feedback Type:
Frown (Error)

Timestamp:
2022-09-14T12:13:34.1828581Z

Local Time:
2022-09-14T14:13:34.1828581+02:00

Session ID:
34898f84-b6cd-47e8-bc0e-9ce1c9aaeed1

Release:
September 2022

Product Version:
2.109.642.0 (22.09) (x64)

Stack Trace:
Microsoft.Mashup.Host.Document.SerializedException
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)

PowerBINonFatalError:
{"AppName":"PBIDesktop","AppVersion":"2.109.642.0","ModuleName":"","Component":"Microsoft.Mashup.Evaluator.EvaluationHost","Error":"Microsoft.Mashup.Host.Document.SerializedException - Microsoft.Mashup.Host.Document.Evaluation.ErrorEvaluationResult","MethodDef":"OnException","ErrorOffset":""}

OS Version:
Microsoft Windows NT 10.0.19043.0 (x64 en-US)

CLR Version:
4.8 or later [Release Number = 528372]

Peak Virtual Memory:
55.5 GB

Private Memory:
1.08 GB

Peak Working Set:
1.32 GB

IE Version:
11.789.19041.0

User ID:
6b5c6c1d-b6df-4299-8d6d-cfe1a239c0ad

Workbook Package Info:
1* - de-DE, Query Groups: 1, fastCombine: Enabled, runBackgroundAnalysis: False.

Telemetry Enabled:
True

Model Default Mode:
Import

Model Version:
PowerBI_V3

Enabled Preview Features:
PBI_enableWebView2
PBI_sparklines

Disabled Preview Features:
PBI_shapeMapVisualEnabled
PBI_SpanishLinguisticsEnabled
PBI_qnaLiveConnect
PBI_azureMapVisual
PBI_compositeModelsOverAS
PBI_b2bExternalDatasetSharing
PBI_enhancedTooltips
PQ_WebView2Connector
PBI_scorecardVisual
PBI_fieldParametersSuperSwitch
PBI_horizontalFusion

Disabled DirectQuery Options:
TreatHanaAsRelationalSource

Cloud:
GlobalCloud

DPI Scale:
100%

Supported Services:
Power BI"

 

I have no idea what the problem is. Please advise.

Status: Investigating
Comments
Anonymous
Not applicable

Hi @Anonymous ,

 

I wasn't able to reproduce your issue, does it work properly if I roll back to the August version?

Have you used reports created with this data source in the past? Does it work properly?

 

Best Regards,
Community Support Team _ Caitlyn

Anonymous
Not applicable

Hi @Anonymous,

thanks for looking into this. I think I found the issue.

 

It appears like the PowerBI to Snowflake connection fails on semicolons in the SQL code, even if they are part of a comment in the SQL code.

Best regards