Forum Discussion
DuckDB file connection
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:
- Open the ODBC Data Source Administrator on your machine (you can search for it in the Start menu).
- Select the "User DSN" or "System DSN" tab (depending on your preference).
- Click the "Add" button to create a new DSN.
- Choose the DuckDB ODBC driver from the list of available drivers.
- Provide a name for the DSN and specify the path to your DuckDB database file (.db extension).
- Complete the configuration process by following the on-screen instructions.
-
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:
- Open Power BI Desktop.
- Click on "Get Data" in the Home tab.
- Select "More..." to access additional data sources.
- Choose "ODBC" from the list of connectors.
- In the ODBC dialog, select the DSN you created in the previous step.
- Click "Connect" to establish the connection.
- Power BI will prompt you to enter credentials if authentication is required.
- Once connected, you can select the desired tables or write custom queries to import data from DuckDB into Power BI.
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
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
- jaryszek1 year agoSuper User
jazzking1202
exactly. It is not working.
Anybody solve the issue?
Best,
Jacek- Anonymous1 year agoNot applicable
Yes! I've solved, check my comment and try the steps.