Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B95A18B4E for ; Mon, 9 Nov 2015 09:56:23 +0000 (UTC) Received: (qmail 42251 invoked by uid 500); 9 Nov 2015 09:56:22 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 42171 invoked by uid 500); 9 Nov 2015 09:56:22 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 42161 invoked by uid 99); 9 Nov 2015 09:56:22 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Nov 2015 09:56:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 8F0271A08A1 for ; Mon, 9 Nov 2015 09:56:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.88 X-Spam-Level: ** X-Spam-Status: No, score=2.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id AhZn6LRsqCQx for ; Mon, 9 Nov 2015 09:56:15 +0000 (UTC) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 8730620BE2 for ; Mon, 9 Nov 2015 09:56:14 +0000 (UTC) Received: by lfs39 with SMTP id 39so66049058lfs.3 for ; Mon, 09 Nov 2015 01:56:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=4RTVFGa4itPv91eAF5oeGKTW0VqI31BwxBePiAFMkRM=; b=ayMLmp8rrWdO0y1zG1+pUSU0TqeMJneHI+zCQV102NSb1Scv2lwDZu4dNH9W8g7sCx Ah9U4Du7uHfGrv1G0bpvZclFtghquS2PPMTOOTw+AOtEh2a3M0opBuJ58g3UjTt37w7H vpYSkS+FlM2KUYvkVvPtuINhPImvvARW4Vi1i6IkWGVOA9bUpTRXN6nzhKotSN6YIbS+ PfE/mUVwdCzgG0BtCT6hH4BEQQkkEb7EwNrNSWGVKfz/4Xf/p9NI4hqchwIqR6mc0JxD hQxu0tmYn8VKcqE7KOY9VQwhxIoMhjUf484cbiFfBfzVZanmdqtr4WzdCRB2NTECxZcP YG7A== X-Received: by 10.25.148.136 with SMTP id w130mr593537lfd.108.1447062973790; Mon, 09 Nov 2015 01:56:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.145.164 with HTTP; Mon, 9 Nov 2015 01:55:54 -0800 (PST) In-Reply-To: <56406B0D.5050509@uib.no> References: <56406B0D.5050509@uib.no> From: Elliot West Date: Mon, 9 Nov 2015 09:55:54 +0000 Message-ID: Subject: Re: query orc file by hive To: "user@hive.apache.org" Content-Type: multipart/alternative; boundary=001a114023fc8541e60524189a55 --001a114023fc8541e60524189a55 Content-Type: text/plain; charset=UTF-8 Hi, You can create a table and point the location property to the folder containing your ORC file: CREATE EXTERNAL TABLE orc_table ( ) 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 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 > --001a114023fc8541e60524189a55 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

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

<= /div>
<= font face=3D"monospace, monospace">CREATE EXTERNAL TABLE orc_table (=
=C2=A0 <schema>=
)
STORED AS ORC
LOCATION '/hdfs/folder/containing/orc/file'
;


Thanks - Elliot.

On 9 November 2015 at 09:44= , patcharee <Patcharee.Thongtra@uni.no> wrote:
Hi,

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

Thanks,
Patcharee

--001a114023fc8541e60524189a55--