Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
jnberger
New Member

Unknown database error when connecting to MongoDB with ODBC

Hi,

 

I’m trying to build a report based on data stored on local MongoDB database, with the ODBC connector.

 

But I’ve got the following error :

DataSource.Error: ODBC: ERROR [HY000] [MySQL][ODBC 1.0(a) Driver][mysqld-5.7.12 mongosqld v2.5.0]Unknown database ''

Details:

    DataSourceKind=Odbc

    DataSourcePath=dsn=MongoLocal64bits

    OdbcErrors=Table

 

Notice that it works fine on Qlik based on the same ODBC source (64 bits).

img1

 

Steps to reproduce on PowerBI (Version: 2.60.5169.4101 64-bit July 2018) :

    • Connect to the ODBC (no credentials)

img2

    • Click on « Table » to navigate into the demo database

img3

    • Click on « Table » to navigate into the animals collection :

img4

 

Here’s the complete query to get the error :

let

    Source = Odbc.DataSource("dsn=MongoLocal64bits", [HierarchicalNavigation=true]),

    demo_Database = Source{[Name="demo",Kind="Database"]}[Data],

    animals_Table = demo_Database{[Name="animals",Kind="Table"]}[Data]

in

    animals_Table

 

Did someone already have this error and fixed it ?

Regards.

JN.

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi JN.,

 

We found the cause. We should add the Database explicitly. Please check it out.

Unknown_database_error_when_connecting_to_Mongo_DB_with_ODBC

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
connect
Resolver I
Resolver I

Here is the solution... Thanks to all the other posts. If you want to see it in action, here is the answer!!

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi JN.,

 

We found the cause. We should add the Database explicitly. Please check it out.

Unknown_database_error_when_connecting_to_Mongo_DB_with_ODBC

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Your solution is not acceptable because the link to the image is available, please post it in to the solution directly!

Hi Dale,

Thanks for your great help !

 

I think that there's a bug somewhere because the database was actually selected in the query :

demo_Database = Source{[Name="demo",Kind="Database"]}[Data]

 

But your workaround is fine and it works for me.

 

Best regards.

JN.

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi JN,

 

I tested with almost the same settings as yours. It seems fine. Can you share your "drdl" file? But I don't think that will be a problem. BTW, my MongoDB is the latest community version hosted in Ubuntu 16.04. 

Can you share a snapshot of the ODBC settings, please?mongo.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.