Sunday, October 18, 2020

hive example query

Create database if not exist testdb location /user/testdb.db';
Drop table if exists testdb.emp;
Create table testdb.emp row format delimited fields terminated by '~' escaped by '\\134' lines terminated by '\n' null defined as ' ' stored as textfile as select case when ascii('empid') = 0 and length('empid) > 0 then " " else 'empid' end 'empid', concat(nvl ('empapproved', ' ' , "@#$") From xyzdb.abc where empId <> 1234;

No comments:

Post a Comment