Why the mysql fields convert to lowercase


#1

I tried to use logstash to deliver the data from mysql to elasticsearch. but when i run the jdbc.conf, i found that all the fields in mysql were converted to lowsecase which exactly was not my hope. Can someone help me to fix it? below is part of the file:

jdbc_driver_library => "E:/ELK/sqltoes/mysql-connector-java-5.1.42.jar"

the name of the driver class for mysql

jdbc_driver_class => "com.mysql.jdbc.Driver"
#jdbc_paging_enabled => "true"
#jdbc_page_size => "50000"
#以下对应着要执行的sql的绝对路径。

statement_filepath => "/usr/local/logstash-5.6.3/test_mysql/jdbc.sql"

statement => "SELECT * from test_collection "
#定时字段 各字段含义(由左至右)分、时、天、月、年,全部为*默认含义为每分钟都更新

schedule => "* * * * *"

connection_retry_attempts => 3
connection_retry_attempts_wait_time => 1


#2

This should help, I guess: lowercase_column_names => false


#3

check this input code,

input {

jdbc {
jdbc_driver_library => "C:/Users/xxxx/Downloads/mysql-connector-java-5.1.42.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/test"
jdbc_user => "root"
jdbc_password => "root"
statement => "SELECT * FROM SAMPLE"
jdbc_paging_enabled => "true"
jdbc_page_size => "50000"
}

}


(system) #4

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