2016-05-14 81 views
0

嗨,我是新來的ES和IM試圖從「MYSQL」到「Elasticsearch」負載陣列數據MySQL來ElasticSearch使用logstash JDBC

我收到以下錯誤試圖陣列格式loadata時,任何負載數據幫助

這是MySQL的數據,需要新的&十六進制值列

cid color  new  hex  create   modified 
1 100 euro abcd #86c67c 5/5/2016 15:48 5/13/2016 14:15 
1 100 euro 1234 #fdf8ff 5/5/2016 15:48 5/13/2016 14:15 

這裏我們logstash配置

陣列數據

極品cvalue(新,六)陣列數據,如

{ 
    "_index": "colors_hexa", 
    "_type": "colors", 
    "_id": "1", 
    "_version": 218, 
    "found": true, 
    "_source": { 
    "cid": 1, 
    "color": "100 euro", 
    "cvalue" : { 
      "new": "1234", 
      "hexa_value": "#fdf8ff", 
     } 
    "created": "2016-05-05T10:18:51.000Z", 
    "modified": "2016-05-13T08:45:30.000Z", 
    "@version": "1", 
    "@timestamp": "2016-05-14T01:30:00.059Z" 
    } 
} 

這是I M在運行logstash

"status"=>400, "error"=>{"type"=>"mapper_parsing_exception", 
"reason"=>"Field name [cvalue.hexa] cannot contain '.'"}}}, :level=>:warn} 
+0

是 in mysql?或者數據被封裝在輸出中 – Satya

+0

沒有得到你的問題,對不起 – Manoj

回答

0

你不能給一個字段名稱與.得到錯誤。但您可以嘗試添加:

filter { 
    mutate { 
    rename => { "new" => "[cvalue][new]" } 
    rename => { "hexa" => "[cvalue][hexa]" } 
    } 
}