Hi,
I am trying below sample logstash config, Output also pasted below. data related to table C not coming inside B, Can you suggest if anything wrong with config ?
CONFIG:
`input {
jdbc {
.......
statement => "SELECT a.A_ID as A_ID,A.A_COLUMN1 FROM a;"
}
}
filter{
jdbc_streaming {
.....
statement => "SELECT B.B_ID as B_ID,B.B_COLUMN1 FROM B WHERE B.A_ID=1;"
......
target => "B"
}
jdbc_streaming {
......
statement => "SELECT c.C_ID as C_ID,c.C_COLUMN1 FROM C WHERE c.B_ID=11;"
.........
target => "[B][C]"
}
}
output {
# Output to the console
stdout {
codec => "rubydebug"
}
# Output to elastic search
elasticsearch {
document_id => "%{A_ID}"
index => "abc"
codec => "json"
hosts => ["localhost:9200"]
}
}
`
OUTPUT:
{
"@version" => "1",
"a_id" => 1,
"a_column1" => "A_DATA",
"@timestamp" => 2021-01-05T02:21:16.704Z,
"B" => [
[0] {
"b_column1" => "B_DATA1",
"b_id" => 11
}
]
}