# Logstash JDBC and Firebird

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-and-firebird/213393>\
**Category:** Logstash\
**Created:** [December 30, 2019, 11:43pm UTC](https://discuss.elastic.co/t/logstash-jdbc-and-firebird/213393 "2019-12-30T23:43:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [January 6, 2020, 6:36pm UTC](https://discuss.elastic.co/t/logstash-jdbc-and-firebird/213393/3 "2020-01-06T18:36:35Z")

</div>

> [@Osiel](#):
>
> In summary the result of each select is mixed with the subsequent one.

That is expected. When a pipeline is started, events are read all of the inputs, put through the filters, then written to all of the outputs.

Either, split your configuration into 3 files, and run each one in a different pipeline, or use conditionals. For example

```
input{
	jdbc {
    jdbc_driver_library => "C:\Users\Siamaco\Downloads\Jaybird-3.0.8-JDK_1.8\jaybird-full-3.0.8.jar"
    [...]
    statement_filepath => "C:\_Developer\Elastic\SQL\ContasReceber\cheques_devolvidos.sql"
[....]
        add_tag => ["cheques_devolvidos"]
}
}

output{
    if "cheques_devolvidos" in [tags] {
        elasticsearch{
            hosts => ["localhost:9200"]	  
            index => "cheques_devolvidos"
            document_id => "%{total_cheque_devolvido}"
        }
    }
}

```

---

_[View the full topic](https://discuss.elastic.co/t/logstash-jdbc-and-firebird/213393)._
