Re: Extracting data from ELB log date format

2016-09-22 Thread Manish Rangari
:45:22.943762Z',"-MM-dd'T'HH:mm:ss")) > as ts) as t; > > OK > > 2016-09-15 2016 9 15 23 45 22 > > > > Dudu > > > > *From:* Manish Rangari [mailto:linuxtricksfordev...@gmail.com] > *Sent:* Wednesday, September 21, 2016 4:

Extracting data from ELB log date format

2016-09-21 Thread Manish Rangari
Guys, I am trying to extract date, time, month, minute etc from below timestamp format but did not find any function for this. Can anyone help me to extract the details? 2016-09-15T23:45:22.943762Z 2016-09-15T23:45:22.948829Z --Manish

Re: ELB Log processing

2016-09-20 Thread Manish Rangari
backendport, requestprocessingtime, backendprocessingtime, > clientresponsetime, elbresponsecode, backendresponsecode, receivedbytes, > sentbytes, requestverb, url, u.aid, u.tid, u.eid,u.did, protocol, > useragent, ssl_cipher, ssl_protocol > > from elblog > > LATERAL VIEW > p

Re: ELB Log processing

2016-09-20 Thread Manish Rangari
, parse_url_tuple(url, 'QUERY:did') as did, protocol, useragent, ssl_cipher, ssl_protocol from elblogz; *FAILED: SemanticException [Error 10081]: UDTF's are not supported outside the SELECT clause, nor nested in expressions* On Tue, Sep 20, 2016 at 3:56 PM, Manish Rangari < linuxt

Re: ELB Log processing

2016-09-20 Thread Manish Rangari
Yes views looks like a way to go On Tue, Sep 20, 2016 at 3:49 PM, Damien Carol wrote: > The royal way to do that is a view IMHO. > > 2016-09-20 12:14 GMT+02:00 Manish Rangari > : > >> Thanks for the reply Damien. The suggestion you gave is really useful. >> Currentl

Re: ELB Log processing

2016-09-20 Thread Manish Rangari
rotocol from elblog; On Tue, Sep 20, 2016 at 3:12 PM, Damien Carol wrote: > see the udf > *parse_url_tuple* > SELECT b.* > FROM src LATERAL VIEW parse_url_tuple(fullurl, 'HOST', 'PATH', 'QUERY', > 'QUERY:id') b as host, path, query, query_id LIMIT 1; >

ELB Log processing

2016-09-20 Thread Manish Rangari
Guys, I want to get the field of elb logs. A sample elb log is given below and I am using below create table definition. It is working fine. I am getting what I wanted but now I want the bold part as well. For example eid, tid, aid. Can anyone help me how can I match them as well. NOTE: The posit