FAQ
Hi,

Reading the wiki on dynamic partition, there is best practice example to solve
the issue of creating too many dynamic partitions on a specific node. However,
the query does not work.
(http://wiki.apache.org/hadoop/Hive/Tutorial#Dynamic-partition_Insert)


Is this form of query support?


FROM table_a
INSERT OVERWRITE TABLE table_b PARTITION(dt)
SELECT * FROM (
SELECT *, dt
DISTRIBUTE BY dt
) T;

Thanks,
--wil

Search Discussions

  • Thiruvel Thirumoolan at Mar 1, 2011 at 11:27 am
    Not sure about that, but this is supported:

    FROM (SELECT *, dt from table_a DISTRIBUTE BY dt) T
    INSERT OVERWRITE TABLE table_b PARTITION(dt)
    SELECT * ;
    On Mar 1, 2011, at 5:28 AM, Wil - wrote:

    Hi,

    Reading the wiki on dynamic partition, there is best practice example to solve
    the issue of creating too many dynamic partitions on a specific node. However,
    the query does not work.
    (http://wiki.apache.org/hadoop/Hive/Tutorial#Dynamic-partition_Insert)


    Is this form of query support?


    FROM table_a
    INSERT OVERWRITE TABLE table_b PARTITION(dt)
    SELECT * FROM (
    SELECT *, dt
    DISTRIBUTE BY dt
    ) T;

    Thanks,
    --wil

  • Wil - at Mar 1, 2011 at 11:28 pm
    Thanks, the query works as expected. I guess the query on the wiki is out of
    date.


    ----- Original Message ----
    From: Thiruvel Thirumoolan <thiruvel@yahoo-inc.com>
    To: "user@hive.apache.org" <user@hive.apache.org>
    Sent: Tue, March 1, 2011 3:26:13 AM
    Subject: Re: Dynamic partition - support for distribute by

    Not sure about that, but this is supported:

    FROM (SELECT *, dt from table_a DISTRIBUTE BY dt) T
    INSERT OVERWRITE TABLE table_b PARTITION(dt)
    SELECT * ;
    On Mar 1, 2011, at 5:28 AM, Wil - wrote:

    Hi,

    Reading the wiki on dynamic partition, there is best practice example to solve
    the issue of creating too many dynamic partitions on a specific node. However,
    the query does not work.
    (http://wiki.apache.org/hadoop/Hive/Tutorial#Dynamic-partition_Insert)


    Is this form of query support?


    FROM table_a
    INSERT OVERWRITE TABLE table_b PARTITION(dt)
    SELECT * FROM (
    SELECT *, dt
    DISTRIBUTE BY dt
    ) T;

    Thanks,
    --wil

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedFeb 28, '11 at 11:59p
activeMar 1, '11 at 11:28p
posts3
users2
websitehive.apache.org

2 users in discussion

Wil -: 2 posts Thiruvel Thirumoolan: 1 post

People

Translate

site design / logo © 2022 Grokbase