Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A13A3DF09 for ; Thu, 21 Feb 2013 11:46:09 +0000 (UTC) Received: (qmail 57419 invoked by uid 500); 21 Feb 2013 11:46:08 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 57169 invoked by uid 500); 21 Feb 2013 11:46:05 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 57158 invoked by uid 99); 21 Feb 2013 11:46:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2013 11:46:05 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.83.54] (HELO mail-ee0-f54.google.com) (74.125.83.54) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Feb 2013 11:45:58 +0000 Received: by mail-ee0-f54.google.com with SMTP id c41so4474728eek.27 for ; Thu, 21 Feb 2013 03:45:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type:x-gm-message-state; bh=X1TI+8DeBm0mNsSlyQap/3GI2T2tN3SqWxovI+PRC1w=; b=oyvZOckY9F1kF/+aidd8FPKVoB8lwmTSfFJwPiB76Ybb3kQ1QMdFKEb/Eoq7+o+P3V UkKcNyvVSskFEggj4XXmIgcinpSvIV1LSAM/J+Qj8BPxeUs8SLbZB5VEZRHXfurp/+Wn Pgoa4NXjTm/2X8h7oZfLLxHKNa3MnZegJSJP2tCjDQQYLIjsRjw3WlH562WoJIhtIrZS TIAQWFNCrQOr1zLcuQSxogV3KW3aT2s1rL5EuRhMsHysRMhaVjHtBc4pLkYhXHK0nXv/ TlXTqJntNaTUryWMxbxkFn51XKFItxn1kdmcoBV4sLvB+NxsSbXQVbV3+/JRnMoLzXtE BvDA== MIME-Version: 1.0 X-Received: by 10.14.4.69 with SMTP id 45mr80647314eei.0.1361447137491; Thu, 21 Feb 2013 03:45:37 -0800 (PST) Received: by 10.223.62.83 with HTTP; Thu, 21 Feb 2013 03:45:37 -0800 (PST) In-Reply-To: <498125294-1361445659-cardhu_decombobulator_blackberry.rim.net-1271427145-@b1.c16.bise7.blackberry> References: <498125294-1361445659-cardhu_decombobulator_blackberry.rim.net-1271427145-@b1.c16.bise7.blackberry> Date: Thu, 21 Feb 2013 17:15:37 +0530 Message-ID: Subject: Re: Adding comment to a table for columns From: Chunky Gupta To: user@hive.apache.org, bejoy_ks@yahoo.com, Snehalata_Bhaskar@syntelinc.com Content-Type: multipart/alternative; boundary=047d7b66f1c702fef104d63a9dc0 X-Gm-Message-State: ALoCoQmVuKLm4w2qoufXFDhV9AzFG9BtLgsciyI1OtX7jXoITv37HVNwbB3v+sad64mpibMqX+8h X-Virus-Checked: Checked by ClamAV on apache.org --047d7b66f1c702fef104d63a9dc0 Content-Type: text/plain; charset=ISO-8859-1 Hi Bejoy, Bhaskar I tried using FORMATTED, but it will not give me comments which I have put while creating table. Its output is like :- col_name data_type comment c string from deserializer time string from deserializer Thanks, Chunky. On Thu, Feb 21, 2013 at 4:50 PM, wrote: > ** > Hi Gupta > > You can the describe output in a formatted way using > > DESCRIBE FORMATTED ; > Regards > Bejoy KS > > Sent from remote device, Please excuse typos > ------------------------------ > *From: * Chunky Gupta > *Date: *Thu, 21 Feb 2013 16:46:30 +0530 > *To: * > *ReplyTo: * user@hive.apache.org > *Subject: *Adding comment to a table for columns > > Hi, > > I am using this syntax to add comments for all columns :- > > CREATE EXTERNAL TABLE test ( c STRING COMMENT 'Common class', time STRING > COMMENT 'Common time', url STRING COMMENT 'Site URL' ) PARTITIONED BY (dt > STRING ) LOCATION 's3://BucketName/' > > Output of Describe Extended table is like :- (Output is just an example > copied from internet) > > hive> DESCRIBE EXTENDED table_name; > > Detailed Table Information Table(tableName:table_name, > dbName:benchmarking, owner:root, createTime:1309480053, lastAccessTime:0, > retention:0, sd:StorageDescriptor(cols:[FieldSchema(name:session_key, > type:string, comment:null), FieldSchema(name:remote_address, type:string, > comment:null), FieldSchema(name:canister_lssn, type:string, comment:null), > FieldSchema(name:canister_session_id, type:bigint, comment:null), > FieldSchema(name:tltsid, type:string, comment:null), > FieldSchema(name:tltuid, type:string, comment:null), > FieldSchema(name:tltvid, type:string, comment:null), > FieldSchema(name:canister_server, type:string, comment:null), > FieldSchema(name:session_timestamp, type:string, comment:null), > FieldSchema(name:session_duration, type:string, comment:null), > FieldSchema(name:hit_count, type:bigint, comment:null), > FieldSchema(name:http_user_agent, type:string, comment:null), > FieldSchema(name:extractid, type:bigint, comment:null), > FieldSchema(name:site_link, type:string, comment:null), > FieldSchema(name:dt, type:string, comment:null), FieldSchema(name:hour, > type:int, comment:null)], > location:hdfs://hadoop2/user/hive/warehouse/benchmarking.db/table_name, > inputFormat:org.apache.hadoop.mapred.SequenceFileInputFormat, > outputFormat:org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat, > compressed:false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, > serializationLib:org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe) > > Is there any way of getting this detailed comments and column name in > readable format, just like the output of "Describe table_name" ?. > > > Thanks, > > Chunky. > --047d7b66f1c702fef104d63a9dc0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Bejoy, Bhaskar

I tried using FORMATTED, but it will not give me = comments which I have put while creating table. Its output is like :-
col_name=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 data_type=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 =A0=A0=A0 comment
c=A0=A0=A0 =A0 =A0 =A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 =A0=A0=A0 string=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = =A0=A0=A0 from deserializer=A0=A0
time =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 string=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 from deserializer

Thanks,Chunky.

On Thu, Feb 21, 2013 at 4:50 PM= , <bejoy_ks@yahoo.com> wrote:
Hi Gupta

You can the desc= ribe output in a formatted way using

DESCRIBE FORMATTED <table na= me>;
Regards
Bejoy KS

Sent from remote device, Please excuse typ= os

From: Chunky Gupta <chunky.gupta@vizury.com>
Date: Thu, 21 Feb 2013 16:46:30 +0530
Subject: Adding comment to a table for columns
=

Hi,

I am using this syntax to add comments for all columns :-

CREATE EXTERNAL TABLE test ( c STRING COMMENT 'Common=A0 class', ti= me STRING COMMENT 'Common=A0 time', url STRING COMMENT 'Site UR= L' ) PARTITIONED BY (dt STRING ) LOCATION 's3://BucketName/'

Output of Describe Extended table is like :- (Output is just an example cop= ied from internet)

hive> DESCRIBE EXTENDED table_name;

Detailed Table Information Table(tableName:table_name, dbName:benchmarking,= owner:root, createTime:1309480053, lastAccessTime:0, retention:0, sd:Stora= geDescriptor(cols:[FieldSchema(name:session_key, type:string, comment= :null), FieldSchema(name:remote_address, type:string, comment:null), FieldS= chema(name:canister_lssn, type:string, comment:null), FieldSchema(name:cani= ster_session_id, type:bigint, comment:null), FieldSchema(name:tltsid, type:= string, comment:null), FieldSchema(name:tltuid, type:string, comment:null),= FieldSchema(name:tltvid, type:string, comment:null), FieldSchema(name:cani= ster_server, type:string, comment:null), FieldSchema(name:session_timestamp= , type:string, comment:null), FieldSchema(name:session_duration, type:strin= g, comment:null), FieldSchema(name:hit_count, type:bigint, comment:null), F= ieldSchema(name:http_user_agent, type:string, comment:null), FieldSchema(na= me:extractid, type:bigint, comment:null), FieldSchema(name:site_link, type:= string, comment:null), FieldSchema(name:dt, type:string, comment:null), Fie= ldSchema(name:hour, type:int, comment:null)], location:hdfs://hadoop= 2/user/hive/warehouse/benchmarking.db/table_name, inputFormat:org.apache.ha= doop.mapred.SequenceFileInputFormat, outputFormat:org.apache.hadoop.hive.ql= .io.HiveSequenceFileOutputFormat, compressed:false, numBuckets:-1, serdeInf= o:SerDeInfo(name:null, serializationLib:org.apache.hadoop.hive.serde2.lazy.= LazySimpleSerDe)

Is there any way of getting this detailed comments and column name in reada= ble format, just like the output of "Describe table_name" ?.

<= p style=3D"text-indent:0px;letter-spacing:normal;font-variant:normal;text-a= lign:start;font-style:normal;font-weight:normal;padding:0px;line-height:17p= x;text-transform:none;font-size:13px;white-space:normal;margin:16px 0px 0px= ;font-family:Arial,FreeSans,Helvetica,sans-serif;word-spacing:0px">

Thanks,

Chunky.


--047d7b66f1c702fef104d63a9dc0--