Is there any way to invoke PowerQuery/M outside of Excel or PowerBI?

It appears that this is now possible via the Power Query SDK.

This has enabled projects such as PowerQueryNet, which can already execute the M PowerQuery expressions programmatically.

Although you should keep in mind that the magic of PowerQueryNet is achieved through the use of undocumented APIs and in a commercial setup, may violate the Power BI / Power Query EULA. So tread with caution.

I'm currently working to put this into a docker container which receives M via REST and returns data in the format requested (JSON/CSV/XML).

If anything, all of this shows how easy it would be for Microsoft to satisfy this request. It's also an interesting insight into how under funded Microsoft software development might be, or how little Microsoft they realize the value of Power BI / Power Query: it enables savvy business users who know their data best to do hefty data transformations with Office apps already installed on their computers - a massive step forward.


https://ideas.powerbi.com is probably the right place to post this. I've passed the link around internally, it will probably get some more upvotes at the minimum :)

I don't know of any official plan to have a public standalone library to invoke "M" from a different application, but that's what other Power BI products like the Power BI Gateway use to run "M".


Edit: OP created the idea here: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/16969474-make-powerquery-etl-a-scriptable-language-targetin