Skip to main content
100%

STDOUT as data source in Power Query M

✓ Published0🌍 Public
HHugoberry
Last edited Mar 11, 2017
Created on Mar 11, 2017

This example demonstrates how to capture a command-line program's standard output as a data source in Power Query M. It shows a minimal query that retrieves the current user name by running the `whoami` command, then feeds that result into a table. The implementation relies on the `R.Execute` function to invoke an R script, which uses `system2` with `stdout=TRUE` to capture the command's output, and `read.table` to parse it into a data frame. The resulting table is then returned as the query's output. This approach highlights a practical bridge between operating system commands and Power BI's data transformation layer.

AI-generated description

Similar vizzes