I am trying to load data from SQL Server to ES. I have stored in a column in SQL, data in the following format:
[{"addressid":1,"addressvalue":"123 abc st"},{"addressid":2,"addressvalue":"456 pqr st"}]
The name of the column in SQL is addresses.
When I try to load data to ES using logstash jdbc plugin, I get the following error:
"reason"=>"object mapping for [addresses] tried to parse field [addresses] as object, but found a concrete value"
My ES Index mapping is as follows:
{
"myindex": {
"mappings": {
"person": {
"_all": {
"enabled": false
},
"properties": {
"addresses": {
"type":"nested",
"properties": {
"addressid": {
"type": "long"
},
"addressvalue": {
"type": "keyword",
"store": true,
"ignore_above": 60
}
}
},
"state": {
"type": "keyword",
"store": true,
"ignore_above": 2
},
"uid": {
"type": "long"
}
}
}
}
}
}
Am I doing something wrong?
Thanks.