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.
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 }
}
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
might be an answer. but I do not understand well this answer.