Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> how to store EOL characters in String field?


+
Wojciech Langiewicz 2011-09-07, 11:30
Copy link to this message
-
RE: how to store EOL characters in String field?
RE: line breaks

Don't use \n to terminate lines if your fields contain them. Use something else like \002 or \001

ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\002';

...or something like that.

Travis Powell / [EMAIL PROTECTED]
Tealeaf Technology / http://www.tealeaf.com
-----Original Message-----
From: Wojciech Langiewicz [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 07, 2011 4:31 AM
To: [EMAIL PROTECTED]
Subject: how to store EOL characters in String field?

Hello,
How can I store EOL characters in Hive in String field?
I'm using Hive 0.7 and I couldn't find anything about escaping or
enclosing field values.
I want to use <TAB> as field delimiter and lines are terminated by '\n'.
That causes issues, because part of text after '\n' is loaded as next
line, which is unreadable (all NULLs)

Thanks for help
--
Wojciech Langiewicz
+
Wojciech Langiewicz 2011-09-07, 18:00
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB