You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Toby Allsopp <to...@wherescape.com> on 2015/12/18 01:28:43 UTC

Is there any documentation of how the field delimiter is specified?

What we want to do is to generate the CREATE TABLE statement for a
delimited file where the delimiter has been specified by the user.

That is, given a character with ASCII code C, how should we generate the
FIELDS TERMINATED BY '?' clause?

Is it correct to convert to octal and say '\ooo'?

We're confused because specifying '1', '\1', and '\001' all result in the
default delimiter of ASCII char 1, but '\01' does not (or at least it
doesn't function correctly).

Also, specifying '\u0009' specifies TAB - is this something that we can
expect to work or is this an accident?

The documentation says "Hive uses C-style escaping within the strings" when
describing the string type, but that doesn't appear to be entirely true. Is
there any documentation of exactly which escapes are supported and what
they mean?

Thanks,
Toby.