Grokbase Groups Hive user March 2010
FAQ
Hello all,

I know that you can load data into Hive via:

LOAD DATA LOCAL INPATH '/my/path/to/data.csv' OVERWRITE INTO TABLE my_table
PARTITION(dt='XYZ');

... where dt=XYZ is the partition where the data should be stored.

However, what if data.csv actually had the dt column specified? Is there a
way to get Hive to correctly insert each line of data.csv into my_table
under the right partition with one LOAD command?

Thanks,
Ryan

Search Discussions

  • Ning Zhang at Mar 2, 2010 at 9:06 pm
    It is not supported yet but I am working on it (see jira hive-936)

    Thanks,
    Ning
    ------
    Sent from my blackberry

    ________________________________
    From: Ryan LeCompte <lecompte@gmail.com>
    To: hive-user@hadoop.apache.org <hive-user@hadoop.apache.org>
    Sent: Tue Mar 02 12:56:53 2010
    Subject: Loading data into Hive with the partition column defined in the data

    Hello all,

    I know that you can load data into Hive via:

    LOAD DATA LOCAL INPATH '/my/path/to/data.csv' OVERWRITE INTO TABLE my_table PARTITION(dt='XYZ');

    ... where dt=XYZ is the partition where the data should be stored.

    However, what if data.csv actually had the dt column specified? Is there a way to get Hive to correctly insert each line of data.csv into my_table under the right partition with one LOAD command?

    Thanks,
    Ryan
  • Ryan LeCompte at Mar 2, 2010 at 9:07 pm
    Thanks!

    On Tue, Mar 2, 2010 at 4:05 PM, Ning Zhang wrote:

    It is not supported yet but I am working on it (see jira hive-936)

    Thanks,
    Ning
    ------
    Sent from my blackberry

    ------------------------------
    *From*: Ryan LeCompte <lecompte@gmail.com>
    *To*: hive-user@hadoop.apache.org <hive-user@hadoop.apache.org>
    *Sent*: Tue Mar 02 12:56:53 2010
    *Subject*: Loading data into Hive with the partition column defined in the
    data

    Hello all,

    I know that you can load data into Hive via:

    LOAD DATA LOCAL INPATH '/my/path/to/data.csv' OVERWRITE INTO TABLE my_table
    PARTITION(dt='XYZ');

    ... where dt=XYZ is the partition where the data should be stored.

    However, what if data.csv actually had the dt column specified? Is there a
    way to get Hive to correctly insert each line of data.csv into my_table
    under the right partition with one LOAD command?

    Thanks,
    Ryan



Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedMar 2, '10 at 8:57p
activeMar 2, '10 at 9:07p
posts3
users2
websitehive.apache.org

2 users in discussion

Ryan LeCompte: 2 posts Ning Zhang: 1 post

People

Translate

site design / logo © 2021 Grokbase