Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> problem while loading data in Hive


Copy link to this message
-
Re: problem while loading data in Hive
2014/1/6 Archana Verma <[EMAIL PROTECTED]>

> ê
Hi Archana

I read the code and found that there are limits

hive/TableDefWriter.java

 /**

   * Return a string identifying the character to use as a delimiter

   * in Hive, in octal representation.

   * Hive can specify delimiter characters in the form '\ooo' where

   * ooo is a three-digit octal number between 000 and 177. Values

   * may not be truncated ('\12' is wrong; '\012' is ok) nor may they

   * be zero-prefixed (e.g., '\0177' is wrong).

   *

   * @param charNum the character to use as a delimiter

   * @return a string of the form "\ooo" where ooo is an octal number

   * in [000, 177].

   * @throws IllegalArgumentException if charNum > 0177.

   */

  public static String getHiveOctalCharCode(int charNum) {

    if (charNum > 0177) {

      throw new IllegalArgumentException(

          "Character " + charNum + " is an out-of-range delimiter");

    }
    return String.format("\\%03o", charNum);

  }
--
[EMAIL PROTECTED]|Hu