Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am trying to add additional functions users can use through the PQ Advanced editor on top of the published function for my connector. I have used this technique in other connectors but having trouble with getting the Connector to build when the published function has optional or no inputs. Here is the error message I get when building in VSCode with MakePQX:
Failed to display extension info due to [DataFormat.Error] We were unable to infer data source path information from the set of functions associated with the data source kind 'HelloWorld'., failed to execute c:\Users\fieldsj\.vscode\extensions\powerquery.vscode-powerquery-sdk-0.2.2-win32-x64\.nuget\Microsoft.PowerQuery.SdkTools.2.114.4\tools\PQTest.exe info --extension "d:\Source\Repos\PQ-HelloWorld\bin\AnyCPU\Debug\PQ-HelloWorld.mez" --prettyPrint
Here is a snip of the code I mocked up in a simple HelloWorld that triggers the same error:
[DataSource.Kind="HelloWorld", Publish="HelloWorld.Publish"]
shared HelloWorld.Contents = (optional message as text) =>
let
_message = if (message <> null) then message else "(no message)",
a = "Hello from HelloWorld: " & _message
in
a;
[DataSource.Kind="HelloWorld"]
shared HelloWorld.Message = (message as text) =>
let
a = "Hello from HelloWorld: " & message
in
a;
I only added the .Message function to a fresh project. If I remove "optional" on the .Contents input, it builds just fine. Without the .Message function, it builds fine even with the optional input on .Contents but as soon as you introduce another DataSource.Kind with a required input, the error gets thrown. Is there any way to have an optional input or no input for the published function but also have the additional functions that do require inputs?
Hi @JoeFields ,
The error message suggests that there is an issue with inferring data source path information from the set of functions associated with the data source kind 'HelloWorld'. Based on the code snippet you provided, it looks like you are trying to add additional functions to your connector that have required inputs, but your published function has an optional input or no input. This may be causing the error.
One possible solution could be to modify your published function to have a required input, even if it is just a dummy input that is not used in the function. This should allow you to build your connector with the additional functions that have required inputs.
Another solution could be to create a separate data source kind for the additional functions that have required inputs, rather than trying to add them to the same data source kind as your published function. This may help avoid conflicts with the optional or no input in your published function. I hope this helps! Let me know if you have any further questions.
excel - Power query function optional arguments - Stack Overflow
Best Regards
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
8 | |
4 | |
2 | |
2 |
User | Count |
---|---|
4 | |
3 | |
3 | |
3 | |
2 |