# Relation input jdbc POSTGRES logstash

**URL:** https://discuss.elastic.co/t/relation-input-jdbc-postgres-logstash/310458
**Category:** Logstash
**Created:** [July 23, 2022, 4:18pm UTC](https://discuss.elastic.co/t/relation-input-jdbc-postgres-logstash/310458 "2022-07-23T16:18:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![5k\_pwc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/5k_pwc/32/107057_2.png) [@5k\_pwc](https://discuss.elastic.co/u/5k_pwc)
#### Post date: [July 23, 2022, 4:18pm UTC](https://discuss.elastic.co/t/relation-input-jdbc-postgres-logstash/310458/1 "2022-07-23T16:18:27Z")

</div>

Hello everyone,

It seems im missing something, but couldn't found anything related to this. Im using jdbc input plugin to collect some data from postgresql db.

e Elastic Common Schema. Once ECS v8 and an updated release of this plugin are publicly available, you will need to update this plugin to resolve this warning.  
[2022-07-23T17:11:16,579][INFO][logstash.outputs.elasticsearch][main] Using a default mapping template {:es\_version=\>8, :ecs\_compatibility=\>:v8}  
[2022-07-23T17:11:16,757][INFO][logstash.javapipeline][main] Starting pipeline {:pipeline\_id=\>"main", "pipeline.workers"=\>4, "pipeline.batch.size"=\>125, "pipeline.batch.delay"=\>50, "pipeline.max\_inflight"=\>500, "pipeline.sources"=\>["C:/Users/Lenovo/Desktop/ELK/logstash-8.1.0/conf.conf"], :thread=\>"#\<Thread:0x632a9cab run\>"}  
[2022-07-23T17:11:18,734][INFO][logstash.javapipeline][main] Pipeline Java execution initialization time {"seconds"=\>1.96}  
[2022-07-23T17:11:18,894][INFO][logstash.inputs.jdbc][main] ECS compatibility is enabled but `target` option was not specified. This may cause fields to be set at the top-level of the event where they are likely to clash with the Elastic Common Schema. It is recommended to set the `target` option to avoid potential schema conflicts (if your data is ECS compliant or non-conflicting, feel free to ignore this message)  
[2022-07-23T17:11:18,907][INFO][logstash.javapipeline][main] Pipeline started {"pipeline.id"=\>"main"}  
[2022-07-23T17:11:19,031][INFO][logstash.agent] Pipelines running {:count=\>1, :running\_pipelines=\>[:main], :non\_running\_pipelines=\>}  
[2022-07-23T17:11:21,316][ERROR][logstash.inputs.jdbc][main][93b8511000ea072a746d99b5947f6736afe05497184ca33530a422de49011599] Java::OrgPostgresqlUtil::PSQLException: ERREUR: erreur de syntaxe sur ou pr├¿s de ┬½ - ┬╗  
Position┬á: 23: SELECT \* FROM PUBLIC.Consommation  
[2022-07-23T17:11:21,463][WARN][logstash.inputs.jdbc][main][93b8511000ea072a746d99b5947f6736afe05497184ca33530a422de49011599] Exception when executing JDBC query {:exception=\>Sequel::DatabaseError, :message=\>"Java::OrgPostgresqlUtil::PSQLException: ERREUR: erreur de syntaxe sur ou pr├¿s de ┬½ - ┬╗\n Position┬á: 23", :cause=\>"org.postgresql.util.PSQLException: ERREUR: erreur de syntaxe sur ou pr├¿s de ┬½ - ┬╗\n Position┬á: 23"}  
my file conf like this:`

```auto
input {
    jdbc {
jdbc_driver_library => "C:\Users\Lenovo\Desktop\ELK\logstash-8.1.0\logstash-core\lib\jars\postgresql-42.4.0.jar"
jdbc_driver_class => "org.postgresql.Driver"
  jdbc_connection_string => "jdbc:postgresql://localhost:5432/nameDB"
        jdbc_user => "postgres"
        jdbc_password => ""
        #schedule => " * * * * *" 
        statement => "SELECT * FROM PUBLIC.Consommation"
   # tracking_column => "ID_P"
 #tracking_column_type => "numeric"
#record_last_run => true
#clean_run => true
   # jdbc_fetch_size => 10
    }
}

output {
  elasticsearch {
        hosts => ["http://localhost:9200"]
        index => "20190904test-%{+YYYY.DD.dd}"
       user => "el"
       password => "r"
}
}
any suggestion,?

```

---

<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: [August 20, 2022, 4:18pm UTC](https://discuss.elastic.co/t/relation-input-jdbc-postgres-logstash/310458/2 "2022-08-20T16:18:43Z")

</div>

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