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 5416CD454 for ; Wed, 5 Sep 2012 04:24:27 +0000 (UTC) Received: (qmail 25949 invoked by uid 500); 5 Sep 2012 04:24:26 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 25592 invoked by uid 500); 5 Sep 2012 04:24:20 -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 25561 invoked by uid 99); 5 Sep 2012 04:24:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2012 04:24:19 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of liy099@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Sep 2012 04:24:12 +0000 Received: by iagt4 with SMTP id t4so169311iag.35 for ; Tue, 04 Sep 2012 21:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=dB8+4Az0ShmihUXE12nPbLcRlHD92Kkv6PcCtrDJRSg=; b=h2XU0H2qlw6WAVc7s9/OrzHUfSDCNSh9kA5S+WwPaec9ed/1w+WYyeMSNtD1oxgh2x iSVkybdBMy1X0lBuxdRlFeR/CZDidPCKc4n9D3Kp6j3+P1oS1CO9eLGhGeMyb3sYETvA eROnkW6kM39lst2GQ/XI14MoCbHEufjmt1W7Mi5O2JN+sC+yevBFkYr0+x4mdvQ3OlMw RvSKEEPlxrUDyEC1QLUTCnlLcrmpwpghd5NdD0fToYeRIn845A5It9bwNLXc9elOKpM8 c9kNSTy3EWoVXVje4yU9zQS6/354biDK6OD/bSHZ5k+hNy9Uso4jGQJSRkjt7lox6Z/Z xRJA== Received: by 10.50.17.161 with SMTP id p1mr16363417igd.61.1346819030913; Tue, 04 Sep 2012 21:23:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.103.99 with HTTP; Tue, 4 Sep 2012 21:23:10 -0700 (PDT) From: MiaoMiao Date: Wed, 5 Sep 2012 12:23:10 +0800 Message-ID: Subject: How to set default value for a certain field? To: user@hive.apache.org Content-Type: text/plain; charset=UTF-8 I have a file whose content is: 1,1 2,1 3,2 4, 5, Then I import in into a hive table. create external table testtest (id int,value int) row format delimited fields terminated by ',' stored as textfile location '/wtt/test/def'; select * from testtest; 1 1 2 1 3 2 4 NULL 5 NULL I want to set default value for value, but seems hive simply doesn't have this feature, any idea? 1 1 2 1 3 2 4 3 5 3