# Jdbc\_streaming parameters on From

**URL:** <https://discuss.elastic.co/t/jdbc-streaming-parameters-on-from/276104>\
**Category:** Logstash\
**Created:** [June 16, 2021, 8:29am UTC](https://discuss.elastic.co/t/jdbc-streaming-parameters-on-from/276104 "2021-06-16T08:29:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![charles97](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charles97/32/79243_2.png) [@charles97](https://discuss.elastic.co/u/charles97)\
**Post date:** [June 16, 2021, 8:29am UTC](https://discuss.elastic.co/t/jdbc-streaming-parameters-on-from/276104/1 "2021-06-16T08:29:37Z")

</div>

I've seen documentation about using parameters as

```auto
    statement => "select * from WORLD.COUNTRY WHERE Code = :code"
    parameters => { "code" => "country_code"}

```

But I'm in situation where I have 9 different cases and I store each case on a field called `linkedserver`, each case will have linked servers to get the data from.  
it will be like `select * from [linkedserver9].WORLD.COUNTRY WHERE Code = code1`

I've tried

```auto
 statement => "select * from [:linkedserver]WORLD.COUNTRY WHERE Code = :code"
    parameters => { "code" => "country_code" "linkedserver"=>"linkedserver"}

```

but it returning some exception

```auto
        [0] "_jdbcstreamingfailure",
        [1] "_jdbcstreamingdefaultsused",

```

Acctually I can do it by calling jdbc\_streaming filter on every if case (calling jdbc\_streaming 9 times), But using parameters on `FROM` could saving lot of lines.  
Question in, Can we use parameters on `FROM`

---

<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:** [July 14, 2021, 8:29am UTC](https://discuss.elastic.co/t/jdbc-streaming-parameters-on-from/276104/2 "2021-07-14T08:29:53Z")

</div>

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