URGENT.. PLEASE HELP : Not able to execute a procedure from logstash jdbc_filter

I'm getting this following error when trying to execute a mysql procedure call from logstash. This procedure is getting successfully executed through mysql command line.
The error is
jdbcstreaming - Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::JavaSql::SQLException: ResultSet is from UPDATE. No Data.>}

This is the part of jdbc_streaming filter I use

jdbc_streaming {
		jdbc_driver_library => "${MYSQL_DRIVER_PATH}"
		jdbc_driver_class => "${JDBC_DRIVER}"
		jdbc_connection_string => "${JDBC_CONNECTION_STRING}"
		jdbc_user => "${DB_USERNAME}"
		jdbc_password => "${DB_PASSWORD}"
		statement => "call insertData(:jobId,:process, :description)"
		parameters => { "jobId" => "jobId"
						"process" => "process"
						"description" => "@metadata[dataStarted]"				
					 }
		target => "audit_id"
	}

This is the code of mysql procedure I'm trying to call
BEGIN
if(job_id is not null) then
INSERT INTO rcyc_audit(job_id, process_name, description) VALUES(job_id, process_name, description);
SELECT LAST_INSERT_ID() as audit_id;
end if;
END

The jdbc_streaming filter " executes a SQL query and store the result set in the field specified as target ." An INSERT is not a query, and does not return a result set.

1 Like