Hi,

It works after I altered add partition. Thanks!

My partitioned orc file (directory) is created by Spark, therefore hive is not aware of the partitions automatically.

Best,
Patcharee

On 13. nov. 2015 13:08, Elliot West wrote:
Have you added the partitions to the meta store?

ALTER TABLE ... ADD PARTITION ...

If using Spark, I believe it has good support to do this automatically with the HiveContext, although I have not used it myself.

Elliot.

On Friday, 13 November 2015, patcharee <patcharee.thong...@uni.no <mailto:patcharee.thong...@uni.no>> wrote:

    Hi,

    It work with non-partition ORC, but does not work with (2-column)
    partitioned ORC.

    Thanks,
    Patcharee


    On 09. nov. 2015 10:55, Elliot West wrote:
    Hi,

    You can create a table and point the location property to the
    folder containing your ORC file:

        CREATE EXTERNAL TABLE orc_table (
        <schema>
        )
        STORED AS ORC
        LOCATION '/hdfs/folder/containing/orc/file'
        ;


    
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable

    Thanks - Elliot.

    On 9 November 2015 at 09:44, patcharee <patcharee.thong...@uni.no
    <javascript:_e(%7B%7D,'cvml','patcharee.thong...@uni.no');>> wrote:

        Hi,

        How can I query an orc file (*.orc) by Hive? This orc file is
        created by other apps, like spark, mr.

        Thanks,
        Patcharee




Reply via email to