Search Shortcut cmd + k | ctrl + k
pbi_scanner

DuckDB extension for querying Power BI Semantic Models with DAX.

Maintainer(s): crazy-treyn

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.

Platform 1.4.4 1.4.5 1.5.5 1.5.6 2.0.0
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

Installing and Loading

INSTALL pbi_scanner FROM community;
LOAD pbi_scanner;

Example

INSTALL pbi_scanner FROM community;
LOAD pbi_scanner;
SET pbi_scanner_auth_mode = 'azure_cli';

SELECT *
FROM dax_query(
    'Data Source=powerbi://api.powerbi.com/v1.0/myorg/Example%20Workspace;Initial Catalog=example_semantic_model;',
    'EVALUATE ROW("probe_ok", 1)'
);

About pbi_scanner

Query Power BI Semantic Models from DuckDB using DAX via XMLA endpoint.

  • The dax_query function executes DAX and returns results as DuckDB tables.
  • pbi_tables, pbi_columns, pbi_measures, and pbi_relationships expose INFO.VIEW metadata results for model exploration.

The easiest way to get started is Azure CLI auth (az login) with SET pbi_scanner_auth_mode = 'azure_cli', but Azure CLI is not required.

connection_string and dax_text are positional. Named options use :=: auth_mode, access_token, secret_name, tenant_id, client_id, client_secret, effective_user_name, timeout_ms, schema_probe_rows, normalize_dax_column_names.

You may also use the DuckDB azure extension to create an Azure secret. More details and examples are in the pbi_scanner repository.

Added Functions

function_name function_type description comment examples
dax_query table NULL NULL  
pbi_columns table NULL NULL  
pbi_measures table NULL NULL  
pbi_relationships table NULL NULL  
pbi_tables table NULL NULL  

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

name description input_type scope aliases
normalize_dax_column_names When true, strip DAX square brackets and table qualifiers from dax_query and pbi_* metadata table function column names (default off; opt in via SET or normalize_dax_column_names) BOOLEAN GLOBAL []
pbi_scanner_auth_mode Default auth mode for pbi_scanner table functions (access_token, azure_cli, service_principal) VARCHAR GLOBAL []