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 6AA9A4DE9 for ; Tue, 31 May 2011 07:01:29 +0000 (UTC) Received: (qmail 27132 invoked by uid 500); 31 May 2011 07:01:27 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 27085 invoked by uid 500); 31 May 2011 07:01:27 -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 27073 invoked by uid 99); 31 May 2011 07:01:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2011 07:01:23 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dujinhang@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-iw0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 May 2011 07:01:17 +0000 Received: by iwr19 with SMTP id 19so5575611iwr.35 for ; Tue, 31 May 2011 00:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=gFmKLblQVtn0l6N53Qj/xPBr/FlhVliacD/69CM5TFE=; b=ZXaem+WqBwetY4V/bSgTPEy8RcGCXYH5pemiFrXioWlbd/rsdCI06daBDdybnJ3YOy GVulDLaYvX1m4VP3tsg/Ar1FJLSpd4mE11rJTXL3cRXHh+yQlVqtBROeNP9KyqEmRRTf OQjGpI0wiLVq8LKkbfUP0Yw1aKiYrTTPNJess= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=pTLJLQILGidewJst7+c3OFUbkLOx8Qttf3ojwb1BGCiHr7yIt6cFCu4PowTsTZTMb4 I4p9GapYy6xnLt/HlQvxmwiZeKtVF4c/hsuhSABRV1+lQb57DrgF/dwtk12v7tV7vHfH ytYB5mUOoFovm1yaSglAmcHcULXysaK/q2VQc= MIME-Version: 1.0 Received: by 10.231.113.12 with SMTP id y12mr7370006ibp.17.1306825256478; Tue, 31 May 2011 00:00:56 -0700 (PDT) Received: by 10.231.146.69 with HTTP; Tue, 31 May 2011 00:00:56 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 May 2011 15:00:56 +0800 Message-ID: Subject: Re: Question about create hive tables. From: jinhang du To: user@hive.apache.org Cc: asyura414@gmail.com Content-Type: multipart/alternative; boundary=0016363107093229c904a48cf740 --0016363107093229c904a48cf740 Content-Type: text/plain; charset=ISO-8859-1 How does the columns in the table match the "input.regex" ? In other words, which part of the regex matches the columns of the table? Will anybody offer some help? 2011/5/30 YUYANG LAN > hi, how about this ? > > (.+)&&&(.+?)(?:\^\^.*)? > > On Mon, May 30, 2011 at 6:07 PM, jinhang du wrote: > > My data format is as follows: > > a&&&b > > c&&&b^^xyz > > c&&&d^^hdo > > create table f(str1 string, str2 string) ROW FORMAT SERDE > > 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe' > > With SERDEPROPERTIES ( > > "input.regex"="(.+)&&&(.+)(\^\^.+)?" > > ) > > > > My aim is : > > a b > > c b > > c d > > However , > > a b > > c b^^xyz > > c d^^hdo > > So how to fix the regex to get the right answer? > > Thank you for help. > > -- > > dujinhang > > > > > > -- > ------------------------------------------------------- > DAVID RAN UYOU // > -- dujinhang --0016363107093229c904a48cf740 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable How does the columns in the table match the "input.regex" ?
In other words, which part of the regex =A0matches the columns of th= e table?

Will anybody offer =A0some help?

2011/5/30 Y= UYANG LAN <asyu= ra414@gmail.com>
hi, how about this ?

(.+)&&&(.+?)(?:\^\^.*)?

On Mon, May 30, 2011 at 6:07 PM, jinhang du <dujinhang@gmail.com> wrote:
> My data format is as follows:
> a&&&b
> c&&&b^^xyz
> c&&&d^^hdo
> create table f(str1 string, str2 string)=A0ROW FORMAT SERDE
> 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'
> With SERDEPROPERTIES (
> "input.regex"=3D"(.+)&&&(.+)(\^\^.+)?"=
> )
>
> My aim is :
> a b
> c b
> c d
> However ,
> a b
> c b^^xyz
> c d^^hdo
> So how to fix the regex to get the right answer?
> Thank you for help.
> --
> dujinhang
>



--
-------------------------------------------------------
DAVID RAN UYOU //



--
dujinhang
--0016363107093229c904a48cf740--