Question: could Logstash JDBC + Sequel be choking on column names that contain square brackets?
And if so, is there something that could be done to get them to play nicely?
I'm using Logstash 7.3.0 and its bundled Sequel in a JDBC input plugin to grab data from an Oracle view, with Oracle's ojdbc6.jar
as the driver.
The view has column names which contain square brackets, for example alternative[company_name]
.
Logstash crashes on ingest with the following exception:
[2019-08-07T11:13:37,899][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2019-08-07T11:47:30,325][INFO ][logstash.inputs.jdbc ] (....) select * from (
select "_id"
,"company_name"
,"address"
,"city"
,"zip"
,"state"
... and some similar columns ...
,"alternative[company_name]"
,"alternative[address]"
,"alternative[city]"
,"alternative[zip]"
,"alternative[state]"
,"alternative[is_main_sos]"
... then some other columns ...
from <my view>
order by "_id"
)
where ROWNUM < 100
[2019-08-07T11:47:30,417][WARN ][logstash.inputs.jdbc ] Exception when executing JDBC query {:exception=>#<Sequel::DatabaseError: Java::OrgLogstash::FieldReference::IllegalSyntaxException: Invalid FieldReference: `alternative[company_name]`>}
[2019-08-07T11:47:31,326][INFO ][logstash.runner ] Logstash shut down.
The same query works fine using JDBC via DBeaver, so I wonder if there's anything peculiar to Logstash and/or Sequel.
Help gratefully received.