Open yinyu00 opened 9 years ago
This is an Oracle error. Please check syntax, single apostrophe may not work with Oracle.
@jprante Here is my sql Config: select 'myjdbc' as \"_index\", 'car_statinfo' as \"_type\", id as \"_id\" from mytable Log: select myjdbc as "_index", car_statinfo as "_type", id as "_id" from mytable
i think elasticsearch-jdbc trim the ['], then oracle throw an exception
Which log is this? You have to set up valid JSON and valid Oracle syntax in the JDBC definition. There is no trimming, SQL is passed as given to driver.
@jprante [17:10:39,216][DEBUG][importer.jdbc.source.standard][pool-2-thread-1] org.xbib.elasticsearch.jdbc.strategy.standard.StandardSource@46a1d8d executing SQL without params: statement=select myjdbc as "_index", car_statinfo as "_type", id as "_id", createtime from HALL_CAR_STATINFO parameter=[] write=false callable=false
this log is print by jdbc plugin , when debug is enabled
Then your command line/shell may drop single quotes.
@jprante
"sql" : [ { "statement" : "select & apos;myjdbc& apos; as \"_index\", & apos;car_statinfo& apos; as \"_type\", id as \"_id\", createtime from HALL_CAR_STATINFO" }, { "statement" : "select & apos;myjdbc& apos; as \"_index\", & apos;tfm_rules& apos; as \"_type\", id as \"_id\", code, type, name from tfm_rules" } ],
I changed the source code, and manually replace [& apos;] with ['], and it works , have you got any idea more convenient
What is the change of the source code?
@jprante manually replace [& apos;] with [']
Not sure I understand. So you used '
from HTML entities, which gives an error, and changed it to '
?
Caused by: java.sql.SQLException: ORA-00904: "car_statinfo": 标识符无效