Logstash configuration file

I wrote a logstash configuration file to sql server (a simple one, taking the table as is and index it), but i want to store each row (documents) from the table as an array in elastic. Do I need to write it at the filter section or at the output section or even at the sql statement?
Can someone show me an example how to do it?

I want the JSON will look like this:
“Values”: [ "field1value", "field2value", “field3value”....],

*each table on my db has 4 generic columns: X,Y,serialnumber and Shape
**the x,y are the center of the polygon(for kibana)
***the shape is a an array of coordinates.
****I only need to insert each table once (no new rows will be added)

Thanks ahead!

Looks like a job for: https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html#plugins-filters-mutate-merge

Well I finally solved it, most of the code written on the sql server side, but the mutate did help a little.
Thanks for the help :slight_smile:

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