# Jdbc\_static dealing with parameters from not existing fields

**URL:** <https://discuss.elastic.co/t/jdbc-static-dealing-with-parameters-from-not-existing-fields/377628>\
**Category:** Logstash\
**Tags:** jdbc\
**Created:** [April 29, 2025, 3:15pm UTC](https://discuss.elastic.co/t/jdbc-static-dealing-with-parameters-from-not-existing-fields/377628 "2025-04-29T15:15:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [April 29, 2025, 5:46pm UTC](https://discuss.elastic.co/t/jdbc-static-dealing-with-parameters-from-not-existing-fields/377628/2 "2025-04-29T17:46:03Z")

</div>

> [@Francesco\_Esposito](#):
>
> I know that account and chaincode could not be in the event but I supposed that the query would treat missing fields as null.

If the parameter fields do not exist then it logs a warning and does not do the lookup. (See [here](https://github.com/logstash-plugins/logstash-integration-jdbc/blob/b943c373efb3902b8651994a6d9276ba5f8e3434/lib/logstash/filters/jdbc/lookup.rb#L32) and [here](https://github.com/logstash-plugins/logstash-integration-jdbc/blob/b943c373efb3902b8651994a6d9276ba5f8e3434/lib/logstash/filters/jdbc/lookup.rb#L156).)

If this is the only lookup then you could wrap the jdbc\_static filter in a test to see of the fields exist:

```
if [account] and [chaincode] { jdbc_static {...} }

```

If you want to suppress all warnings from the filter you could [configure](https://discuss.elastic.co/t/ruby-dumps-tons-of-runtime-errors-after-upgrade-to-8-16-2/374774/7) log4j to do that.

You can use [mutate+convert](https://www.elastic.co/docs/reference/logstash/plugins/plugins-filters-mutate#plugins-filters-mutate-convert) to modify the fields to be integers.

---

_[View the full topic](https://discuss.elastic.co/t/jdbc-static-dealing-with-parameters-from-not-existing-fields/377628)._
