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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Power BI & MongoDB

 

Hi Everyone!

 

I´m working with MongoDB as data source of my Power BI.
I created a ODBC conector with this driver:
https://www.progress.com/odbc/mongodb?sfdcid=701a0000002MkKS&cmpid=ddblog

 

And I have the impression that there isn´t a estable connection or it doesn´t work fine.
It takes so much time refreshing data and sometimes show me a error.

Anyone who has worded with MongoDB and Power BI together can tell me their impressions??
Work fine together ??

Thanks!

10 REPLIES 10
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous,

 

Based on my research, we connect to MongoDB via MongoDB ODBC Driver generally, as this driver is not published by Microsoft. It may be have some issue when integrate with Power BI Desktop. In your scenario, when you refresh the data, which error throws out?

 

By the way, there is already a idea about developer built-in MongoDB data source, you can also vote on it: MongoDB.

 

Best Regards,
Qiuyun Yu

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

Thanks for the answers!

 

I'm trying differents ways to  upload the model.

 

I will proof the R connection as you tell me, @Greg_Deckler.
@v-qiuyu-msft, I jus voted for the idea , I will wait for the conclusion.

 

Regards.

Greg_Deckler
Super User
Super User

Well, anything going through ODBC is going to be slow. You might consider using R to connect to mongodb using rmongodb package:

 

http://stackoverflow.com/questions/35028809/connect-r-to-remote-mongodb-with-rmongodb

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler!

Can you explain me more about this way you told me?

I don't see exactly what steps I have to do and the interaction between R and Power BI.

Thanks!

In the Desktop, you can create entire queries based on R or individual steps within a query based upon R. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler!

I have created a Query based on R script to connect with Mongo DB but the table show me an ERROR colummn.


My R-Script is like this:
library(mongolite)
m<-mongo(collection="AVE",db = "MIURA",url = "url", verbose = F)
Query<-m$find(query = "{}", fields = "{\"_id\":0}", sort = "{}", skip = 0, limit = 0, handler = NULL, pagesize = 1000)

 

And the resulting table is this:

 

Captura.PNG

 

I can't show the arrays inside of the clients column.
Someone can help me???
 

Not sure of your data in MongoDB, I take it that the "clients" column is some sort of list/array? You may have to convert whatever it is into something Power BI understands, like a Table or List.

 

For example, here are is some R code for processing information resulting from a Machine Learning call:

 

print("Result:")
result = h$value()
print(fromJSON(result))
 
##Return results back
inter <- do.call("rbind", finalResult$Results$output1$value$Values)
MyFinalResults <- data.frame(inter)
names(MyFinalResults) <- finalResult$Results$output1$value$ColumnNames
 
rm(list=setdiff(ls(), "MyFinalResults "))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler!

 

Can you tell me what R package are you using?

I´m a begginer in all of this R-world.

 

Thanks!

I use Microsoft R Open:

https://mran.microsoft.com/download/

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I meant to the library inside R.
What library are you using: mongolite, rmongodb, rmongo....?

 

I saw that there are differents options between each other.
Thanks!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors