This is the Power Query Custom Connector for DuckDB. Use this to connect to a DuckDB database in memory, from a local file or on MotherDuck with Power BI and Excel.
Download the latest DuckDB ODBC driver from the DuckDB Power Query Connector GitHub Releases for Windows:
Extract the .zip
archive into a permanent location, such as C:\Program Files\duckdb_odbc
, and install the latest DuckDB driver by running odbc_install.exe
.
Check that the correct version was installed. To do this, open the Registry Editor by running regedit
in the command prompt or Run
dialog. Browse to the HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI\DuckDB Driver
entry and check that the Driver field contains the version you installed. If not, delete the DuckDB Driver
registry key and rerun the installer.
Open Power BI, go to File -> Options and settings -> Options -> Security -> Data Extensions. Enable "Allow any extensions to load without validation or warning".
Download the latest version of the DuckDB Power Query extension:
Create this folder if it does not yet exist: [Documents]\Power BI Desktop\Custom Connectors
.
Move or copy the duckdb-power-query-connector.mez
file into [Documents]\Power BI Desktop\Custom Connectors
. Note that if this location does not work, you may need to place this in your OneDrive Documents folder.
DuckDB
and click "Connect"
~\my_database.db
) or a MotherDuck database location (e.g. md:my_database
). (Optional) enter your MotherDuck token. If you want to access the database in read_only
mode, you can set it to true
.
Click "OK".UTF-8 is currently not supported in the DuckDB ODBC driver. As a workaround, you can turn on UTF-8 decoding in Windows. Note that this may change behavior for other applications, so please use with caution.
Now, you should be able to load your UTF-8 encoded database with Power BI directly: