Mongo Atlas JDBC possible to issue update?

I’ve been trying to use jdbc drivers to read and write tables in mongo atlas via sql connection, but when i try to update the tables i get a message saying ‘command update not available’.
Is there a way to update records directly to the database, or data federation?
Does the SQL command Update not work?

Hello @Telmo_baia the SQL Interface is read only. If you would like to give me an idea regarding the types of write operations you need, I can add that to a feature request for support of writes. We are looking at requests now to build upon our roadmap for the 2nd half of next year.

Hi! Thanks for replying. I’m using a platform to mask data in several types of databases. I can mask a local mongodb, but i need to mask mongodb/atlas. The platform i’m using allows me to install jdbc drivers to do this. So the logic was to communicate with atlas using SQL JDBC URL, read the database, then the platform will find the data that needs to be masked/anonymized and will update the tabled accordingly in atlas, and ofcourse, return it to the previous state, when requested. But i wasn’t aware the SQL interface was read only. I spent alot of time trying :sweat_smile:
Is there any other way to connect via JDBC driver to do this?

Our JDBC driver (and the SQL Interface) is read only. I could suggest the possibility of using another driver, such as Java as that would give you write capabilities, but then you’d lose the SQL aspect for your users. I’m sorry you spent so much time proving this out to find JDBC and the SQL Interface is read only. We do have it stated on the docs, but I will try to make this note stand out more: Query with Atlas SQL - Atlas - MongoDB Docs

You are right, and it is I who should apologize.
Thank you so much for clarifying!

  • Use MongoDB Drivers or APIs (e.g. native Java driver) to run updates
  • Or use Data Federation / Atlas SQL Interface for read/write support (if enabled)
  • As a fallback, pull the document via SQL, modify it in app logic, then write it back via native driver