# Read column of datatype "JSON" from database using Logstash

**URL:** <https://discuss.elastic.co/t/read-column-of-datatype-json-from-database-using-logstash/306369>\
**Category:** Logstash\
**Created:** [June 3, 2022, 10:31pm UTC](https://discuss.elastic.co/t/read-column-of-datatype-json-from-database-using-logstash/306369 "2022-06-03T22:31:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhavani\_nandakumar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavani_nandakumar/32/92068_2.png) [@bhavani\_nandakumar](https://discuss.elastic.co/u/bhavani_nandakumar)\
**Post date:** [June 3, 2022, 10:31pm UTC](https://discuss.elastic.co/t/read-column-of-datatype-json-from-database-using-logstash/306369/1 "2022-06-03T22:31:24Z")

</div>

I have developed a script to read table from Postgres Database and load the data in a json format inside Kafka topic. The problem is one of the columns (cust\_record) in the table is JSON type and I could not read that column as json using logstash. So I converted Json type into text type and then loaded into kafka.

Now, I need to extract the value from the one of keys of that Json field. Since I converted into text, I am not sure how to parse that text as json inside filter plug in.

Note: If I try to read json column from table as it is, I got this error "exception=\> "java::OrgLogstash::MissingConverterException: Missing Converter handling for full class name = org.postgressql.util.PGobject"

In kafka topic, the column (cust\_record) looks like this

"cust\_record" : "{nested\_json}"

How can I extract values inside json keys when that json has been converted into text while reading from source table? or  
is there anyway possible that I can read the column as type "Json" itself without converting as text? so that inside filter plug in, I can extract value out of json keys?

Kindly help. I am a newbie on this technology. Appreciate your assistance on this problem.

---

<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:** [July 1, 2022, 10:32pm UTC](https://discuss.elastic.co/t/read-column-of-datatype-json-from-database-using-logstash/306369/2 "2022-07-01T22:32:11Z")

</div>

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