Re: How can I know one table is a partitioned table in hive?

2014-07-31 Thread Krishnan Narayanan
>From shell You can do hive -e "use DB name; show partitions tablename" >> filename.txt On Thu, Jul 31, 2014 at 9:00 PM, Devopam Mittra wrote: > If you have mySQL as your metastore , you may use something similar to > below: > > SELECT tbl.TBL_NAME,COUNT(DISTINCT part.PART_NAME) AS partition_co

Hive XPATH query issue

2014-07-17 Thread Krishnan Narayanan
Hi All, I am trying to parse the below xml file but I am getting invalid expression error.Please help me with this. http://www.w3.org/2001/XMLSchema"; xmlns="http://services.intuit.com/accountant/v1"; targetNamespace="http://services.intuit.com/accountant/v1"; elementFormDefault="qualified" attr

Re: Reg: Merging Rows

2014-06-24 Thread Krishnan Narayanan
Try coalesce On Tue, Jun 24, 2014 at 2:49 PM, sumit ghosh wrote: > Did you try sum(col1), sum(col2) ... group by id > > > On Tuesday, 24 June 2014 1:23 PM, usha hive wrote: > > > Hi, > > I am trying to merge few rows in to 1 row. I am stuck. Please help me. > > Example > id col1 col2

Re: Need help in Date format

2014-06-12 Thread Krishnan Narayanan
Thank you very much it worked. On Thu, Jun 12, 2014 at 5:21 PM, Gabriel Eisbruch wrote: > Hey, > I think you can use from_unixtime(unix_timestamp(your_field, " > dd-MMM-"),"dd-MM-") > > Thanks, > Gabo. > > > 2014-06-12 21:01 GMT-03:00 K

Fwd: Need help in Date format

2014-06-12 Thread Krishnan Narayanan
Hi All, I have my date format as 08-Mar-2014 how to I change it to 08-03-2014? Can I use regexp_replace. I tried below but not getting the desired output. regexp_replace(started_dt,"\Jan|\Feb|\Mar|\Apr|\May|\Jun|\Jul|\Aug|\Sep|\Oct|\Nov|\Dec","\01|\02|\03|\04|\05|\06|\07|\08|\09|\10|\11|\12") O