Multiline SQL syntax with feeder and batch file?

I am successfully customizing your advice. With a simple sql string, it starts up.

But with multi-line SQL, it won't run.

What is sql multiline syntax?

"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"
      }

      

And the error:

{    "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...

      

Parsed on line break.

+3


source to share


1 answer


It works. In fact, I put everything on one line. It doesn't like indentation.



Thank!

0


source







All Articles