You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by madhu phatak <ph...@gmail.com> on 2012/03/01 11:49:15 UTC
Hive table creation over a Hadoop Sequence File
Hi Group,
Can we create a Hive table over a Sequence File of Hadoop for querying? If
its possible can you point to me any documentation for that?
--
Join me at http://hadoopworkshop.eventbrite.com/
Re: Hive table creation over a Hadoop Sequence File
Posted by Aniket Mokashi <an...@gmail.com>.
This means the data key is null and data is (delimited) text. This would
not work for generic sequencefiles.
Thanks,
Aniket
On Thu, Mar 1, 2012 at 4:39 AM, Bejoy Ks <be...@yahoo.com> wrote:
> Hi Madhu
> You can definitely do the same. Specify the SEQUENCE FILE in 'STORED
> AS' clause in your DDL.
>
> An example from hive wiki
>
> CREATE TABLE page_view(viewTime INT, userid BIGINT,
> page_url STRING, referrer_url STRING,
> ip STRING COMMENT 'IP Address of the User')
> COMMENT 'This is the page view table'
> PARTITIONED BY(dt STRING, country STRING)
> CLUSTERED BY(userid) SORTED BY(viewTime) INTO 32 BUCKETS
> ROW FORMAT DELIMITED
> FIELDS TERMINATED BY '\001'
> COLLECTION ITEMS TERMINATED BY '\002'
> MAP KEYS TERMINATED BY '\003'
> STORED AS SEQUENCEFILE;
>
>
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable
>
>
> Regards
> Bejoy.K.S
>
> ------------------------------
> *From:* madhu phatak <ph...@gmail.com>
> *To:* user@hive.apache.org
> *Sent:* Thursday, March 1, 2012 4:19 PM
> *Subject:* Hive table creation over a Hadoop Sequence File
>
> Hi Group,
> Can we create a Hive table over a Sequence File of Hadoop for querying?
> If its possible can you point to me any documentation for that?
>
> --
> Join me at http://hadoopworkshop.eventbrite.com/
>
>
>
--
"...:::Aniket:::... Quetzalco@tl"
Re: Hive table creation over a Hadoop Sequence File
Posted by Bejoy Ks <be...@yahoo.com>.
Hi Madhu
You can definitely do the same. Specify the SEQUENCE FILE in 'STORED AS' clause in your DDL.
An example from hive wiki
CREATE TABLE page_view(viewTime INT, userid BIGINT, page_url STRING, referrer_url STRING, ip STRING COMMENT 'IP Address of the User') COMMENT 'This is the page view table' PARTITIONED BY(dt STRING, country STRING) CLUSTERED BY(userid) SORTED BY(viewTime) INTO 32 BUCKETS ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' COLLECTION ITEMS TERMINATED BY '\002' MAP KEYS TERMINATED BY '\003' STORED AS SEQUENCEFILE;
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable
Regards
Bejoy.K.S
________________________________
From: madhu phatak <ph...@gmail.com>
To: user@hive.apache.org
Sent: Thursday, March 1, 2012 4:19 PM
Subject: Hive table creation over a Hadoop Sequence File
Hi Group,
Can we create a Hive table over a Sequence File of Hadoop for querying? If its possible can you point to me any documentation for that?
--
Join me at http://hadoopworkshop.eventbrite.com/