Forum Discussion
DataSource.Error in Power BI – MongoDB Collections Show No Visible Columns
I’m trying to connect MongoDB with Power BI using the BI Connector and ODBC Connector. Most tables are loading fine, but for a few collections or the collection which I have added later I get this error:
DataSource.Error: The table has no visible columns and cannot be queried
What’s strange is that if I use the same collection in another database, it loads without any issue. Has anyone faced this problem before or found a solution?
5 Replies
- DanieleUgoCopp
Super User
Hello,
I’m not completely sure, but this usually happens when the BI Connector can’t infer a schema for the collection,
that can be because the documents don’t share common top-level fields, or because all fields are nested inside objects or arrays, so Power BI ends up seeing a table with no columns.Since it works in another database, I’d check whether the data structure is really the same, even small differences could be, you could try inspecting a few documents directly in MongoDB to see if there’s at least one simple scalar field at the top level, and also restart the BI Connector to make sure the schema isn’t cached.
Best regards,
Daniele - v-aatheeque
Community Support
Hi
Thanks for reaching out to Microsoft Fabric Community Forum.The table has no visible columns and the error indicates that Power BI can detect the table/collection (for example, sample) Has no columns marked as visible in the metadata (e.g. hidden in Power Query or the source system or Is structurally empty or misconfigured, making it non-queryable.
Here are a few things to try below trouble shooting steps :
- Verify the table/collection contains at least one document.
- Ensure documents include top-level fields (not only nested objects or arrays).
- Avoid special characters in field names and unsupported data types.
- Check in Power Query that at least one column is visible and not removed by any transformation step.
- Restart the MongoDB BI Connector (mongosqld) to reload schema metadata.
- If using MongoDB Atlas, run a schema refresh or restart the BI Connector service.
- Clear Power BI’s cached metadata : File - Options and settings - Data source settings - Clear permissions
Reconnect the data source and refresh in Power Query.
Reference : https://www.mongodb.com/docs/bi-connector/current/connect/powerbi/
https://www.mongodb.com/community/forums/t/power-bi-datasource-error/248358/4
Solved: Power BI + MongoDB - Not seeing new fields - Microsoft Fabric Community
Hope this helps !!
Thank You.
- v-aatheeque
Community Support
Hi mithilN
We wanted to follow up to check if you’ve had an opportunity to review the previous responses. If you require further assistance, please don’t hesitate to let us know.- mithilNFrequent Visitor
Thanks for your earlier response. Unfortunately, the solution provided hasn’t resolved the issue. I’m still facing the same error when refreshing the dataset. Additionally, whenever I add new tables, the same error occurs. If I copy an existing table that loads successfully and create a new one with a different name, the error reappears.
Could you please advise on the next steps or help investigate further?