Not able to pull arabic data by using JDBC input

I have stored arabic language in my my sql DB.

I am using JDBC input and elasticsearch out put in logstash.
But my jdbc input not bringing arabic language, Insted its pulling ????????(question Marks).

Please help me how can i pull arabic language using jdbc input.

Below is my config file.

input {
jdbc {
jdbc_driver_library => "logstashhome\mysql-connector-java-5.1.35-bin.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:9191/dbname"
jdbc_user => "test"
jdbc_password => "test"
statement => "select language from testtable"
schedule => "* * * * * "
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"
}
}

output {
stdout { codec => rubydebug }
elasticsearch {
action => "index"
hosts => "127.0.0.1:9200"
index => "testindex"
workers => 1

}

}

Thanks in Advance........

Hello Dan,

Do you know what charset your MySQL columns are using? By default, the JDBC input will assume it's utf-8. If I remember correctly, you can use SHOW FULL COLUMNS FROM mytable to get that information.

With that information you can configure the input with charset or columns charset, there is more details at https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html#plugins-inputs-jdbc-charset

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