Search Shortcut cmd + k | ctrl + k

A Power BI semantic model (.bim, TMDL or Apache Ossie YAML) as a semantic view, queried in plain SQL; its DAX measures are compiled to DuckDB SQL

Maintainer(s): djouallah

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.5.5 1.5.6 2.0.0 2.0.1
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

Installing and Loading

INSTALL dax_sql FROM community;
LOAD dax_sql;

Example

INSTALL dax_sql FROM community;
LOAD dax_sql;
-- Not needed in a Fabric notebook; on a laptop (az login) or in CI with OIDC:
CREATE OR REPLACE SECRET onelake (TYPE azure, PROVIDER credential_chain);

-- A Fabric semantic view's Apache Ossie YAML: its lakehouse is attached through OneLake's Iceberg catalog.
CREATE OR REPLACE SEMANTIC VIEW nem
    FROM 'abfss://<workspace>@onelake.dfs.fabric.microsoft.com/<lakehouse>.Lakehouse/Context/Semantic Views/nem/ossie.yaml';

DESCRIBE SEMANTIC VIEW nem;

SELECT dim_region.Region, AGG("Registered units") AS units, AGG("Registered MW") AS mw
FROM nem
GROUP BY ALL
ORDER BY ALL;

About dax_sql

dax_sql reads a Power BI semantic model, as a TMSL .bim, TMDL files or Apache Ossie YAML (a Fabric semantic view's Context/Semantic Views// folder), and makes it a semantic view. Queries are plain DuckDB SQL: a measure is AGG(name) or AGG("name with spaces"), and a dimension is Table.Column. The measures' DAX is compiled to DuckDB SQL at bind time by dax-sql (https://github.com/djouallah/dax-sql), embedded in the extension through QuickJS. A Direct Lake model's tables are read from its lakehouse through OneLake's Iceberg REST catalog: CREATE reads no table, each table's metadata is loaded when a query first reads it and kept for the session, and REFRESH SEMANTIC VIEW reads newer data. Not built for wasm: OneLake is read through the azure extension, which has no wasm build.

Added Functions

function_name function_type description comment examples
dax_sql_create table NULL NULL  
dax_sql_define table NULL NULL  
dax_sql_drop table NULL NULL  
dax_sql_refresh table NULL NULL  
dax_sql_rewrite scalar NULL NULL  
dax_sql_show table NULL NULL  
dax_sql_version scalar 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 typed_value
active_grammar_extensions The grammar extensions used by the parser. VARCHAR[] LOCAL [] [shell, dax_sql]
allow_parser_override_extension Allow extensions to override the current parser. VARCHAR GLOBAL [] fallback
dax_sql_inline_keys Give a dimension's filter to the fact's join as its keys (constants the fact's scan can skip files with) BOOLEAN GLOBAL [] true
temp_directory Set the directory to which temporary files are written. VARCHAR GLOBAL [] post.db.tmp
© 2026 DuckDB Foundation, Amsterdam NL
DuckDB Home Code of Conduct Trademark Use Blog