PowerQueryNet
PowerQueryNet copied to clipboard
Error: CreateMashupConnectionInfo has failed
I just tried pqnet helloworld.pq helloquery
but got this error: CreateMashupConnectionInfo has failed.
How can I find out what's wrong?
Usually errors are more explicit but maybe you will find more detail if you go in the Event Viewer under "Applications and Services Logs\PowerQueryNet"
I am not sure if this is the same issue but I am facing the error below when running pqnet helloworld.pq
as per the instruction in ReadMe:
Method not found: 'System.Threading.Tasks.Task`1<Microsoft.Mashup.Tools.QueryExecutionResults> Microsoft.Mashup.Tools.QueryExecutor.CreateExecution(Microsoft.Data.Mashup.MashupConnectionStringBuilder, Microsoft.Mashup.Tools.CredentialStore, Boolean)'.
I gave it another shot today and it worked without any trouble. I look forward to using this tool a lot!
I think it might have worked now because I had just installed the Power Query SDK selected from within Visual Studio rather than the VSIX link in the readme.
As for the earlier error, this was in the Event Viewer:
System.Exception: CreateMashupConnectionInfo has failed.
at PowerQueryNet.Engine.Command.GetMashupConnectionStringBuilder(String mashup) in Z:\GitHub\PowerQueryNet\Engine\Command.cs:line 77
at PowerQueryNet.Engine.Command.Execute(String queryName, String mashup) in Z:\GitHub\PowerQueryNet\Engine\Command.cs:line 27
at PowerQueryNet.Service.PowerQueryService.Execute(PowerQueryCommand powerQueryCommand) in Z:\GitHub\PowerQueryNet\Service\PowerQueryService.cs:line 238
I am not sure if this is the same issue but I am facing the error below when running
pqnet helloworld.pq
as per the instruction in ReadMe:Method not found: 'System.Threading.Tasks.Task`1<Microsoft.Mashup.Tools.QueryExecutionResults> Microsoft.Mashup.Tools.QueryExecutor.CreateExecution(Microsoft.Data.Mashup.MashupConnectionStringBuilder, Microsoft.Mashup.Tools.CredentialStore, Boolean)'.
For me it was solved by using PowerQuerySdk.vsix 1.0.0.16 and not the most recent version (1.0.025 right now). Following the installation instructions precisely sometimes helps :)
Reopening because I'm getting the same error in a new context: reading a query from a .pbix
My Test.pbix contains only a single query called Query1
whose M code is let Source = 1 in Source
. A variation let Source = #table(type table [Num = Int32.Type], {{1}}) in Source
didn't help. I couldn't upload it as a .pbix so I simply changed its extension to .zip.
I invoke pqnet.exe Test.pbix Query1
and get CreateMashupConnectionInfo has failed.
Two events appear in the Event Viewer almost simultaneously. I've copied them below. I think they're telling me that the query doesn't exist, but it should. I vaguely recall a new pbix file format came out some time ago - could it have anything to do with that?
<?xml version="1.0" encoding="UTF-8"?>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="PowerQueryNet" />
<EventID Qualifiers="0">0</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2021-12-29T02:38:36.1498394Z" />
<EventRecordID>67</EventRecordID>
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Channel>PowerQueryNet</Channel>
<Computer>redacted</Computer>
<Security />
</System>
<EventData>
<Data>MashupFromFile exception fileName : Test.pbix Exception : System.Exception: Mashup load failed with error: Specified part does not exist in the package. at Microsoft.Mashup.Tools.Utilities.MashupFromPbix(String filename) at PowerQueryNet.Engine.Command.MashupFromFile(String fileName) in Z:\GitHub\PowerQueryNet\Engine\Command.cs:line 91 at PowerQueryNet.Service.PowerQueryService.MashupFromFile(String fileName) in Z:\GitHub\PowerQueryNet\Service\PowerQueryService.cs:line 37</Data>
</EventData>
</Event>
<?xml version="1.0" encoding="UTF-8"?>
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="PowerQueryNet" />
<EventID Qualifiers="0">0</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2021-12-29T02:38:36.2345984Z" />
<EventRecordID>68</EventRecordID>
<Correlation />
<Execution ProcessID="0" ThreadID="0" />
<Channel>PowerQueryNet</Channel>
<Computer>redacted</Computer>
<Security />
</System>
<EventData>
<Data>System.Exception: CreateMashupConnectionInfo has failed. at PowerQueryNet.Engine.Command.GetMashupConnectionStringBuilder(String mashup) in Z:\GitHub\PowerQueryNet\Engine\Command.cs:line 77 at PowerQueryNet.Engine.Command.Execute(String queryName, String mashup) in Z:\GitHub\PowerQueryNet\Engine\Command.cs:line 27 at PowerQueryNet.Service.PowerQueryService.Execute(PowerQueryCommand powerQueryCommand) in Z:\GitHub\PowerQueryNet\Service\PowerQueryService.cs:line 238</Data>
</EventData>
</Event>