Hi,

I'm not the right person to give you an answer from the Drill perspective
but is it possible that your JSON serializer is not escaping characters
that should be escaped?

please see:

   -
   
http://stackoverflow.com/questions/4253367/how-to-escape-a-json-string-containing-newline-characters-using-javascript
   -
   
http://stackoverflow.com/questions/5506000/javascript-json-stringify-doesnt-escap

Regards,
 -Stefan



On Wed, Jan 6, 2016 at 4:10 AM, <[email protected]> wrote:

> Happy new year!
>   We, Japanese like new year's greeting ;-)
>
> There's two issues in this message.
>
> First, CSV file which has value includes new line.
> The other, JSON file which has value includes new line.
>
> 1) CSV
>   Doesn't drill recognize CSV which has some columns including new line?
>   For example, CSV file exported from MS-Excel.
>
>   I tried some patterns. Quoting column, escaping by \ (like \[LF]),
> replacing \r or \n...
>   But all of those are not good for me.
>
>   By the way, new lines are approved in CSV columns by RFC, you know.
>         * https://tools.ietf.org/html/rfc4180
>   Then I would like to parse such CSV though I know it is informational
> definition.
>
> 2) JSON
>   It can't query correctly to JSON with records include new line.
>
>   JSON:
>     { "key": "test record with \n newline" }
>
>   Query:
>     select * from dfs.`test.json` where key like 'test%'
>
>   Result:
>     No result found
>
>   It doesn't compare value correctly if it includes new line, I think.
>
> Do you know how to use new lines in values as expected?
>
> Thank you.
>
> --
> Miura, Masahide
>
>

Reply via email to