# JDBC streaming array as parameter

**URL:** <https://discuss.elastic.co/t/jdbc-streaming-array-as-parameter/348159>\
**Category:** Logstash\
**Tags:** jdbc\
**Created:** [November 28, 2023, 3:19pm UTC](https://discuss.elastic.co/t/jdbc-streaming-array-as-parameter/348159 "2023-11-28T15:19:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodrigo\_Martins](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rodrigo_martins/32/128157_2.png) [@Rodrigo\_Martins](https://discuss.elastic.co/u/Rodrigo_Martins)\
**Post date:** [November 28, 2023, 3:19pm UTC](https://discuss.elastic.co/t/jdbc-streaming-array-as-parameter/348159/1 "2023-11-28T15:19:33Z")

</div>

Hello everyone,  
We are trying to execute a jdbc\_streaming query that takes as parameter a array of values.  
Our statement looks like this:

```auto
statement => "SELECT `table_name`,`column_name`,`classification` FROM `tableEx` WHERE `table_name` IN (:result_tables) 

```

result\_tables is a array of strings with table names.  
We already tried many diferent approaches like, passing the parameter as a string table names joined by ",", we also tried passing the parameter as a string with the table names between (') and joined by ",". And we even tried to prepare the whole query in ruby and then just use the query from the field, and it also did not work.  
Any tips on how to solve this?

Our code now:

```auto
statement => "SELECT `table_name`,`column_name`,`classification` FROM `tableEx` WHERE `table_name` IN (:result_tables) 
parameters => {
  result_tables => result_tables
} 

```

PS: We tried with with a fixed query and it worked fine, so the query/values are not the problem.

---

<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:** [December 26, 2023, 3:20pm UTC](https://discuss.elastic.co/t/jdbc-streaming-array-as-parameter/348159/2 "2023-12-26T15:20:09Z")

</div>

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