# URGENT.. PLEASE HELP : Not able to execute a procedure from logstash jdbc\_filter

**URL:** <https://discuss.elastic.co/t/urgent-please-help-not-able-to-execute-a-procedure-from-logstash-jdbc-filter/263858>\
**Category:** Logstash\
**Created:** [February 10, 2021, 11:19am UTC](https://discuss.elastic.co/t/urgent-please-help-not-able-to-execute-a-procedure-from-logstash-jdbc-filter/263858 "2021-02-10T11:19:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Melvin\_Shaju](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/melvin_shaju/32/82760_2.png) [@Melvin\_Shaju](https://discuss.elastic.co/u/Melvin_Shaju)\
**Post date:** [February 10, 2021, 11:19am UTC](https://discuss.elastic.co/t/urgent-please-help-not-able-to-execute-a-procedure-from-logstash-jdbc-filter/263858/1 "2021-02-10T11:19:09Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [February 11, 2021, 7:56pm UTC](https://discuss.elastic.co/t/urgent-please-help-not-able-to-execute-a-procedure-from-logstash-jdbc-filter/263858/2 "2021-02-11T19:56:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 11, 2021, 7:57pm UTC](https://discuss.elastic.co/t/urgent-please-help-not-able-to-execute-a-procedure-from-logstash-jdbc-filter/263858/3 "2021-03-11T19:57:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
