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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Get the child objects from MongoDB using R

Hi All,

 

  I am facing problem while accessing the child level objects from MongoDB in PowerBI using R. Below is the data schema.

 

  MongoDB.PNG

 

I am using the below R scripts to fetch the documents.

library(mongolite)
c = mongo(collection = "collection_name",db="Test")
query = c$find(query = "{}", fields = "{\"_id\":0}", sort = "{}", skip = 0, limit = 0, handler = NULL, pagesize = 1000)

 

 

I get the error like below

 

 PowerBIError.PNG

 

Any suggestion. 

 

Thanks,

Sud

4 REPLIES 4
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Please test your R script in R studio to check whether it can return correct results. Also, please expand the "Error" to get detailed error message.

 

Regards,

Yuliana Gu

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

Hi @v-yulgu-msft,

 

  I get the error like below.

 

  DataFormat.Error: We cannot convert this value from its .RData representation.

 

  Please let me know if I need to change anything from my source.

 

Thanks,

Sud

Anonymous
Not applicable

Hi @v-yulgu-msft,

 

I checked in R studio it returns me the exact data but the format has changed. Seems there need to change in data format.

 

Thanks,

Sud

Hi @Anonymous,

 

I am not very familiar with R script. But based on my research, it looks like there might existing problems with data convertion when getting child objects from MongoDB. Maybe above error message means that the data format cannot be converted automatically. You may need to force it to be changed in R code.

 

Regards,

Yuliana Gu

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.