# Logstash JDBC not returning data

**URL:** <https://discuss.elastic.co/t/logstash-jdbc-not-returning-data/131306>\
**Category:** Logstash\
**Created:** [May 10, 2018, 12:18pm UTC](https://discuss.elastic.co/t/logstash-jdbc-not-returning-data/131306 "2018-05-10T12:18:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaoantoniopereira](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@joaoantoniopereira](https://discuss.elastic.co/u/joaoantoniopereira)\
**Post date:** [May 10, 2018, 12:18pm UTC](https://discuss.elastic.co/t/logstash-jdbc-not-returning-data/131306/1 "2018-05-10T12:18:19Z")

</div>

Hi, I am running Logstash 5.6.4 with JDBC input with the following config:

```
input {
    jdbc {
        jdbc_driver_library => "/src/logstash-5.6.4/logstash-plugin-jdbc/ojdbc7-12.1.0.2.jar"
    	jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
        jdbc_connection_string => "jdbc:oracle:thin:@x.x.x.x:x/name"
        jdbc_user => "user"
        jdbc_password => "password"

        statement => "SELECT * FROM TABLE WHERE to_timestamp(DAY, 'YY.MM.DD') = to_timestamp(:sql_last_value,'YY.MM.DD') + NUMTODSINTERVAL(1,'day')"
        #schedule => "5 * * * *"
        last_run_metadata_path => "/app/script/.logstash_metadata"
        tracking_column => "DAY"
        use_column_value => true
    }
}

output {
        stdout {
            codec => rubydebug { metadata => true }
        }
}

```

When I run this code I get:

> [2018-05-10T13:11:09,713][INFO][logstash.pipeline] Pipeline .monitoring-logstash started  
> [2018-05-10T13:11:09,726][INFO][logstash.pipeline] Starting pipeline {"id"=\>"main", "pipeline.workers"=\>1, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>5, "pipeline.max\_inflight"=\>125}  
> [2018-05-10T13:11:09,855][INFO][logstash.pipeline] Pipeline main started  
> [2018-05-10T13:11:09,933][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9611}  
> [2018-05-10T13:11:19,724][INFO][logstash.inputs.metrics] Monitoring License OK  
> [2018-05-10T13:11:42,837][INFO][logstash.inputs.jdbc] (32.126000s) **SELECT \* FROM TABLE WHERE to\_timestamp(DAY, 'YY.MM.DD') = to\_timestamp('18.05.02','YY.MM.DD') + NUMTODSINTERVAL(1,'day')**  
> [2018-05-10T13:11:42,897][WARN][logstash.agent] stopping pipeline {:id=\>".monitoring-logstash"}  
> [2018-05-10T13:11:44,620][WARN][logstash.agent] stopping pipeline {:id=\>"main"}

It looks like the query has been made but I get no output.  
Does anyone know why Logstash does not return output data? In SQL Server the query in bold gets results.  
Best regards

---

<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:** [June 7, 2018, 12:18pm UTC](https://discuss.elastic.co/t/logstash-jdbc-not-returning-data/131306/2 "2018-06-07T12:18:22Z")

</div>

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