Logstash 6.2.1 Oracle JDBC plugin invalid character in query

I'm trying to fetch data from an Oracle database using this query but I'm constantly getting an Java::JavaSql::SQLSyntaxErrorException: ORA-00911: invalid character error:

statement => "select * from SYS.AUD$_ARCH where to_date('01-01-18', 'dd-MM-yy') > ntimestamp#;"

I tried escaping the table name but I still get the error (also the # in the column name and the >):

statement => "select * from SYS.AUD\$_ARCH where to_date('01-01-18', 'dd-MM-yy') > ntimestamp#;"

Using statement_filepath also raises the same error.

This is my locale output locale

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Thanks.

Solved it by using a lowercase table name sys.aud$_arch.

statement => "select * from sys.aud$_arch where to_date('01-01-18', 'dd-MM-yy') > ntimestamp#"

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