Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 38644200D27 for ; Wed, 25 Oct 2017 08:30:42 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 374BD160BDA; Wed, 25 Oct 2017 06:30:42 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2F1751609E5 for ; Wed, 25 Oct 2017 08:30:41 +0200 (CEST) Received: (qmail 9051 invoked by uid 500); 25 Oct 2017 06:30:39 -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 9041 invoked by uid 99); 25 Oct 2017 06:30:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Oct 2017 06:30:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A5983180803 for ; Wed, 25 Oct 2017 06:30:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.401 X-Spam-Level: X-Spam-Status: No, score=-0.401 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id vYkz38JOIUO4 for ; Wed, 25 Oct 2017 06:30:37 +0000 (UTC) Received: from mail-oi0-f44.google.com (mail-oi0-f44.google.com [209.85.218.44]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7922C5FBEA for ; Wed, 25 Oct 2017 06:30:36 +0000 (UTC) Received: by mail-oi0-f44.google.com with SMTP id h6so41282879oia.10 for ; Tue, 24 Oct 2017 23:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=yw94ULoiO2tlAWEH1bsllzHcGLdJEX9kqgB23QUONfM=; b=HzD1HkDnnyCZmmHPKOR2TpABQEeNU2uBBUr2nDk8DJr+tTy7eWblwVY5/WvdvD1tR6 cftegeNgh+MxsjzUbbNrMtEctVFNkO0ibiX3g7NsPsjV27uxQTKEUKdLE2B4FZZ07+Ag gV204i+5+t7UqFQltoe3aa+kG7VMoH1O1SOp3VPrwOm9N8tMKxS1mrY04R3c9wreZ8NO pJAXgG7usCqVfGDXmlV18h3gOSE0qm8ECthpVkInMo0euPNJITtfEC9CrSkM8bicGwLA VmyiuXFT3iU10Iz59pQH9ft434ZRAfgAUJLTnEdUvytb62UFnft7mpFRNFQh/3AQpw6X 5IKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=yw94ULoiO2tlAWEH1bsllzHcGLdJEX9kqgB23QUONfM=; b=ho8TSVZCN276HsgvnCs+geZwhwDZS4eTz+Wf0gqgQO+VSFSt+qVuo35SkJxHE0WmLU dqBlGcKqUuv8O8LubDUejZY0YsqGWHtnD2opCsYEpz4z3LF/9RSTO+LU06QuHVsaTTdr N9ndkzIMjAXM+PhvbXMdJGAVGRk/3d7SCuI9CtgtaogAvqz8M6fJv3CxpDkrXrRrt+NG slWCLg+f79G1CwBkhgLqY1fx7vcw7UzFFpYC+WN7DSY/DDq/EeP5hW2sYgPqra8ce3xR GwNR8uxWud526KNKFSr5cM6Pe+isW4XSxXg+hipC3Nmb5Qo9jL6VcBXYs1dUxbUf86tE W2Aw== X-Gm-Message-State: AMCzsaUREW20F1rnP1hvKCLYvagCCY2AghJsO7XQAY5/IZbPNdWvnaF5 SvZAW0+r/E2xXePVEWbfb/jcnwLbtEnUcWx3kpDVgZJN X-Google-Smtp-Source: ABhQp+Tz9DrXMoIqxuFieG4O7ydkpRYczkRJ0wK2mD616SzYnFldO6SE+IM83NwGXVk8+PLD3x2aiJKInY3++7reSJs= X-Received: by 10.202.253.213 with SMTP id b204mr565393oii.332.1508913034955; Tue, 24 Oct 2017 23:30:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.32.78 with HTTP; Tue, 24 Oct 2017 23:30:34 -0700 (PDT) In-Reply-To: References: From: "Owen O'Malley" Date: Tue, 24 Oct 2017 23:30:34 -0700 Message-ID: Subject: Re: HIVE ORC table returns NULLs ( EMR 5.9 Hive 2.3.0 ) To: "user@hive.apache.org" Content-Type: multipart/alternative; boundary="001a113ded22720fb6055c5931be" archived-at: Wed, 25 Oct 2017 06:30:42 -0000 --001a113ded22720fb6055c5931be Content-Type: text/plain; charset="UTF-8" The file has the data. I'm not sure what Hive is doing wrong. owen@laptop> java -jar ../tools/target/orc-tools-1.5.0-SNAPSHOT-uber.jar > data ~/Downloads/Country.orc > Processing data file /Users/owen/Downloads/Country.orc [length: 392] > {"Id":1,"Name":"Singapore"} > {"Id":2,"Name":"Malaysia"} > {"Id":3,"Name":"India"} > {"Id":4,"Name":"Hong Kong"} > {"Id":5,"Name":"Macau"} > {"Id":6,"Name":"Thailand"} > {"Id":7,"Name":"Indonesia"} > {"Id":8,"Name":"Philippines"} > {"Id":9,"Name":"Dubai"} > {"Id":10,"Name":"Vietnam"} > > ________________________________________________________________________________________________________________________ .. Owen On Tue, Oct 24, 2017 at 11:11 PM, Oleg Ruchovets wrote: > I am creating hive external table ORC (ORC file located on S3). > > *Command* > > CREATE EXTERNAL TABLE Table1 (Id INT, Name STRING) STORED AS ORC LOCATION 's3://bucket_name' > > *After running the query*: > > Select * from Table1; > > *Result is*: > > +-------------------------------------+---------------------------------------+ > | Table1.id | Table1.name | > +-------------------------------------+---------------------------------------+ > | NULL | NULL | > | NULL | NULL | > | NULL | NULL | > | NULL | NULL | > | NULL | NULL | > | NULL | NULL | > | NULL | NULL | > | NULL | NULL | > | NULL | NULL | > | NULL | NULL | > +-------------------------------------+---------------------------------------+ > > Interesting that the number of returned records 10 and it is correct but > all records are NULL. What is wrong, why query returns only NULLs? I am > using EMR instances on AWS. Should I configure/check to support ORC format > for hive? > > ORC file attached > --001a113ded22720fb6055c5931be Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The file has the data. I'm not sure what Hive is doing= wrong.


On Tue, Oct 24, 2017 at 11:= 11 PM, Oleg Ruchovets <oruchovets@gmail.com> wrote:

I am creating hive external table ORC (ORC file located on S3).

<= p style=3D"margin:0px 0px 1em;padding:0px;border:0px;font-variant-numeric:i= nherit;font-stretch:inherit;font-size:15px;line-height:inherit;font-family:= Arial,"Helvetica Neue",Helvetica,sans-serif;vertical-align:baseli= ne;clear:both;color:rgb(36,39,41)">Command

CREATE EXTERNAL TABLE Table1 (Id INT, Name STRING) STORED AS O=
RC LOCATION 's3://bucket_name'

After running the query:

Select * from Table1;

Result is:

+-------------------------------------+-=
--------------------------------------+
| Table1.id  | Table1.name  |
+-------------------------------------+--------------------------=
-------------+
| NULL                                | NULL                               =
   |
| NULL                                | NULL                               =
   |
| NULL                                | NULL                               =
   |
| NULL                                | NULL                               =
   |
| NULL                                | NULL                               =
   |
| NULL                                | NULL                               =
   |
| NULL                                | NULL                               =
   |
| NULL                                | NULL                               =
   |
| NULL                                | NULL                               =
   |
| NULL                                | NULL                               =
   |
+-------------------------------------+--------------------------=
-------------+

Interesting that the numbe= r of returned records 10 and it is correct but all records are NULL. What i= s wrong, why query returns only NULLs? I am using EMR instances on AWS. Sho= uld I configure/check to support ORC format for hive?

ORC file attached


--001a113ded22720fb6055c5931be--