INSERT, DELETE, UPDATE records

Hi, it seems that I can't delete records on a table with the query editor. The query succeeds , but no rows are returned or deleted.

Is there anyway to delete/insert/update records in Mode Analytics?

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Jonathan Krangel
    • Director - Head of Customer Success @ Mode
    • Jonathan_Krangel
    • 1 yr ago
    • Answer
    • Reported - view

    Hi Rodrigo Brandão - thanks for writing in and apologies for the delayed reply.

    Mode should execute any valid SQL code against your database including CREATE, UPDATE, or DELETE statements. If you are still having this issue, it probably makes sense to have one of our Customer Success Engineers take a closer look at your specific configuration.

    To dig deeper, please use in-product chat and write in so one of our Customer Success Engineers can help you troubleshoot. Thanks!

    Like
  • I'm running into this same issue. I can run the UPDATE SQL statement in the query editor but the row doesn't actually seem to get updated.

    If I run the exact same UPDATE SQL statement directly on the DB with the exact same user the UPDATE does work.

    Like
  • Hello, I am having the exact same issue.

     

    The identity key auto increments however the data has not been inserted, checked the error logs in my postgres instance and no issues.

     

    Using the same user within a DBeaver works fine

     

    Thanks 

    Like
  • Circling back with answer.

    Any SQL query that performs writes must be wrapped in a transaction:

    e.g.
    BEGIN;
    UPDATE users
    SET mode = 'admin'
    WHERE id = 'someid123';
    COMMIT;

    This will allow writes to happen inside the query editor web UI.

    Like
Like Follow
  • Status Answered
  • 2 mths agoLast active
  • 4Replies
  • 426Views
  • 4 Following