Můžu dát doc s mulit hodnotu pole tagids
, jako je tento, ale jak naplnit pole s multi hodnoty s logstash vstup jdbc.
PUT /song/_doc/0
{
"artist_name":"test",
"artistid":0,
"categories":[4,5,6],
"created_at":"2021-12-13T00:00:00Z",
"name":"test",
"name_pinyin":"csgq",
"tagids":[1,2,3]
}
Pro teď jsem použít jdbc config, ale to si 1,2,3
jako jedno klíčové slovo. Jak se to pole?
input {
jdbc {
jdbc_driver_library => ""
jdbc_driver_class => "com.mysql.jdbc.Driver"
jdbc_connection_string => "jdbc:............."
jdbc_user => ""
jdbc_password => ""
schedule => "* * * * *"
statement => "SELECT songid,name,name_pinyin,artistid,artist_name,'1,2,3' as tagids, '4,5,6' as categories,create_at from song"
}
}