아래와 같이 describe 명령어를 통해 데이터 타입을 확인 가능
batters = LOAD 'hdfs:/home/ubuntu/pigtest/Batting.csv' using PigStorage(','); filtered_batters = FOREACH batters2 GENERATE $0 as id, $5 as bats; describe filtered_batters; filtered_batters: {id: bytearray, bats: bytearray} |
아래와 같이 int 등으로 데이터 타입 변경 가능
filtered_batters = FOREACH batters2 GENERATE (int)$0 as id, (int)$5 as bats;
OR
filtered_batters = FOREACH batters2 GENERATE $0 as id:int, $5 as bats:int;
참고
'눈가락' 카테고리의 다른 글
[IT] 빅데이터 필드 기술질문 대비 적어두는 것들 (0) | 2022.08.26 |
---|---|
[IT] Orc vs Parquet 비교 (0) | 2022.08.10 |
[JAVA] Date Format 설명과 예제 (0) | 2021.09.30 |
[Regex] 정규표현식 연습 예제 (0) | 2021.05.16 |
[Git] 서버에 push 한 commit 삭제하기 (5) | 2021.05.14 |