# Logstash cannot support postgres geometry type

**URL:** https://discuss.elastic.co/t/logstash-cannot-support-postgres-geometry-type/231492
**Category:** Logstash
**Created:** [May 7, 2020, 9:01am UTC](https://discuss.elastic.co/t/logstash-cannot-support-postgres-geometry-type/231492 "2020-05-07T09:01:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ohoroyoi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ohoroyoi/32/46820_2.png) [@ohoroyoi](https://discuss.elastic.co/u/ohoroyoi)
#### Post date: [May 7, 2020, 9:01am UTC](https://discuss.elastic.co/t/logstash-cannot-support-postgres-geometry-type/231492/1 "2020-05-07T09:01:23Z")

</div>

There is a column of geometry type in the postgres table. I checked that the rest of the columns worked fine postgres-\> logstash-\> elasticsearch. **However, I am not sure how to cast the geometry type.** Please help me.

Can anyone give advice on how to cast?

here is my conf now.

```input
	jdbc {
	jdbc_connection_string => "jdbc:postgresql://localhost:5432/atlasdb?	useTimezone=true&useLegacyDatetimeCode=false&serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf8"
	jdbc_user => "atlas"
	jdbc_password => "atlas"
	jdbc_validate_connection => true
	jdbc_driver_library => "/lib/postgres-42-test.jar"
	jdbc_driver_class => "org.postgresql.Driver"
	columns_charset => { "region_name_kr" => "UTF-8" }
	schedule => "* * * * *"
	statement => "SELECT region_id, region_name_full, boundaries_nearby from expedia_region_union_copy_jpa_test order by region_id asc limit 100"
}

stdin {
	codec => plain { charset => "UTF-8"}
}

}
filter {
	json { source => "boundaries_nearby" }
}
output {
	elasticsearch {
	hosts => ["localhost:9200"]
	index => "2020-05-06-wed"
	doc_as_upsert => true
	action => "update"
	document_id => "%{region_id}"
}
	stdout { codec => rubydebug }
}

```

 ![img](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fd2ca15c0d856e7f5d99f673d040461efcca3ca8.png)

> [@SQL query from Logstash causes an error PGobject](https://discuss.elastic.co/t/sql-query-from-logstash-causes-an-error-pgobject/138648):
>
> Logstash passes a request type: SELECT \* from dbmon\_stat\_activity() I get an error in the log: \_[2018-07-02T14:00:00,384][WARN][logstash.inputs.jdbc] Exception when executing JDBC query {:exception=\>#\<Sequel::DatabaseError: Java::OrgLogstash::MissingConverterException: Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject\>}\_ The function that is called by this query: CREATE OR REPLACE FUNCTION public.dbmon\_stat\_activity() RETURNS SETOF pg\_stat\_a…

It seems to overlap with this question, but I couldn't find a clue from that.

here is my sample geometry data

> POLYGON ((19.969742 52.425483, 19.972195 52.424076, 19.973841 52.422807, 19.976831 52.419417, 19.976941 52.419093, 19.978737 52.414383, something else...))

also I think this [Missing Converter handling for full class name=org.postgresql.util.PGobject, simple name=PGobject - #3 by Kit\_Tsang](https://discuss.elastic.co/t/missing-converter-handling-for-full-class-name-org-postgresql-util-pgobject-simple-name-pgobject/163338/3)  
might be an answer. but I do not understand well this answer.

---

<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: [June 4, 2020, 9:01am UTC](https://discuss.elastic.co/t/logstash-cannot-support-postgres-geometry-type/231492/2 "2020-06-04T09:01:31Z")

</div>

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