# Jdbc postgres nested object solution

**URL:** <https://discuss.elastic.co/t/jdbc-postgres-nested-object-solution/258875>\
**Category:** Logstash\
**Created:** [December 16, 2020, 2:38pm UTC](https://discuss.elastic.co/t/jdbc-postgres-nested-object-solution/258875 "2020-12-16T14:38:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![frankfoti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankfoti/32/26965_2.png) [@frankfoti](https://discuss.elastic.co/u/frankfoti)\
**Post date:** [December 16, 2020, 2:38pm UTC](https://discuss.elastic.co/t/jdbc-postgres-nested-object-solution/258875/1 "2020-12-16T14:38:03Z")

</div>

Does someone have this working? I am getting an Exception using a row\_to\_json sql statement.

```auto
"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,
               pp.full_name,
               pp.message,
               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) 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"
  }
}

```

---

<div class="post-metadata">

**Author:** ![frankfoti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frankfoti/32/26965_2.png) [@frankfoti](https://discuss.elastic.co/u/frankfoti)\
**Post date:** [January 6, 2021, 3:57pm UTC](https://discuss.elastic.co/t/jdbc-postgres-nested-object-solution/258875/2 "2021-01-06T15:57:34Z")

</div>

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....

Thanks

---

<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:** [February 3, 2021, 3:57pm UTC](https://discuss.elastic.co/t/jdbc-postgres-nested-object-solution/258875/3 "2021-02-03T15:57:42Z")

</div>

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