# Issue with selecting date fields from the \`jdbc\_streaming\` \`filter\` plugin

**URL:** <https://discuss.elastic.co/t/issue-with-selecting-date-fields-from-the-jdbc-streaming-filter-plugin/314023>\
**Category:** Logstash\
**Created:** [September 8, 2022, 10:39pm UTC](https://discuss.elastic.co/t/issue-with-selecting-date-fields-from-the-jdbc-streaming-filter-plugin/314023 "2022-09-08T22:39:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkumarcc](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@nkumarcc](https://discuss.elastic.co/u/nkumarcc)\
**Post date:** [September 8, 2022, 10:39pm UTC](https://discuss.elastic.co/t/issue-with-selecting-date-fields-from-the-jdbc-streaming-filter-plugin/314023/1 "2022-09-08T22:39:34Z")

</div>

I have a nested field in my Elasticsearch mapping which holds an array of objects. We wanted to add this array to records via a `jdbc_streaming` filter. However, 2 of the fields we query for are timestamp fields, which cause a conversion error as Ruby tries to turn the dates into RubyDate values.

I tried casting the dates to varchar in the query, then converting them to dates after via a `ruby` filter. This just caused the same issue

We were able to solve this using an `aggregate` filter instead, but it was much less concise and this felt like an edge case that could be addressed. Can we select date and time fields from `jdbc_streaming` somehow?

```auto
filter {
  jdbc_streaming {
    ...
    statement => "select timestampField1, timestampField2 from table WHERE id = ?"
    ...
  }
}

```

---

<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:** [October 6, 2022, 10:40pm UTC](https://discuss.elastic.co/t/issue-with-selecting-date-fields-from-the-jdbc-streaming-filter-plugin/314023/2 "2022-10-06T22:40:20Z")

</div>

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