Return-Path: X-Original-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4669517808 for ; Fri, 24 Oct 2014 15:40:01 +0000 (UTC) Received: (qmail 46165 invoked by uid 500); 24 Oct 2014 15:39:54 -0000 Delivered-To: apmail-hadoop-hdfs-user-archive@hadoop.apache.org Received: (qmail 46043 invoked by uid 500); 24 Oct 2014 15:39:54 -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 46009 invoked by uid 99); 24 Oct 2014 15:39:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2014 15:39:53 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,T_FILL_THIS_FORM_SHORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of glingappa@pivotal.io designates 209.85.220.44 as permitted sender) Received: from [209.85.220.44] (HELO mail-pa0-f44.google.com) (209.85.220.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2014 15:39:49 +0000 Received: by mail-pa0-f44.google.com with SMTP id et14so1337786pad.17 for ; Fri, 24 Oct 2014 08:38:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:references:in-reply-to:mime-version:content-type :message-id:content-transfer-encoding:from:subject:date:to; bh=U5Z2yf+GuYhXTD+DXz8e4Yodnga4Y0/G7wSbF//6oKo=; b=TxUD78acOGHLjLEwds/ItU66MFWdCc61On55gDPEgpQNrKhK3Ej6u/wDoifVtmuba/ +epWyWaxhRILpLARbsXViHNLJDK3sJvYltd6L6j17OYyh/hwx3zvlPYN0DkO35z05GhR GHNLWuDsxd+UqXQEx5Uj8DC7TFoDIjkkkEQQHyQvPCgvs9vZlPnE8vyfu9FkHN2FG1gl nmzLlYy7wqK0DvAxfEvczXh1sU42l+k9mrAiL12ELV+b7xIz+UClZoTNdkYF6dGTvGFS Jk6Fy1qFVH6BT1ALl+HGeqM83llU17eDrwS5uUzsHrS+dDfJbdGmAQQnEvVFpzCba7Js Y3kA== X-Gm-Message-State: ALoCoQkXngC/1ln6osKbPYyMCOQ0FSCaxZ0Lt0UiznsTY3ZSi49VzL5FvvoTrwOzJKWiMOzTjm3a X-Received: by 10.66.66.230 with SMTP id i6mr5584993pat.16.1414165123384; Fri, 24 Oct 2014 08:38:43 -0700 (PDT) Received: from [10.191.247.56] (mobile-166-171-250-135.mycingular.net. [166.171.250.135]) by mx.google.com with ESMTPSA id oc2sm4141774pbb.90.2014.10.24.08.38.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 24 Oct 2014 08:38:42 -0700 (PDT) References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=us-ascii Message-Id: <3D0D1030-A342-4523-B9AC-CC7A5417269B@pivotal.io> Content-Transfer-Encoding: quoted-printable X-Mailer: iPhone Mail (12A405) From: Girish Lingappa Subject: Re: How to automate the Sqoop script in Production environment Date: Fri, 24 Oct 2014 08:38:41 -0700 To: "user@hadoop.apache.org" X-Virus-Checked: Checked by ClamAV on apache.org Ravi=20 If you are using oozie in your production environment one option is to plugi= n your sqoop job into the oozie workflow xml using oozie sqoop action. Thanks Girish Sent from my iPhone > On Oct 24, 2014, at 4:17 AM, Dhandapani, Karthik wrote: >=20 > Hi, >=20 > There is an option. >=20 > Use --password-file Set path for file containing authentication p= assword >=20 > http://sqoop.apache.org/docs/1.4.4/SqoopUserGuide.html >=20 > All the dynamic parameter values can be passed in as unix variables to aut= omate the sqoop script for different tables. Copy the below script to .sh f= ile and run the script from any scheduler. >=20 > Thanks, > Karthik > ________________________________________ > From: Ravi Prasad [raviprasad29@gmail.com] > Sent: Friday, October 24, 2014 7:05 AM > To: user@hadoop.apache.org > Subject: How to automate the Sqoop script in Production environment >=20 > Hi all, >=20 > 1) Can anyone please suggest me , how to automate the Sqoop scripts in th= e production environment. >=20 > I need to import data from Oracle tables to Hadoop Hive tables using the= below scripts. >=20 > sqoop import --connect jdbc:oracle:thin:@:1521/ --username= username --password password --table --columns column1 ,column2= ,column3--hive-import --hive-overwrite --hive-table default.oracreport --li= nes-terminated-by '\n' --fields-terminated-by ',' --target-dir /user/hdfs/ >=20 >=20 > 2) Is there any way to hide the password. >=20 > ---------------------------------------------- > Regards, > RAVI PRASAD. T