blob: 926601c647bc38e0ab31f156c267b558e82c1895 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
dfs -put ../data/scripts/newline.py /newline.py;
add file hdfs:///newline.py;
set hive.transform.escape.input=true;
create table tmp_tmp(key string, value string) stored as rcfile;
insert overwrite table tmp_tmp
SELECT TRANSFORM(key, value) USING
'python newline.py' AS key, value FROM src limit 6;
select * from tmp_tmp ORDER BY key ASC, value ASC;
dfs -rmr /newline.py;
drop table tmp_tmp;
|