Single query_engine instance for both postgres and mongodb #10210
Replies: 1 comment
-
🤖 Based on the information available in the LlamaIndex repository, it appears that the framework does have a built-in query engine that can handle requests for PostGreSQL. This is evident from the import of Here is the supporting code: from llama_index.indices.struct_store.sql_query import (
NLSQLTableQueryEngine,
PGVectorSQLQueryEngine,
SQLTableRetrieverQueryEngine,
) In the above code, However, the current version of LlamaIndex (v0.9.36) does not seem to support a single query engine instance for both PostGreSQL and MongoDB. It might be possible to extend the framework to support this feature, but it would likely require significant development effort. If you need this feature urgently, you might consider implementing a custom query engine that can handle both types of databases. This would involve creating a new class that inherits from the base Please note that this is a complex task and would require a deep understanding of both the LlamaIndex framework and the underlying databases. If you decide to go this route, I would recommend thoroughly testing your implementation to ensure it works correctly with both types of databases. I hope this information is helpful. If you have any further questions, please don't hesitate to ask. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Team,
I want to have a single query engine instance which will deal with both PostGreSQL and MongoDB.
Beta Was this translation helpful? Give feedback.
All reactions