I'm trying to use the jdbc_static plugin to join two tables from MySql and index it but I'm receiving this error (warning: already initialized constant Manticore::Client::ByteArrayEntity)
This is my pipeline:
input {
jdbc_driver_library => "C://elastic-stack//JDBC//lib//mysql-connector-j-8.3.0.jar"
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/classicmodels"
jdbc_user => "root"
jdbc_password => "root123"
schedule => "* * * * *"
statement => "SELECT * from customers"
use_column_value => true
tracking_column => "customernumber"
lowercase_column_names => true
}
filter {
jdbc_static {
loaders => [
{
id => "order_loader"
query => "SELECT customerNumber, contactLastName, contactFirstName from customers c INNER JOIN orders o ON c.customerNumber = o.customerNumber"
local_table => "orders"
}
]
local_db_objects => [
{
name => "orders"
index_columns => ["customerNumber"]
columns => [
["customerNumber", "INTEGER"],
["contactLastName", "VARCHAR(255)"],
["contactFirstName", "VARCHAR(255)"],
]
}
]
jdbc_driver_library => "C://elastic-stack//JDBC//lib//mysql-connector-j-8.3.0.jar"
jdbc_driver_class => "com.mysql.cj.jdbc.Driver"
jdbc_connection_string => "jdbc:mysql://localhost:3306/classicmodels"
jdbc_user => "root"
jdbc_password => ""
loader_schedule => "* * * * *"
}
if [customerNumber] {
jdbc_static {
local_lookups => [
{
query => "SELECT customerNumber, contactLastName, contactFirstName from customers c INNER JOIN orders o ON c.customerNumber = o.customerNumber"
parameters => { "customerNumber" => "[customerNumber]" }
target => "customer_data"
}
]
add_field => { "customerNumber" => "%{[customer_data][0][customerNumber]}" }
add_field => { "customerLastName" => "%{[customer_data][0][customerLastName]}" }
add_field => { "customerFistName" => "%{[customer_data][0][customerFirstName]}" }
}
}
}
output {
elasticsearch {
hosts => ["http://192.168.100.28:9200"]
user => "elastic"
password => ""
index => "customers"
ssl => false
ssl_verification_mode => "none"
}
}