FAQ
Hi all

I create a table with a partition. Then I import data into this table
without specify partition, in this case I cannot retrieval data from
this table using select statement.
But I can retrieve data when importing data with specify partition.

So I think since hive do not allow me to retrieve data in the first
case, it should not allow me to import data without specify partition


--
Best Regards

Jeff Zhang

Search Discussions

  • 김영우 at Jan 7, 2011 at 9:48 am
    Hi Jeff,

    How could you insert data into a partitioned table without specify partition
    columns or value?


    - Youngwoo

    2011/1/7 Jeff Zhang <zjffdu@gmail.com>
    Hi all

    I create a table with a partition. Then I import data into this table
    without specify partition, in this case I cannot retrieval data from
    this table using select statement.
    But I can retrieve data when importing data with specify partition.

    So I think since hive do not allow me to retrieve data in the first
    case, it should not allow me to import data without specify partition


    --
    Best Regards

    Jeff Zhang
  • Vaibhav negi at Jan 7, 2011 at 9:57 am
    Hi Youngwoo,

    Hive allows u to load data into a partiotioned table without specifying
    partiiton column value.

    I did this simple test.

    1. create hive table with 1 partition coulumn
    2. load data into table without specifying partition column, got success
    message.
    3. can see data file in hadoop, but if u query hive, u can't access that.

    It's a bug

    Thanks and Regards

    Vaibhav Negi

    On Fri, Jan 7, 2011 at 3:17 PM, 김영우 wrote:

    Hi Jeff,

    How could you insert data into a partitioned table without specify
    partition columns or value?


    - Youngwoo

    2011/1/7 Jeff Zhang <zjffdu@gmail.com>

    Hi all
    I create a table with a partition. Then I import data into this table
    without specify partition, in this case I cannot retrieval data from
    this table using select statement.
    But I can retrieve data when importing data with specify partition.

    So I think since hive do not allow me to retrieve data in the first
    case, it should not allow me to import data without specify partition


    --
    Best Regards

    Jeff Zhang
  • 김영우 at Jan 7, 2011 at 10:18 am
    Hi Vaibhav,

    Which version do you use for testing?

    In Hive 0.7 (trunk, I'm currently using), Both 'INSERT OVERWRITE ... SELECT'
    and 'LOAD DATA ..' statements throw an error when I try to insert data into
    a partitioned table without specifying a 'PARTITION' clause.

    - Youngwoo

    2011/1/7 vaibhav negi <sssssssenator@gmail.com>
    Hi Youngwoo,

    Hive allows u to load data into a partiotioned table without specifying
    partiiton column value.

    I did this simple test.

    1. create hive table with 1 partition coulumn
    2. load data into table without specifying partition column, got success
    message.
    3. can see data file in hadoop, but if u query hive, u can't access that.

    It's a bug

    Thanks and Regards

    Vaibhav Negi


    On Fri, Jan 7, 2011 at 3:17 PM, 김영우 wrote:

    Hi Jeff,

    How could you insert data into a partitioned table without specify
    partition columns or value?


    - Youngwoo

    2011/1/7 Jeff Zhang <zjffdu@gmail.com>

    Hi all
    I create a table with a partition. Then I import data into this table
    without specify partition, in this case I cannot retrieval data from
    this table using select statement.
    But I can retrieve data when importing data with specify partition.

    So I think since hive do not allow me to retrieve data in the first
    case, it should not allow me to import data without specify partition


    --
    Best Regards

    Jeff Zhang
  • Edward Capriolo at Jan 7, 2011 at 2:06 pm

    On Fri, Jan 7, 2011 at 5:17 AM, 김영우 wrote:
    Hi Vaibhav,
    Which version do you use for testing?
    In Hive 0.7 (trunk, I'm currently using), Both 'INSERT OVERWRITE ... SELECT'
    and 'LOAD DATA ..' statements throw an error when I try to insert data into
    a partitioned table without specifying a 'PARTITION' clause.
    - Youngwoo

    2011/1/7 vaibhav negi <sssssssenator@gmail.com>
    Hi Youngwoo,

    Hive allows u to load data into a partiotioned table without specifying
    partiiton column value.

    I did this simple test.

    1. create hive table with 1 partition coulumn
    2. load data into table without specifying partition column, got success
    message.
    3. can see data file in hadoop, but if u query hive, u can't access that.

    It's a bug

    Thanks and Regards

    Vaibhav Negi

    On Fri, Jan 7, 2011 at 3:17 PM, 김영우 wrote:

    Hi Jeff,
    How could you insert data into a partitioned table without specify
    partition columns or value?

    - Youngwoo

    2011/1/7 Jeff Zhang <zjffdu@gmail.com>
    Hi all

    I create a table with a partition. Then I import data into this table
    without specify partition, in this case I cannot retrieval data from
    this table using select statement.
    But I can retrieve data when importing data with specify partition.

    So I think since hive do not allow me to retrieve data in the first
    case, it should not allow me to import data without specify partition


    --
    Best Regards

    Jeff Zhang
    Even if you can do it, you should not because it is not the proper
    usage of a partitioned table to put data in the parent folder outside
    of the partition.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedJan 7, '11 at 8:50a
activeJan 7, '11 at 2:06p
posts5
users4
websitehive.apache.org

People

Translate

site design / logo © 2022 Grokbase