我成功配置了你的建议。 使用简单的sql行,就可以运行了。
但是对于多行SQL,它不会运行。
多行的sql语法是什么?
"jdbc" : {
"url" : "url",
"user" : "user",
"password" : "password",
"sql" : "SELECT MBugs.id AS _id,
MProjects.name AS Projet,
MCategory.name AS Categorie,
MBugs.summary AS Resume,
CASE MBugs.status
WHEN 90 THEN 'Fermé'",
FROM mantis_bug_table MBugs
INNER JOIN mantis_project_table MProjects ON MBugs.project_id = MProjects.id
INNER JOIN mantis_user_table MUsers ON MBugs.reporter_id = MUsers.id
INNER JOIN mantis_category_table MCategory ON MBugs.category_id = MCategory.id
LEFT OUTER JOIN mantis_user_table MUsers2 ON MBugs.handler_id = MUsers2.id
WHERE
MBugs.project_id > 1100
ORDER BY MProjects.name, MBugs.severity, MBugs.priority DESC"
"treat_binary_as_string" : true,
"index" : "yrdy",
"type" : "feeder_test"
}
错误是:
{ "elasticsearch" : { "cluster" : "elasticsearch", "host" : "localhost", "port" : 9300, "type" : "jdbc", "schedule" : "0 0-59 0-23 ? * *" }, "jdbc" : { "url" : "jdbc:mysql://******************", "user" : "user", "password" : "user", "sql" : "SELECT MBugs.id AS _id,
'MProjects.name' is not recognized as an internal or external command,
operable program or batch file.
'MCategory.name' is not recognized as an internal or external command,
operable program or batch file.
'MBugs.summary' is not recognized as an internal or external command,
operable program or batch file.
'CASE' is not recognized as an internal or external command,
operable program or batch file.
'WHEN' is not recognized as an internal or external command,
etc...
在换行时解析。
答案 0 :(得分:0)
有效。 事实上,我把所有东西放在一条线上。 那不喜欢缩进。
谢谢!