How to import blob type from mysql to es using logstash

Hi all.

I am importing data from mysql to es using logstash. I have a blob type in a table in mysql. Because I used to convert the array of double to binary and save as blob. Now I want to import this type of data to es, but it is automatically converted into text type.

In short, I want to change the blob type into

[0.001, 0.002, ... ]

and save as Float in es.

Can anyone give some advice? Thanks in advance!

What does the field look like now? Use a stdout { codec => rubydebug } to dump the raw field contents.

Thanks for your response!

I get something as follow:

"feature" => #<Sequel::SQL::Blob:0x322dc bytes=512 start="\x92C\x1C\xBE\x80f\xFF<\x8C\xB5" end="2=\x84\xA5\xA5=\xE6g\xF1\xBC">

The "feature" is actually the type of blob.

1 Like

Logstash cannot decode that, you need something else to do that for you I think.

ok... It seems that I have to load data from mysql and do some processing and save it into es, right?

Thanks for your response!

You should be able to process and convert that object in a ruby filter.

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