How can i convert text column in sql to array type field in elasticsearch using Logstash?


(Adinarayana Murthy) #1

Hi

I want to convert the SQL column that contains text data to array of strings before storing into the elastics server.
eg:

Data in SQL with column name as "tags"

tags : "Monday Today lastday"

i want to store this as array of strings in elastic server as same field name "tag" or new name

"tags" : ["Monday", "Today","lastday"]

Could some suggest the config i need to give in logstash-jdbc.conf to convert input text sentence to array of strings that need to be stored as new field in elastic server using logstash ?


(Magnus Bäck) #2

Look into the mutate filter's split option.


(Adinarayana Murthy) #3

Perfect !! it is very easy :slight_smile: Thanks a lot Magnus Bäck


(system) #4

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