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
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/
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 |