# Aggregate Filter exception for Oracle Query

**URL:** <https://discuss.elastic.co/t/aggregate-filter-exception-for-oracle-query/123261>\
**Category:** Logstash\
**Created:** [March 9, 2018, 12:51pm UTC](https://discuss.elastic.co/t/aggregate-filter-exception-for-oracle-query/123261 "2018-03-09T12:51:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vigneshaj](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@vigneshaj](https://discuss.elastic.co/u/vigneshaj)\
**Post date:** [March 9, 2018, 12:51pm UTC](https://discuss.elastic.co/t/aggregate-filter-exception-for-oracle-query/123261/1 "2018-03-09T12:51:38Z")

</div>

Hi Team

I am applying an aggreagate filter to the simple oracle query and getting below error.  
We have multiple names for a single ID and I am trying to create something like below.

Kindly find error got and yml used for the operation.  
`
{ "country_name": "France", "towns": [{"town_name": "Paris"}, {"town_name": "Marseille"}] }
{ "country_name": "USA", "towns": [{"town_name": "New-York"}] }
`  
Error:

[ERROR][logstash.filters.aggregate] Aggregate exception occurred {:error=\>#\<NoMethodError: undefined method `\<\<' for nil:NilClass\>, :code=\>"\n\t map['id'] \<\< { 'id' =\> event.get('id') }\n\t map['synonyms'] ||= []\n map['synonym'] \<\< {'name' =\> event.get('name')}\n\t event.cancel() ", :map=\>{}, :event\_data=\>{"@timestamp"=\>2018-03-09T17:46:24.959Z, "ccid"=\>#BigDecimal:67f5406,'0.2E9',1(12), "@version"=\>"1", "name"=\>"sample"}}

LogStash.yml :  
`
input {
jdbc {
jdbc_validate_connection => true
jdbc_connection_string => ""
jdbc_user => ""
jdbc_password => ""
jdbc_driver_library => "/home/cloud-user/ojdbc6.jar"
jdbc_driver_class => "Java::oracle.jdbc.driver.OracleDriver"
statement => "select all_table .ID id, all_table2 .NAME name
from all_table
inner join all_table2 on all_table .id = all_table2 .id
where rownum < 10000"
}
}
filter {
aggregate {
task_id => "%{id}"	
code => "
map['id'] << { 'id' => event.get('id') }
map['synonyms'] ||= []
map['synonym'] << {'name' => event.get('name')}
event.cancel() "
push_previous_map_as_event => true
timeout => 5
}
}
output {
elasticsearch
{
hosts => ["https://XXXX.xx..xxx:9200"]
index => "cconect"
user => ****
password => *********
ssl_certificate_verification => false
}
}
`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 6, 2018, 12:51pm UTC](https://discuss.elastic.co/t/aggregate-filter-exception-for-oracle-query/123261/2 "2018-04-06T12:51:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
