Error while executing query for loading lookup data in jdbc static plug-in

I installed jdbc static plug-in but getting following error:

Java::JavaSql::SQLException: Incorrect syntax near 'LIMIT' but my query does not contain LIMIT word. Mine is a simple query like this:

SELECT col1,col2,col3 FROM table where col1 IS NOT NULL and col2 IS NOT NULL and col3='somevalue'

I am trying to get this data from sybase database. I am able execute same query from logstash jdbc input plug-in but not from this one.

here is my configuration:
jdbc_static {
loaders => [
{
id => "remote"
query => "SELECT col1,col2,col3 FROM table where col1 IS NOT NULL and col2 IS NOT NULL and col3='somevalue'"
local_table => "abc"
}
]
local_db_objects => [
{
name => "smd"
index_columns => ["ticker_code"]
columns => [
["col1", "varchar(255)"],
["col2", "varchar(255)"],
["col3", "varchar(255)"]
]
}
]
local_lookups => [
{
id => "local"
query => "select col1 from smd where col2 = :col2"
parameters => {id => "[id1]"}
target => "isin"
}
]
staging_directory => "c:/temp/logstash/import_data"
loader_schedule => "* */2 * * *"
jdbc_driver_library => "\jconn4.jar"
jdbc_driver_class => "Java::com.sybase.jdbc4.jdbc.SybDataSource"
jdbc_connection_string => "jdbc:sybase:Tds:/"
jdbc_user => "user"
jdbc_password => "password"
}

What may be the issue?

Thanks in advance..

Hi, any inputs please? Thanks

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