I am using Logstash 7.1.1 with Elasticsearch 7.1.1
I have been able to query an external MSSQL DB and populate the internal Derby database just fine.
I'm populating the fields with the proper names, but the resultant values are not appearing as I expected.
(trying to get the markup right but apologies if I did not)
Here is a sanitized example of the original document:
{
"fields": {
"sSID": "987656451",
"rSID": "369829"
},
"@timestamp": "2019-12-10T21:57:57.182Z"
}
Here is the local_lookups section:
local_lookups => [
{
id => "local-rs"
query => "select RSName from rs WHERE RSI = :rsid"
parameters => {rsid => "[fields][rSID]"}
target => "[fields][rSName]"
},
{
id => "local-ss"
query => "select SSName from ss WHERE SSI = :ssid"
parameters => {ssid => "[fields][sSID]"}
target => "[fields][sSName]"
}
]
Here is an example document that shows up in Elasticsearch:
{
"fields": {
"sSName": [
{
"ssname": "NAME-Customer"
}
],
"sSID": "987656451",
"rSID": "369829",
"rSName": [
{
"rsname": "NAME"
}
]
},
"@timestamp": "2019-12-10T21:57:57.182Z"
}
Here is what I would like to see in Elasticsearch:
{
"fields": {
"sSName": "NAME-Customer",
"sSID": "987656451",
"rSID": "369829",
"rSName": "NAME"
},
"@timestamp": "2019-12-10T21:57:57.182Z"
}