>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 <[email protected]> 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_count > FROM metastore_db.TBLS tbl, metastore_db.PARTITIONS part > WHERE tbl.TBL_ID = part.TBL_ID > AND tbl.TBL_TYPE = 'MANAGED_TABLE' > GROUP BY tbl.TBL_NAME; > > Do remember to change the db name to yours before testing it out :) > regards > Dev > > > > On Thu, Jul 31, 2014 at 6:34 PM, Dan Fan <[email protected]> wrote: > >> The easiest way is to go to hive, >> Show create table table_name. >> Then you can know when the table, if the it is partitioned >> >> From: Nitin Pawar <[email protected]> >> Reply-To: "[email protected]" <[email protected]> >> Date: Thursday, July 31, 2014 at 3:50 AM >> To: "[email protected]" <[email protected]> >> Subject: Re: How can I know one table is a partitioned table in hive? >> >> what are the options you have? >> can you write a java code which can interact with hcatalog ? >> or you can do a describle table and check for partion column details in >> there >> >> >> On Thu, Jul 31, 2014 at 1:11 PM, 张甲超 <[email protected]> wrote: >> >>> dear all, >>> I want know that one table is a partitioned table in hive, and >>> return the result to shell. >>> How can I do? >>> >> >> >> >> -- >> Nitin Pawar >> > > > > -- > Devopam Mittra > Life and Relations are not binary >
