The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello!
Recently started using DuckDB with Python. It really is very fast and comfortable.
But now I need to connect the DuckDB file, ie database file, to PB, but can't seem to figure out how.
Tried with ODBC, but I am doing something wrong I guess:
After registiering ODBC and indicating db path, PB does not recognize the ODBC driver.
Using :memory: does take me to another step where I can select it, but, ofc, it is empty.
Anyone has succeeded with DuckDB connection?
Thanks!
Hello @alibega !
Follow this steps and you'll solve this problem:
1. Download and install the ODBC driver: https://github.com/MotherDuck-Open-Source/duckdb-power-query-connector/releases/latest/download/duck...
2. Go to powerbi desktop -> File -> Options and settings -> Options -> Security -> Data Extensions, Enable "Allow any extensions to load without validadtion or warning"
3. Download the custom connector: https://github.com/MotherDuck-Open-Source/duckdb-power-query-connector/releases/latest/download/duck...
4. Put this .mez file in the custom connector directory (e.g.: C:\Users\Documents\Power BI Desktop\Custom Connectors)
5. Open your PowerBI Desktop, click on get data and search for Duckdb, set the database and other configs.
To working in Power Bi service follow this steps:
1. Install a gateway
2. Open services and find the On-premisses data gateway and open this (double-click).
3. Go to "log on" tab and click on "Local System Account" and check the "Allow service to intera...." flag.
4. Restart the service.
5. Open the gateway, do your login and in the connectors tab put your custom connectors path (as the step 4 above).
6. Go to your browser, login in your Power Bi service account, click on settings -> Manage connections and gateways -> On-premisses data gateways
7. Click on the three points in the gateway -> settings -> check "Allow user's cloud data source to refresh through..." and "Allow user's custom data connectors..." -> Save
8. Create a new connection -> select the gateway -> select duckdb -> put you database path -> Anonymous auth -> check skip test connection -> create.
Now you'll be able to refresh the data.
for more information see:motherduckdb/duckdb-power-query-connector: DuckDB Power Query Custom Connector by MotherDuck
best regards!
Hey @alibega
Would love to know whether the following works - it's a straight dump out of ChatGPT4 (just in case you couldn't tell it was written by a robot). I've never worked wsith ODBC but wanted to test ChatGPT's understanding of this stuff...
"Connecting DuckDB to Power BI can be achieved using the ODBC driver. To set up the connection successfully, follow these steps:
Install the DuckDB ODBC driver: Download and install the DuckDB ODBC driver from the DuckDB website (https://duckdb.org/).
Configure the ODBC driver: After installing the driver, configure it by creating a Data Source Name (DSN). Here's how you can do it:
Connect to DuckDB in Power BI: After configuring the DSN, you can connect to DuckDB in Power BI using the ODBC connector. Here's how:
If you encounter any issues during the process, double-check the ODBC driver installation and ensure that the DSN configuration matches the DuckDB database file you want to connect to. Additionally, make sure you have the necessary permissions to access the database file."
Hope it's of use!
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
This works in Report Builder or SSRS, it doesn't work in Power BI Desktop. It connects but doesn't show any tablesNo files on the right panel
Yes! I've solved, check my comment and try the steps.