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 DF226C85E for ; Mon, 11 Jun 2012 12:54:16 +0000 (UTC) Received: (qmail 32018 invoked by uid 500); 11 Jun 2012 12:54:15 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 31979 invoked by uid 500); 11 Jun 2012 12:54:15 -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 31970 invoked by uid 99); 11 Jun 2012 12:54:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2012 12:54:15 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cambazz@gmail.com designates 209.85.210.48 as permitted sender) Received: from [209.85.210.48] (HELO mail-pz0-f48.google.com) (209.85.210.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jun 2012 12:54:08 +0000 Received: by dadz8 with SMTP id z8so6743887dad.35 for ; Mon, 11 Jun 2012 05:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=MpNDQFpofuP/iOMvIvqHIHDqD9mgQjhj+J2CCv97e5A=; b=fwFVKLyRTeDGw9DVgxQZCUvKKE7GeZ8rh9x5wwIgaWevBRBCb3UQ6vFdBEgbMQ5toE 3RLJhwA+8p/KFLuE/OtDdmTRP5uD74zFIC6ZC2/Ls+8BH2PXEE1EztEP2ng34no1ANCg KzhB4cBtrh7YpuTkvJrOA0HyFmC9Inc/al7UAEGUbm36UYMLgOjRkE2Fbz1AesxDmFo2 +JOdq/oLn+QTJr3KR+LmqV9vOJyrn4vcXuAm2FexBzeu9TGEHneoFFrvCVB6JuEVhpcT nom8LhfY1WackBMOmvU3xrg5yTkyf6zhYDyfjUPXx7O88cXlwkhIl+N+1EIAKsjBjrx+ ne9Q== MIME-Version: 1.0 Received: by 10.68.202.234 with SMTP id kl10mr26671984pbc.108.1339419226982; Mon, 11 Jun 2012 05:53:46 -0700 (PDT) Received: by 10.68.218.165 with HTTP; Mon, 11 Jun 2012 05:53:46 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Jun 2012 15:53:46 +0300 Message-ID: Subject: Re: counting number of pageviews and unique pageviews From: Cam Bazz To: user@hive.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Nitin, yes, i want to write these results back to some rdbms, postgres, and i had written some sort of merge program to handle text data into postgres, but I will look at sqoop. Currently there is no program, but I will either write a script, or one in = java. I will be making number of queries about the same item, and then have to combine those results in a table like itemSid, measurementA, measurementB ... I am concerned about combining those results, basically from hive queries i= get: for query A: itemSid, measurementA for query B: itemSid, measurementB ... etc. Best. C.B. On Mon, Jun 11, 2012 at 3:49 PM, Nitin Pawar wrot= e: > If you want to write back these results to some rdbms then you can use > sqoop > > if you want to save the results to some file, then just redirect the outp= ut > of query to somefile > > can you tell how are you executing the hive query from your code? that wi= ll > be helpful to answer your question > > > On Mon, Jun 11, 2012 at 6:15 PM, Cam Bazz wrote: >> >> Hello, >> >> I have finally wrote a program to upload my data to amazon s3, start a >> cluster on amazon emr, and recover my partitions, and can issue simple >> queries on hive. >> >> now I would like to: >> >> select count(*),itemSid from items group by itemSid <- gives me how >> many times an item as viewed >> >> and another query to extract unique views that i dont know how to yet. >> >> how do I store the outputs of these queries, >> >> such as: >> >> itemSid, pageViews, uniquePageViews >> 1 =A0 =A0 =A0 =A0 =A0 =A010 =A0 =A0 =A0 =A0 =A0 =A0 8 >> >> commonsense tells me, store the results of query A, then query B, and >> then combine them in a table? >> >> is that correct, and if so, how can i accomplish this? >> >> Best Regards, >> C.B. > > > > > -- > Nitin Pawar >