Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject

Getting this error trying to use logstash jjdbc to extract complex objects from postgres. Converting to TEXT did not work as well

][WARN ][logstash.inputs.jdbc     ][rivi-poc_people][ed94f8a65daf945d07d8fd7ebea8d75acaddf6a50b45503ce2fca69b5b47b17c] Exception when executing JDBC query {:exception=>"Java::OrgLogstash::MissingConverterException: Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject"}
^[[3~[2020-12-14T20:46:03,082][INFO ][logstash.inputs.jdbc     ][rivi-poc_people][ed94f8a65daf945d07d8fd7ebea8d75acaddf6a50b45503ce2fca69b5b47b17c] (0.084938s) SELECT people.status_updated_at,to_json(people::TEXT)
  FROM (SELECT pp.id,
               pp.full_name,
               pp.status_updated_at,
               (SELECT jsonb_agg(nested_address)
                  FROM (SELECT adr.id,
                               adr.street,
                               adr.city
                          FROM poc_people_address adr
                          WHERE adr.people_id = pp.id) AS nested_address) AS address
          FROM poc_people pp
          WHERE status_updated_at > '2020-12-14 18:13:30.746351+0000') people

input {
  jdbc {
        jdbc_driver_library => "/etc/logstash/rivi/postgresql-42.2.18.jar"
        jdbc_driver_class => "org.postgresql.Driver"
        jdbc_connection_string => "jdbc:postgresql://localhost:5432/production_aws"
        jdbc_user => "******"
        jdbc_password => "*******"
        schedule => "/2 * * * * *"
        #statement => "select id,full_name,message,status_updated_at from poc_people where status_updated_at > :sql_last_value"
        #statement => "select id,full_name,message,status_updated_at from poc_people"
        statement_filepath => "/etc/logstash/rivi/poc_people.sql"
        use_column_value => true
        tracking_column => "status_updated_at"
        tracking_column_type => "timestamp"
        last_run_metadata_path => "/etc/logstash/rivi/poc_people.run"
  }
}


ffoti@rivi-dev:~$ sudo cat /etc/logstash/rivi/poc_people.sql
SELECT people.status_updated_at,row_to_json(people)
  FROM (SELECT pp.id,
               pp.full_name,
               pp.status_updated_at,
               (SELECT jsonb_agg(nested_address)
                  FROM (SELECT adr.id,
                               adr.street,
                               adr.city
                          FROM poc_people_address adr
                          WHERE adr.people_id = pp.id) AS nested_address) AS address
          FROM poc_people pp
          WHERE status_updated_at > :sql_last_value) people

1 Like

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