Logstash + Elasticsearch Boolean data 질문입니다

Logstash로 csv 데이터를 입력하는 과정에서, 1,0 으로 들어오는 데이터를 boolean으로 Convert하여 입력할 때 에러가 발생합니다. Failed to convert [Field name] into boolean
해당 에러가 왜 발생하는지 알 수 있을까요?

The csv code only supports conversion of the strings "true" and "false". Use mutate+convert.

The same error occurs when converting the strings "true" and "false".

Not for me.

input { generator { count => 1 lines => [ 'foo,true,false' ] } }
filter { csv { convert => { "column2" => "boolean" "column3" => "boolean" } } }
output { stdout { codec => rubydebug { metadata => false } } }

produces booleans in the output.

I added filter {csv {convert => {"column1" => "boolean"}} to the Logstash config file.
However, the Warnning message still appears in the Logstash log.

[2019-06-26T09:38:31,852][WARN ][logstash.filters.mutate ] Failed to convert column1 into boolean.

If you are referring to my example, "foo" is not a valid boolean. If you are not, please post a simple reproducible example of the problem.

1 Like

Thank you for your help. It was an error caused by reading the header of the csv file. Therefore, we solved it by using skip_header option. Thank you for your consideration.

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