How to put multiple lines in Kibana SQL search?

hi
I'm trying to put multiline sql search (as our source-code are long and in multile lines), but even if I put escape characters, error happens. Please find screenshot

   "type" : "json_parse_exception",
      "reason" : "Illegal unquoted character ((CTRL-CHAR, code 10)): has to be escaped using backslash to be included in string value\n at [Source: (org.elasticsearch.transport.netty4.ByteBufStreamInput); line: 2, column: 64]"

I tried putting

  • \n
  • \
  • \
    none of these worked.

The original SQL from code is in format of

SELECT OriginCityName, DestCityName FROM flights 
  WHERE FlightTimeHour > 5 
        AND OriginCountry='US' 
  ORDER BY FlightTimeHour DESC
  LIMIT 10

which I don't want to manipulate to single line.

@kelk You'll need to wrap your multi-line SQL in tripple quotes ("""SQL_query_goes_here""").
There's a handy hint given in the documentation :slight_smile:

@cheiligers. lol, how come I missed that. thanks mate.

Hope they made the documentation as a section itself :slightly_smiling_face:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.