I am in process of attempting to migrate from using the old jdbc river plugin to using logstash 1.5 / logstash jdbc plugin
I am however running into some difficulty, if i previously had 50 rows with 20 having unique id's,
like 20 customers, but several customers have more than one mailing address
the results would fold the sql into nested fields for my document during bulk insertion
{
"_index": "matchstick",
"_id": "0000117947",
"_score": 1,
"_source": {
"id_number": "0000117947",
"pref_mail_name": "Joanne Reaume",
"street1": [
"364 Lexington Cir",
"1751 Hawthorne Rd"
],
"street2": " ",
"street3": " ",
"city": [
"Romeo",
"Grosse Pointe Woods"
],
"state_code": "MI",
"zipcode": [
"48065-3006",
"48236-1447"
],
}
},
when i run the logstash-jdbc-plugin, it seems to just replace the document each time a row is encountered , creating a new version, not creating any nested fields
{
"_index": "matchstick",
"_type": "logs",
"_id": "0000117947",
"_version": 2,
"found": true,
"_source": {
"id_number": "0000117947",
"pref_mail_name": "Joanne Reaume",
"street1": "1751 Hawthorne Rd",
"street2": " ",
"street3": " ",
"city": "Grosse Pointe Woods",
"state_code": "MI",
"zipcode": "48236-1447",
"first_name": "Joanne",
"middle_name": " ",
"last_name": "Reaume",
"email_address": null,
"@version": "1",
"@timestamp": "2015-11-05T18:13:56.780Z"
}
}
is there any way to fold query results to nested fields?