MongoDB Render updates#11840
Conversation
|
hello @tino097 |
|
@maher00746 thanks for the example, i will take a look |
|
Hi @tino097, thanks for your reply, The issue is that MindsDB treats MongoDB documents as JSON (or plain text), especially when they contain nested structures. Even when there are integer values, MindsDB still interprets them as text, which causes problems when applying SQL queries, since SQL logic doesn’t work properly on nested JSON data. Yesterday, I tried a workaround by “unifying” the data: using an LLM to extract nested documents and store them in a structured table format. This effectively converted the MongoDB data into a relational structure. However, this approach isn’t ideal, because we end up querying the modified local data instead of the original MongoDB source, which means we need continuous synchronization. Additionally, the extraction and unification process is expensive, as it relies on an LLM and consumes significant time and tokens. I’ve been exploring ways to treat MongoDB data as structured data so that SQL queries could run directly on it, but so far, no luck. |
|
@maher00746 MindsDB is treating documents as tables and the SQL queries are later translated to MongoDB via its handler. In your case some of the complex functionalities are not correctly handled which will needs to be implemented next edit: |
…renderer-improvement
Co-authored-by: andrew <elkin.andr@gmail.com>
Co-authored-by: martyna-mindsdb <109554435+martyna-mindsdb@users.noreply.github.com>
…renderer-improvement
…derer-improvement
|
@ea-rus hey when this pull request will get merged |


Description
Update
mongodb_renderto handle subqueries in the SELECT statements.Adding more tests to cover different scenarios
Fixes #11837
Verification Process
To ensure the changes are working as expected:
tests/unit/handlers/test_mongodb.pyAdditional Media:
Checklist: