MongoDB connector can not select data from read-only node #23123
Unanswered
alexanderhw
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I have a very similar situation, where basically I would like to give trino only read access to the data. Since it needs to maintain the _schema document, is there any way this document could exist in a different mongo database (within the same mongo instance)? Then the document would be named something like "_db-name_schema" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I recently deployed trino in stand-alone mode and connected it to mongodb, I was unable to read data from the mongodb read-only instance node. The result indicate that the read-only instance node is not master node of mongodb. The specific error message is:
I noticed that the official deployment guide mentioned that trino needs to have write permissions for information schema. Does this mean that mongodb read-only instance nodes cannot connect to trino?
If trino can connect to mongodb read-only instance nodes, do I need to add any configuration? My current mongodb connection config is:
basic environment:
mongodb cluster environment:
Update:
I have read the source code of
trino-mongodb
connector and noticed that theMongoSession#getTableMetadata(String schemaName, String tableName)
function will read configurationmongodb.schema-collection
to infer the collection field structure. If the schema collection does not defined, trino needs to create this collection and dynamically maintain it, so mongodb's write permission may be required.So will trino support maintaining similar table structures within the cluster instead of in specific data source instances? In many production scenarios, from the perspective of data security, data analysis is often connected to read-only instances.
Beta Was this translation helpful? Give feedback.
All reactions