Hi all,
I have a view in Postgres with a single column of type jsonb. To get around some weirdness, I decided to update the view and cast this column as text (it appears I'm not able to access a PGObject, hence the update). When the rows are processed, they're processed with "search_documents" as the top level key in the object and the original JSON object as the value. This isn't quite what I was looking for, the JSON in these columns are already objects and they're also valid JSON. Below is my configuration.
input {
jdbc {
jdbc_connection_string => "jdbc:postgresql://host:5432/master?user=xxx&password=xxx"
jdbc_user => "xxx"
jdbc_validate_connection => true
jdbc_driver_library => "/usr/share/java/postgresql-jdbc4-9.2.jar"
jdbc_driver_class => "org.postgresql.Driver"
statement => "SELECT search_documents from views.constructed_documents"
jdbc_fetch_size => 10000
}
}
filter {
json {
source => "[search_documents][value]"
}
}
output {
stdout {
codec => rubydebug
}
}