Jdbc postgres nested object solution

Does someone have this working? I am getting an Exception using a row_to_json sql statement.

"Exception when executing JDBC query {:exception=>"Java::OrgLogstash::MissingConverterException: Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject"

SELECT status_updated_at,row_to_json(people)
  FROM (SELECT pp.id,
               (SELECT jsonb_agg(nested_address)
                  FROM (SELECT adr.id,
                          FROM poc_people_address adr
                          WHERE adr.people_id = pp.id) AS nested_address) AS address
          FROM poc_people pp) 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 => ""
        codec => json
        #schedule => "/2 * * * * *"
        statement_filepath => "/etc/logstash/rivi/poc_people_first.sql"
        use_column_value => true
        tracking_column => "status_updated_at"
        tracking_column_type => "timestamp"
        last_run_metadata_path => "/etc/logstash/rivi/poc_people.run"

Any input on this from Elastic? One of my customers who has a large cloud deployment stack needs this in place if we can. I have a work around but is not optimal....


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