Logstash-input-jdbc empty records

I am trying to get db records from postgres to elastic but I am not able to get first three columns. Pdate and record_id are coming but others(text) not.

input {
  jdbc {
    jdbc_connection_string => "jdbc:postgresql://"
    jdbc_user => "postgres"
    jdbc_password => "admin"
    jdbc_validate_connection => true
    jdbc_driver_library => "/tert/postgresql-42.1.4.jar"
    jdbc_driver_class => "org.postgresql.Driver"
    jdbc_paging_enabled => true
    jdbc_page_size => 100
    statement => "select transliterated_author, sanitized_content, sanitized_title, pdate, record_id from public.tert where valid = true"

output {
  elasticsearch {
    document_id => "%{record_id}"
    hosts => ["elasticsearch"]

So what does an example document look like? What do you get if you use a stdout { codec => rubydebug } output?

logstash_1 | {
logstash_1 | "record_id" => "c8f9-11e7-b0ab-0242ac110002",
logstash_1 | "sanitized_content" => "ABU DHABI, AUGUST 25. ARMINFO. Russian Grandmaster becomes sole leader Grandmaster Yemelin Vasily of Russia emerged as sole leader with 5 points at the end of the sixth round of the 13th Abu Dhabi Chess Festival being held at the Abu Dhabi Cultural Foundation. A pack of seven players are close on the heels of the leader just half a point behind. These include Grandmasters Lputian Smbat (Armenia), Poluljahov Aeksandr (Russia), Vladimirov Evgeny (Kazakhstan), Sargissian Gabriel (Armenia), Dizdar Goran (Croatia), Kotsur Pavel (Kazakhstan) and International Master Javad Maherrmszad (Azerbaijan) with a tally of 4.5 points each.",
logstash_1 | "sanitized_title" => "info: AFTER SIX ROUNDS ARMENIAN CHESS PLAYERS RANK SECOND",
logstash_1 | "@timestamp" => 2017-11-16T15:34:08.465Z,
logstash_1 | "pdate" => 2003-08-26T00:00:00.000Z,
logstash_1 | "@version" => "1",
logstash_1 | "transliterated_author" => nil
logstash_1 | }

Okay, well that looks good. What does the corresponding document in ES look like?

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