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;
CREATE SECRET onelake (TYPE azure, PROVIDER credential_chain);

-- A Direct Lake model: its lakehouse is attached through OneLake's Iceberg catalog.
CREATE SEMANTIC VIEW sales
    FROM 'abfss://<workspace>@onelake.dfs.fabric.microsoft.com/<lakehouse>/Files/model.bim';

SHOW SEMANTIC METRICS IN sales;

SELECT Product.Color, AGG(Orders) AS orders, AGG("Sales Amount") AS amount
FROM sales
WHERE Customer.Country = 'France'
GROUP BY ALL
ORDER BY amount DESC;

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, pinned to their snapshots until REFRESH SEMANTIC VIEW. 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_facts scalar NULL NULL  
dax_sql_refresh table NULL NULL  
dax_sql_rewrite scalar NULL NULL  
dax_sql_set_facts 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]
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