Re: how to create an array from two columns?

2016-03-12 Thread Chandeep Singh
PM, Rex X <mailto:dnsr...@gmail.com>> wrote: > Thank you, Chandeep. Yes, my first problem solved. > How about the second one? Is there any way to append an element to an > existing array? > > > > On Sat, Mar 12, 2016 at 5:10 PM, Chandeep Singh <mailto:c...@ch

Re: how to create an array from two columns?

2016-03-12 Thread Chandeep Singh
Writing your own UDF is always an option :) > On Mar 13, 2016, at 1:46 AM, Chandeep Singh wrote: > > Since data is stored in HDFS you have very limited scope to directly append. > > As a workaround you could get the contents of the original array by their > index and then

Re: how to create an array from two columns?

2016-03-12 Thread Chandeep Singh
an > existing array? > > > > On Sat, Mar 12, 2016 at 5:10 PM, Chandeep Singh <mailto:c...@chandeep.com>> wrote: > If you only want the array while you’re querying table1 your example should > work. If you want to add AB to the table you’ll probably need to create a

Re: how to create an array from two columns?

2016-03-12 Thread Chandeep Singh
If you only want the array while you’re querying table1 your example should work. If you want to add AB to the table you’ll probably need to create a new table by selecting everything you need from table1. hive> select * from table1 limit 1; OK temp1 temp2 temp3 hive> select f1, array(f2, f

Re: Field delimiter in hive

2016-03-08 Thread Chandeep Singh
I’ve been pretty successful with two pipes (||) or two carets (^^) based on my dataset even though they aren’t unicode. > On Mar 7, 2016, at 8:32 PM, mahender bigdata > wrote: > > Any help on this. > > On 3/3/2016 2:38 PM, mahender bigdata wrote: >> Hi, >> >> I'm bit confused to know which c

Re: DB2 DDL to Hive DDL conversion **Need Help**

2016-02-19 Thread Chandeep Singh
Tables can be imported directly into Hive using Sqoop with the following flag --hive-import. Once you have the tables in Hive you can get their create DDL scripts using SHOW CREATE TABLE ; > On Feb 19, 2016, at 5:31 PM, Mohit Durgapal wrote: > > If he can import the scripts in db2 rdbms then

Re: Apache hive and sqoop

2016-02-18 Thread Chandeep Singh
There is a flag to import all tables of a database called import-all-tables but this does not bring in DB properties. Data for each table will be stored in a separate directory which would be named after the table name. > On Feb 18, 2016, at 12:07 PM, Archana Patel wrote: > > HI , > > I am ne

Re: How can we find Hive version from Hive CLI or Hive shell?

2016-02-17 Thread Chandeep Singh
In order to run a unix shell command from hive you need to add ! to the beginning For example in your case: hive> ! hive --version; Hive 1.1.0-cdh5.4.8 Subversion file:///data/jenkins/workspace/generic-package-rhel64-6-0/topdir/BUILD/hive-1.1.0-cdh5.4.8 -r Unknown Compiled by jenkins on Thu

Re: Need help :Does anybody has HDP cluster on EC2?

2016-02-15 Thread Chandeep Singh
You could also fire up a VNC session and access all internal pages from there. > On Feb 15, 2016, at 9:19 AM, Divya Gehlot wrote: > > Hi Sabarish, > Thanks alot for your help. > I am able to view the logs now > > Thank you very much . > > Cheers, > Divya > > > On 15 February 2016 at 16:51,