hadoop

[pig] SUBSTRING

고요한하늘... 2012. 12. 7. 13:59

http://pig.apache.org/docs/r0.8.1/piglatin_ref2.html

 

SUBSTRING(string, startIndex, stopIndex)

 

 

 

 

데이터가

key  { (가,a),(나,b),(다,c) }

돼 있을때

 

B = foreach A generate $0 as key, $1,$0 as val1, $1,$1;

 

이라고 실행하고 B를 저장하면

 

key { ( 가, 나, 다 )} { ( a, b, c )}로 데이터가 만들어진다.

 

'hadoop' 카테고리의 다른 글

pig Nested FOREACH  (0) 2014.02.05
hadoop safemode 해제  (0) 2014.02.04
[PIG] set jog.name default_parallel  (0) 2013.01.07
[PIG] ERROR 1000: Error during parsing. Encountered   (0) 2012.12.06
PIG 관련 URL  (0) 2012.02.17