Expose Power Query as a Standalone Runtime and Command-Line Interface (CLI)
Summary
Power Query has evolved into one of Microsoft's most powerful data transformation technologies and is now used across Excel, Power BI, Fabric, Dataflows, Power Platform, and other products. However, Power Query can only be executed through a host application, despite the existence of a mature M language and execution engine.
I would like Microsoft to expose the Power Query engine as a first-class standalone runtime and provide an officially supported command-line interface (CLI) and API.
The Problem
Today, Power Query transformations are often embedded inside:
- Excel workbooks
- Power BI Desktop files
- Fabric Dataflows
- Power Platform Dataflows
While this works well for interactive users, it creates challenges for enterprise-grade automation.
Many organizations would like to:
- Schedule Power Query transformations without opening Excel.
- Run Power Query from PowerShell scripts.
- Integrate Power Query into CI/CD pipelines.
- Execute transformations on servers without Office dependencies.
- Reuse Power Query code across multiple solutions.
- Treat Power Query as a reusable transformation layer rather than a workbook artifact.
Currently, Power Query feels like a language without an officially supported runtime, even though the engine already powers multiple Microsoft products.
2 Comments
- juansgr_New Member
One practical example from my own work: I use PowerShell to orchestrate a master data backup process where a list of SQL files is executed sequentially through hdbsql.exe, and the results are automatically exported to CSV files for backup and downstream consumption.
Oversimplified example of an hdbsql.exe execution using server information stored in $HanaServer, a single hardcoded .sql file, and a single output file. In practice, this process can execute multiple SQL files and produce multiple .csv files recursively and sequentially when looped:
PowerShell
↓
& hdbsql.exe -n $HanaServer -I query1.sql -o example1.csvThe key benefit is that SQL scripts are treated as first-class, reusable assets. PowerShell does not need to know the query logic itself. It simply invokes hdbsql.exe, passes the .sql file, and handles orchestration, logging, scheduling, and output management.
I would like to see a similar capability for Power Query. Today, .pq files contain transformation logic but cannot be executed directly as standalone assets in the same way that .sql files can be executed through hdbsql.exe. An official powerquery.exe (or equivalent runtime) would allow organizations to maintain reusable .pq files and execute them from PowerShell, Task Scheduler, Azure Automation, or CI/CD pipelines.
For example:
PowerShell
↓
& powerquery.exe -I etl1.pq -o example1.csvThis runtime could leverage the same authentication mechanisms already supported by Power Query connectors, allowing secure access to sources such as SharePoint, SQL databases, SAP systems, APIs, and other enterprise data platforms.
The particular use case that made me think about this is: I wanted to use a .pq file to connect directly to a read-only .xlsx file from SharePoint, retrieve a finance reporting schedule from a spreadsheet that currently has a non-table structure, perform all required transformations, and export a normalized dataset (without requiring Excel, Power BI Desktop, or any other host application) to be used as an input downstream in a similar orchestration/automation process as the one I designed for the Backup solution mentioned earlier. This would create the same clean separation of responsibilities that already exists with PowerShell and hdbsql.exe:
- Power Query for data transformation
- PowerShell for orchestration and automation
- SQL for data consumption and reporting
This approach would make Power Query a true first-class component of enterprise automation and ETL workflows, while preserving the existing user experience within Excel, Power BI, Fabric, and other Microsoft products. - miguel
Community Admin
Status changed:NewtoAbandonedThis is currently possible via the Dataflow REST API using the endpoint below:
Query Execution - Execute Query - REST API (Dataflow) | Microsoft Learn
You can also use the Data Factory MCP to make things a bit more straightforward in wiring the commands, but is fundamentally our path towards the problem / scenario that you've mentioned as to how we enable you to have the full runtime available without the UI or the need for another product (like Excel or Power BI) to be running alongside it.
Recent ideas
Prevent Initial Screen from Showing when Power BI is Loading a Power App
When navigating to a page with a Power Apps for Power BI visualization, the initial How to get started screen loads first as a default splash screen before loading the actual app. This creates a quit...kakayes3 hours agoNew MemberNew7Views0likes0CommentsAdd an option to hide all visual-level filters
As a best practice, we often need to hide fields and measures from the Filters pane in Power BI reports. When a visual contains dozens of fields and measures, manually hiding each one individually ca...Roman20266 hours agoNew MemberNew8Views0likes0CommentsGet data from Apache Kafka topics via private networking
Current prerequisites limit to public Kafka instances which is not feasible for most enterprise customers. When will this limitation be lifted so that it can be used in private network setups, for ...Jugi8 hours agoMicrosoft EmployeePlanned3.5KViews2likes4CommentsOption to disable sharing from personal workspaces
Option to disable sharing from personal workspaces at the tenant level. Governance - We would like to have an option to prevent users from sharing content from their personal workspacesstephen_yale8 hours agoNew MemberNeeds Votes2KViews234likes21CommentsAllow removing default cell padding in Matrix/Table visuals so images fill the entire cell
Summary Add formatting options to remove the default internal padding of cells in the Matrix and Table visuals (horizontal and vertical), so that images displayed in cells fill the whole cell and ad...ccarpenter9 hours agoNew MemberNew13Views0likes0Comments