Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-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 595B91080B for ; Tue, 17 Sep 2013 21:44:12 +0000 (UTC) Received: (qmail 77905 invoked by uid 500); 17 Sep 2013 21:43:51 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 77809 invoked by uid 500); 17 Sep 2013 21:43:51 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 77791 invoked by uid 99); 17 Sep 2013 21:43:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Sep 2013 21:43:49 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mohajeri@gmail.com designates 209.85.214.170 as permitted sender) Received: from [209.85.214.170] (HELO mail-ob0-f170.google.com) (209.85.214.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Sep 2013 21:43:44 +0000 Received: by mail-ob0-f170.google.com with SMTP id va2so6535096obc.29 for ; Tue, 17 Sep 2013 14:43:23 -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 :cc:content-type; bh=Aa53Bz5ZJX9b4ZrxfSQpTdi5VyACS1ho26WKjUj+NpI=; b=XN/SHllsTdcmgTo51nhVJyEQnKvp1mkXfWW1SJjxagkyPOrCdWx5dHkxg2gMsI9mnN srgzUebOj7vMM9TEN+7wvv9XdLwQloNq76cxxcry/HfAVtYK+VSxxY/YY5ZGO0fHWQJj 3lCUjnO44MPWbWuaInWd6KZWgWKCQrCgqcjWdcHgEwEOQ2v1LD4b79RcL7Q8fGsNDvPh PGjtb2aO6Svc6pKnlSUwwZuX10qhIo+2ebDZXwz43BnDJTXOlAycm3EVyDSqJaGcxwn7 g4uIPxKsw2NsmSI03hmX/8LaQK4ai4CLYSaROVriCF2CU4IRZm70Yt89g4IOkSf2X0VA FLzg== MIME-Version: 1.0 X-Received: by 10.182.117.195 with SMTP id kg3mr7695759obb.17.1379454203056; Tue, 17 Sep 2013 14:43:23 -0700 (PDT) Received: by 10.182.153.39 with HTTP; Tue, 17 Sep 2013 14:43:23 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Sep 2013 14:43:23 -0700 Message-ID: Subject: Re: Oozie dynamic action From: Peyman Mohajerian To: user@hadoop.apache.org Cc: "oozie-users@incubator.apache.org" Content-Type: multipart/alternative; boundary=089e0149c506c2264e04e69b35bf X-Virus-Checked: Checked by ClamAV on apache.org --089e0149c506c2264e04e69b35bf Content-Type: text/plain; charset=ISO-8859-1 If you want to see a simple example of what you are looking for: https://github.com/cloudera/cdh-twitter-example It is part of this article: http://blog.cloudera.com/blog/2012/09/analyzing-twitter-data-with-hadoop/ On Tue, Sep 17, 2013 at 4:20 AM, praveenesh kumar wrote: > Hi, > > I have a scenario in which I want to trigger a hive uploading script every > day. I have a set of folders created for a set of customer ids everyday. My > hive script will read the customer id from the path, checks whether the > table for the customer id exits and if not create a table and will create > partition based on date for a "set of unknown customer_ids". > > I can get the set of unique customer_ids from a shell action. It can be > passed as a list or string. > > My problem is how can I achieve this dynamic checking/creation of hive > tables and partitions from oozie. > > Currently I am doing everything from the shell script and calling it as a > shell action in oozie, but I was wondering if these kind of checks or some > kind of for-loop kind of actions can be done in oozie. > > Any thoughts/suggestions on how to tackle the above scenario in the best > way possible using oozie, would be highly helpful. > > Regards > Praveenesh > > --089e0149c506c2264e04e69b35bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
If you want to see a simple example of what you are l= ooking for:
= https://github.com/cloudera/cdh-twitter-example
It is part of = this article:
http://blog.cloudera.com/blog/2012/09/analyzing-twitter-data-wit= h-hadoop/


On Tue, Sep 17, 2013 at 4:20 AM, praveenesh kumar <praveenesh@gmail.com= > wrote:
Hi,

I= have a scenario in which I want to trigger a hive uploading script every d= ay. I have a set of folders created for a set of customer ids everyday. My = hive script will read the customer id from the path, checks whether the tab= le for the customer id exits and if not create a table and will create part= ition based on date for=A0 a "set of unknown customer_ids".

I can get the set of unique customer_ids from a shell actio= n. It can be passed as a list or string.

My problem is how can= I achieve this dynamic checking/creation of hive tables and partitions fro= m oozie.

Currently I am doing everything from the shell script and calling= it as a shell action in oozie, but I was wondering if these kind of checks= or some kind of for-loop kind of actions can be done in oozie.

Any thoughts/suggestions on how to tackle the above scenario in the b= est way possible using oozie, would be highly helpful.

Regards=
Praveenesh


--089e0149c506c2264e04e69b35bf--