Hello dears,
I would like to know if I can make queries of type (update, insert, delete) because I try to do with a stored procedure but it does not allow me. or if you can clarify if you only allow reading queries.
Hello dears,
I would like to know if I can make queries of type (update, insert, delete) because I try to do with a stored procedure but it does not allow me. or if you can clarify if you only allow reading queries.
Redash is designed as a read-only tool, but it won’t stop you from running UPDATE, INSERT, or DELETE statements. Just keep in mind that it won’t return any messages from the database afterward so use with care.
It sounds like your problem is that the database user tied to your Redash data source doesn’t have EXEC privileges in your database. Have you explicitly granted permissions to the desired stored procedures?
What type of data source are you using?
Redash doesn’t block queries, but current version has issues with Stored Procedures with MySQL.
Regardless I wouldn’t recommend using Redash for non read queries, as it wasn’t really designed for it.
step 1: this procedure believes it in the sql database
USE DATABASE TO USE
GO
/****** Object: StoredProcedure [dbo].[ActualizaciondeFacturas] Script Date: 7/8/2019 11:06:52 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[ActualizaciondeFacturas]
@IdEstadoAuditoria int,
@EsAuditada int,
@idactorips int,
@NumeroFactura varchar (50)
as
begin
–select IdEstadoAuditoria= @IdEstadoAuditoria, EsAuditada = @EsAuditada from factura
update factura set IdEstadoAuditoria= @IdEstadoAuditoria , EsAuditada = @EsAuditada
where idactorips = @idactorips and NumeroFactura = @NumeroFactura
end
After having created the procedure I made the
step 2: that is to open the redash I create the query with these parameters and it generates an error
exec Actualizaciondefacturas
@IdEstadoAuditoria = {{idestadoAuditoria}},
@EsAuditada= {{EsAuditada}},
@idactorips= {{idactorips}},
@NumeroFactura= ‘{{NumeroFactura}}’
Error running query t
Hello
Currently I have the same problem. Is it possible to make this type of query, and in what way?
Thank you
As Arik mentioned above, this may be possible depending on your data source. Though it’s really not Redash is intended to do. What data source are you using?
I am currently using SQL SERVER.
The intention is to be able to perform queries that allow me to modify data in this engine.
Your queries are passed directly to the underlying DB engine. So the syntax you use to run UPDATE or INSERT statements will be TSQL. A couple things to keep in mind:
Thank you very much for the information, it is already clear to me.