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.