# Generate UUID in input plugin

**URL:** <https://discuss.elastic.co/t/generate-uuid-in-input-plugin/380356>\
**Category:** Logstash\
**Created:** [July 22, 2025, 5:41pm UTC](https://discuss.elastic.co/t/generate-uuid-in-input-plugin/380356 "2025-07-22T17:41:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francesco\_Esposito](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/francesco_esposito/32/141865_2.png) [@Francesco\_Esposito](https://discuss.elastic.co/u/Francesco_Esposito)\
**Post date:** [July 22, 2025, 5:41pm UTC](https://discuss.elastic.co/t/generate-uuid-in-input-plugin/380356/1 "2025-07-22T17:41:12Z")

</div>

Hello everyone,

I am trying to execute a query thru jdbc input plugin and I need to generate a unique ID to pass in my stored procedure to identify my "flight", my single execution.

Is it possible?

---

<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:** [July 22, 2025, 7:26pm UTC](https://discuss.elastic.co/t/generate-uuid-in-input-plugin/380356/2 "2025-07-22T19:26:48Z")

</div>

The parameters passed by the jdbc input will be static, they cannot change for each execution.

If you want the SQL query to be run on a schedule and have a parameter change for each execution then you may be able to do it using a heartbeat input to set the schedule, then a ruby filter to generate the unique id and store in a field under [@metadata], then use a jdbc\_streaming filter to run the SQL query.
