You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a insert, update, or delete query is run in Redash, the result is an error message:
The query does not actually run, and the error message is completely inscrutable.
If the query is followed by a select query, like this—
update Contact set id=1where id=1;
select1;
—then the second query runs and returns the expected value, but the first query still doesn't actually run.
Here are some better ways this could be handled, from best to worst:
When an insert, update, or delete query is run, actually run it and provide feedback like "1 row affected"
When an insert, update, or delete query is run, actually run it and provide no feedback
When an insert, update, or delete query is run, actually run it, but still provide an error message because no results are returned (Redash 8 with Postgres behaved this way. I don't like it, but it's still better to run the query than not.)
When an insert, update, or delete query is run, provide an error message that tells the user what's going on.
This occurs in all environments I have tested, using Redash 10.1.0.b50633 via the Docker image with a Microsoft SQL Server data source.
Steps to Reproduce
Run a query like update Contact set id=1 where id=1;.
Observe the error.
Expected behavior: The query runs as instructed, and there is no error message.
Technical details:
Redash Version: 10.1.0.b50633 via the Docker image.
Browser/OS: Firefox 130.0.1 on Windows 10, but I don't think it matters
How did you install Redash: Docker image
The text was updated successfully, but these errors were encountered:
Interesting. Redash is generally used as a reporting tool (ie SELECT queries), but I could see that being able to stuff that changes the database would indeed be useful.
This is probably an area of things that could be looked at and improved to support doing so more.
Yeah, I realize it's not the normal use case, but I think it's worth supporting. We use our Redash installation not just for reporting, but also as a way to grant certain people access to the database (preferably including insert, update, and delete) without having to deal with SSH keys, establishing a tunnel, etc.
Issue Summary
When a
insert
,update
, ordelete
query is run in Redash, the result is an error message:The query does not actually run, and the error message is completely inscrutable.
If the query is followed by a
select
query, like this——then the second query runs and returns the expected value, but the first query still doesn't actually run.
Here are some better ways this could be handled, from best to worst:
insert
,update
, ordelete
query is run, actually run it and provide feedback like "1 row affected"insert
,update
, ordelete
query is run, actually run it and provide no feedbackinsert
,update
, ordelete
query is run, actually run it, but still provide an error message because no results are returned (Redash 8 with Postgres behaved this way. I don't like it, but it's still better to run the query than not.)insert
,update
, ordelete
query is run, provide an error message that tells the user what's going on.This occurs in all environments I have tested, using Redash 10.1.0.b50633 via the Docker image with a Microsoft SQL Server data source.
Steps to Reproduce
update Contact set id=1 where id=1;
.Expected behavior: The query runs as instructed, and there is no error message.
Technical details:
The text was updated successfully, but these errors were encountered: