hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sangeetha k <get2sa...@yahoo.com>
Subject Re: log4j format logs in Hive table
Date Tue, 06 Dec 2011 09:26:03 GMT
Hi,
 
Thanks for the response.
Yes, You got my question.
 
An example of my log message line will be as below:
 
[2011-10-17 16:30:57,281] [ INFO] [33157362@qtp-28456974-0] [net.hp.tr.webservice.referenceimplcustomer.resource.CustomersResource]
[Organization: Travelocity] [Client: AA] [Location of device: DFW] [User: 550393] [user_role:
] [CorelationId: 248] [Component: Crossplane] [Server: server01] [Request: seats=5] [Response:
yes] [Status: pass] - Entering Method = getKey() 
 
How to specify the delimiter, while describing the table?
 
Thanks,
Sangeetha


________________________________
From: alo alt <wget.null@googlemail.com>
To: user@hive.apache.org; sangeetha k <get2sangi@yahoo.com> 
Sent: Tuesday, December 6, 2011 2:01 PM
Subject: Re: log4j format logs in Hive table


Hi, 

I hope I understood your question correct - did you describe your table? Like "create TABLE
YOURTABLE (row1 STRING, row2 STRING, row3 STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY
'YOUR TERMINATOR' STORED AS TEXTFILE;" 

row* = a name of your descision, Datatype look @documentation.

After import via "insert (overwrite) table YOURTABLE"

- alex




On Tue, Dec 6, 2011 at 8:56 AM, sangeetha k <get2sangi@yahoo.com> wrote:

Hi,
>
>I am new to Hive.
>
>I am using Flume agent to collect log4j logs and sending to HDFS.
>Now i wanted to load the log4j format logs from HDFS to Hive tables.
>Each of the attributes in log statements like timestamp, level, classname etc... should
be loaded in seperate columns in the Hive tables.
>
>I tried creating table in Hive and loaded the entire log in one column, but dont know
how to load the above mentioned data in seperate columns.
>
>Please send me your suggestions, any links, tutorials on this.
>
>Thanks,
>Sangeetha


-- 

Alexander Lorenz
http://mapredit.blogspot.com

P Think of the environment: please don't print this email unless you really need to.
Mime
View raw message