You can try to create a view and use json_tuple to parse the column after removing new line.
On Fri, Jul 3, 2015 at 5:28 PM, Edward Capriolo <[email protected]> wrote: > You probably need to make your own serde/input format that trims the line. > > On Fri, Jul 3, 2015 at 8:15 AM, ram kumar <[email protected]> wrote: > >> when i map the hive table to locate the s3 path, >> it throws exception for the* new line at the beginning of line*. >> Is there a solution to trim the new line at the beginning in hive? >> Or any alternatives? >> >> >> CREATE EXTERNAL TABLE work ( >> time BIGINT, >> uid STRING, >> type STRING >> ) >> ROW FORMAT SERDE 'com.proofpoint.hive.serde.JsonSerde' >> LOCATION 's3n://work/'; >> >> >> >> *hive > select * from work;Failed with exception java.io >> <http://java.io>.IOException:org.apache.hadoop.hive.serde2.SerDeException: >> error parsing JSON* >> >> >> >> Thanks >> > > -- This e-mail, as well as any attached document, may contain material which is confidential and privileged and may include trademark, copyright and other intellectual property rights that are proprietary to Kenshoo Ltd, its subsidiaries or affiliates ("Kenshoo"). This e-mail and its attachments may be read, copied and used only by the addressee for the purpose(s) for which it was disclosed herein. If you have received it in error, please destroy the message and any attachment, and contact us immediately. If you are not the intended recipient, be aware that any review, reliance, disclosure, copying, distribution or use of the contents of this message without Kenshoo's express permission is strictly prohibited.
