# Jdbc-streaming filter plugin seems not working properly

**URL:** <https://discuss.elastic.co/t/jdbc-streaming-filter-plugin-seems-not-working-properly/93022>\
**Category:** Logstash\
**Created:** [July 13, 2017, 1:56pm UTC](https://discuss.elastic.co/t/jdbc-streaming-filter-plugin-seems-not-working-properly/93022 "2017-07-13T13:56:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blue\_Moon](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Blue\_Moon](https://discuss.elastic.co/u/Blue_Moon)\
**Post date:** [July 13, 2017, 1:56pm UTC](https://discuss.elastic.co/t/jdbc-streaming-filter-plugin-seems-not-working-properly/93022/1 "2017-07-13T13:56:30Z")

</div>

I want to fetch data from sqldb and want to prapared a nested json array structure  
input{  
jdbc {  
jdbc\_connection\_string =\> "jdbc:sqlserver://testserver;databaseName=TEST\_DEV;user=me;password=secret;"  
jdbc\_user =\> "me"  
jdbc\_password =\> "secret"  
jdbc\_driver\_library =\> "../jre8/sqljdbc42.jar"  
jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
# Shedule is once per hour or customise in cron type syntax  
schedule =\> "\* \* \* \* \*"  
statement =\> "SELECT \* from PROPERTY\_MASTER\_ORS.C\_B\_LEASE\_COMPARABLES"  
# Uncomment and experiement for large tables  
#jdbc\_paging\_enabled =\> true  
#jdbc\_page\_size =\> 15000  
#jdbc\_fetch\_size =\> 10000  
}  
}  
filter {  
jdbc\_streaming {  
jdbc\_driver\_library =\> "../jre8/sqljdbc42.jar"  
jdbc\_driver\_class =\> "com.microsoft.sqlserver.jdbc.SQLServerDriver"  
jdbc\_connection\_string =\> "jdbc:sqlserver://testserver;databaseName=TEST\_DEV;user=me;password=secret;"  
jdbc\_user =\> "me"  
jdbc\_password =\> "secret"  
statement =\> "SELECT \* from PROPERTY\_MASTER\_ORS.C\_B\_LEASE\_COMP\_FLR where lease\_comaparable\_id = :id"  
parameters =\> { "id" =\>"rowid\_object"}  
target =\> "lease\_comp\_floor"  
}  
}

output {  
elasticsearch {  
hosts =\> "[http://estestcloud.cloudapp.net:9200](http://estestcloud.cloudapp.net:9200)"  
index =\> "rpdi-es-1.0"  
document\_type =\> "lease-comp"  
document\_id =\> "%{rowid\_object}"  
}  
stdout {  
codec =\> rubydebug  
}  
}  
So it is fetching few records. After that i am getting the below error.

[2017-07-13T18:33:47,081][INFO][logstash.inputs.jdbc] (0.110000s) SELECT \* from PROPERTY\_MASTER\_ORS.C\_B\_LEASE\_COMPARABLES  
[2017-07-13T18:33:47,867][ERROR][logstash.pipeline] t.ruby\_set\_field(JrubyEventExtLibrary.java:128)", "org.logstash.ext.JrubyEventExtLibrary$RubyEvent$INVOKER$i$2$0$ruby\_set\_field.call(JrubyEventExtLibrary$RubyEvent$INVOKER$i$2$0$ruby\_set\_field.gen)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)", "org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)", "org.jruby.evaluator.ASTInterpreter.INTERPRET\_METHOD(ASTInterpreter.java:74)", "org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:225)", "org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:219)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:202)", "org.jruby.ast.FCallTwoArgNode.interpret(FCallTwoArgNode.java:38)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.IfNode.interpret(IfNode.java:118)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)", "org.jruby.evaluator.ASTInterpreter.INTERPRET\_METHOD(ASTInterpreter.java:74)", "org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:204)", "org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:211)", "org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:177)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:183)", "org.jruby.ast.FCallOneArgBlockPassNode.interpret(FCallOneArgBlockPassNode.java:32)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)", "org.jruby.evaluator.ASTInterpreter.INTERPRET\_METHOD(ASTInterpreter.java:74)", "org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:204)", "org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:211)", "org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:177)", "org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:188)", "org.jruby.ast.FCallOneArgBlockNode.interpret(FCallOneArgBlockNode.java:34)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)", "org.jruby.ast.IfNode.interpret(IfNode.java:118)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.evaluator.ASTInterpreter.INTERPRET\_BLOCK(ASTInterpreter.java:112)", "org.jruby.runtime.Interpreted19Block.evalBlockBody(Interpreted19Block.java:206)", "org.jruby.runtime.Interpreted19Block.yield(Interpreted19Block.java:157)", "org.jruby.runtime.Block.yield(Block.java:142)", "org.jruby.RubyArray.eachCommon(RubyArray.java:1606)", "org.jruby.RubyArray.each(RubyArray.java:1613)", "org.jruby.RubyArray$INVOKER$i$0$0$each.call(RubyArray$INVOKER$i$0$0$each.gen)", "org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:143)", "org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:154)", "org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)", "org.jruby.evaluator.ASTInterpreter.INTERPRET\_METHOD(ASTInterpreter.java:74)", "org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)", "org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:203)", "org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)", "org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)", "org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)", "org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)", "org.jruby.ast.BlockNode.interpret(BlockNode.java:71)"}]

Any suggestion please.

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [July 21, 2017, 8:38am UTC](https://discuss.elastic.co/t/jdbc-streaming-filter-plugin-seems-not-working-properly/93022/2 "2017-07-21T08:38:12Z")

</div>

What does one event look in STDOUT when you comment out the jdbc-streaming filter?

What is the schema of the table called `PROPERTY_MASTER_ORS.C_B_LEASE_COMP_FLR`?

---

<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:** [August 18, 2017, 8:38am UTC](https://discuss.elastic.co/t/jdbc-streaming-filter-plugin-seems-not-working-properly/93022/3 "2017-08-18T08:38:23Z")

</div>

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