hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krishnan Narayanan <krishnan.sm...@gmail.com>
Subject Re: How can I know one table is a partitioned table in hive?
Date Fri, 01 Aug 2014 04:11:35 GMT
>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 <devopam@gmail.com> 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 <dfan@appnexus.com> 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 <nitinpawar432@gmail.com>
>> Reply-To: "user@hive.apache.org" <user@hive.apache.org>
>> Date: Thursday, July 31, 2014 at 3:50 AM
>> To: "user@hive.apache.org" <user@hive.apache.org>
>> 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, 张甲超 <rebeyond1218@gmail.com> 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
>

Mime
View raw message