LogStash :: ConfigurationError“,:message =>”在第9行第27行(字节308)之后的#,{,}中预期的一个

时间:2018-06-14 12:15:55

标签: java elasticsearch logstash kibana elastic-stack

在logstash配置文件下执行以将oracle表转换为elasticsearch,请使用JDBC输入插件找到我的下面的logstash配置文件。

input {
  jdbc {
    jdbc_driver_library => "D:\1SearchEngine\data\ojdbc8.jar"
    jdbc_driver_class => "Java::oracle.jdbc.OracleDriver"
    jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521:XE"
    jdbc_user => "demo"
    jdbc_password => "1234567"
    statement => 'select vp.id, 
     LISTAGG(vp.code,',')within GROUP (order by vp.code) "CODE", 
     LISTAGG(vbl.product_id,',')within GROUP (order by vbl.product_id) "PRODUCT_ID",
     LISTAGG(vbl.type,',')within GROUP (order by vbl.type) "TYPE" 
     from product vp,PRODUCT_LINK vbl 
     where vp.id = vbl.product_id 
     group by id,vbl.product_id,vbl.type'
 }
}

output {
  elasticsearch {
    hosts => ["localhost:9200"]
    index => "replacement"
  }
}

执行配置文件时遇到以下错误

 Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of #, {, } at line 9, column 27 (byte 308) after \tinput {\n\t  jdbc 

使用logstash 6.2.4版本

在第一个单引号select vp.id,LISTAGG(vp.code,',')

中抛出错误

0 个答案:

没有答案