SlideShare a Scribd company logo
1 of 9
Download to read offline
빅데이터 ~ 머신(딥)러닝
실무로 배우는 빅데이터 기술
 Hive Bucket 활용
☆ 확장하기 – 7편 ☆
김강원
Hive Bucket(버켓) 은?
버켓으로 지정된 필드의 데이터들을 해싱값 기준으로
버켓팅(그룹핑)해 저장함으로써 효율적인 Hive 쿼리를 지원
※ Hive의 기본 개념과 기능들은 구글링을 통해 확인 하세요!
파일럿 프로젝트 확장 (1/2)
책 246 페이지 중에서… (개정판)
Bucket 활용
파일럿 프로젝트 확장 (2/2)
확장편 실습
Hive Bucket 활용
 Hue > Hive 에디터 접속
URL: http://server02.hadoop.com:8888
Hue Home > Query Editor > Hive
Step-1
 버켓팅할 데이터를 Hive QL로 확인
SELECT * FROM smartcar_master;
Step-2
 버켓팅할 데이터를 파일 브라우져로 확인
파일 브라우져 > /pilot-pjt/collect/car-master
Step-3
 버켓팅할 테이블 생성
set hive.enforce.bucketing = true;
CREATE TABLE smartcar_master_bucketed (
car_number String,
sex String,
age String,
marriage String,
region String,
job String,
car_capacity String,
car_year String,
car_model String )
CLUSTERED BY (car_number) SORTED BY(car_number ASC) INTO 10 BUCKETS
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|';
Step-4
 버켓팅된 테이블에 데이터 생성
INSERT OVERWRITE TABLE smartcar_master_bucketed
SELECT * FROM smartcar_master;
Step-5
 버켓팅된 데이터를 파일 브라우져로 확인
파일 브라우져 > /user/hive/warehouse/smartcar_master_bucketed
Step-6
 버켓을 이용해 데이터 샘플링
SELECT * FROM smartcar_master_bucketed TABLESAMPLE (bucket 1 out of 10 on region);
Step-7
실무로 배우는 빅데이터 기술
확장하기 7편 – Hive Bucket 활용
[ 강의자료 ]
 동 영 상: 유튜브 www.youtube.com
 실습문서: 슬라이드쉐어 www.slideshare.net

More Related Content

What's hot

18. Install - Spark Streaming Env.
18. Install - Spark Streaming Env.18. Install - Spark Streaming Env.
18. Install - Spark Streaming Env.merry7
 
19. Application - Spark Streaming 1
19. Application - Spark Streaming 119. Application - Spark Streaming 1
19. Application - Spark Streaming 1merry7
 
[온라인교육시리즈] 네이버 클라우드 플랫폼 init script 활용법 소개(정낙수 클라우드 솔루션 아키텍트)
[온라인교육시리즈] 네이버 클라우드 플랫폼 init script 활용법 소개(정낙수 클라우드 솔루션 아키텍트)[온라인교육시리즈] 네이버 클라우드 플랫폼 init script 활용법 소개(정낙수 클라우드 솔루션 아키텍트)
[온라인교육시리즈] 네이버 클라우드 플랫폼 init script 활용법 소개(정낙수 클라우드 솔루션 아키텍트)NAVER CLOUD PLATFORMㅣ네이버 클라우드 플랫폼
 
구글Fin
구글Fin구글Fin
구글Finzerk87
 
[온라인교육시리즈] Jupyter를 이용한 분석 환경 구축하기 - 허창현 클라우드 솔루션 아키텍트
[온라인교육시리즈] Jupyter를 이용한 분석 환경 구축하기 - 허창현 클라우드 솔루션 아키텍트[온라인교육시리즈] Jupyter를 이용한 분석 환경 구축하기 - 허창현 클라우드 솔루션 아키텍트
[온라인교육시리즈] Jupyter를 이용한 분석 환경 구축하기 - 허창현 클라우드 솔루션 아키텍트NAVER CLOUD PLATFORMㅣ네이버 클라우드 플랫폼
 
RUCK 2017 - 강병엽 - Spark와 R을 연동한 빅데이터 분석
RUCK 2017 - 강병엽 - Spark와 R을 연동한 빅데이터 분석RUCK 2017 - 강병엽 - Spark와 R을 연동한 빅데이터 분석
RUCK 2017 - 강병엽 - Spark와 R을 연동한 빅데이터 분석r-kor
 
Data URI Scheme
Data URI SchemeData URI Scheme
Data URI Scheme현진 김
 
CUBRIDInside_5th_CUBRID_Migration Process_DHLee
CUBRIDInside_5th_CUBRID_Migration Process_DHLeeCUBRIDInside_5th_CUBRID_Migration Process_DHLee
CUBRIDInside_5th_CUBRID_Migration Process_DHLeeLaura Oh
 
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진PgDay.Seoul
 
하둡-맵리듀스 튜닝 방법
하둡-맵리듀스 튜닝 방법하둡-맵리듀스 튜닝 방법
하둡-맵리듀스 튜닝 방법Yunsu Lee
 
좌충우돌 CLOUD 학습기(이동민)
좌충우돌 CLOUD 학습기(이동민)좌충우돌 CLOUD 학습기(이동민)
좌충우돌 CLOUD 학습기(이동민)DONGMIN LEE
 
GCP 자격증 취득 후 찾아온 기회들
GCP 자격증 취득 후 찾아온 기회들GCP 자격증 취득 후 찾아온 기회들
GCP 자격증 취득 후 찾아온 기회들DONGMIN LEE
 
Airflow introduce
Airflow introduceAirflow introduce
Airflow introducet lc
 

What's hot (13)

18. Install - Spark Streaming Env.
18. Install - Spark Streaming Env.18. Install - Spark Streaming Env.
18. Install - Spark Streaming Env.
 
19. Application - Spark Streaming 1
19. Application - Spark Streaming 119. Application - Spark Streaming 1
19. Application - Spark Streaming 1
 
[온라인교육시리즈] 네이버 클라우드 플랫폼 init script 활용법 소개(정낙수 클라우드 솔루션 아키텍트)
[온라인교육시리즈] 네이버 클라우드 플랫폼 init script 활용법 소개(정낙수 클라우드 솔루션 아키텍트)[온라인교육시리즈] 네이버 클라우드 플랫폼 init script 활용법 소개(정낙수 클라우드 솔루션 아키텍트)
[온라인교육시리즈] 네이버 클라우드 플랫폼 init script 활용법 소개(정낙수 클라우드 솔루션 아키텍트)
 
구글Fin
구글Fin구글Fin
구글Fin
 
[온라인교육시리즈] Jupyter를 이용한 분석 환경 구축하기 - 허창현 클라우드 솔루션 아키텍트
[온라인교육시리즈] Jupyter를 이용한 분석 환경 구축하기 - 허창현 클라우드 솔루션 아키텍트[온라인교육시리즈] Jupyter를 이용한 분석 환경 구축하기 - 허창현 클라우드 솔루션 아키텍트
[온라인교육시리즈] Jupyter를 이용한 분석 환경 구축하기 - 허창현 클라우드 솔루션 아키텍트
 
RUCK 2017 - 강병엽 - Spark와 R을 연동한 빅데이터 분석
RUCK 2017 - 강병엽 - Spark와 R을 연동한 빅데이터 분석RUCK 2017 - 강병엽 - Spark와 R을 연동한 빅데이터 분석
RUCK 2017 - 강병엽 - Spark와 R을 연동한 빅데이터 분석
 
Data URI Scheme
Data URI SchemeData URI Scheme
Data URI Scheme
 
CUBRIDInside_5th_CUBRID_Migration Process_DHLee
CUBRIDInside_5th_CUBRID_Migration Process_DHLeeCUBRIDInside_5th_CUBRID_Migration Process_DHLee
CUBRIDInside_5th_CUBRID_Migration Process_DHLee
 
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
[Pgday.Seoul 2017] 1. PostGIS의 사례로 본 PostgreSQL 확장 - 장병진
 
하둡-맵리듀스 튜닝 방법
하둡-맵리듀스 튜닝 방법하둡-맵리듀스 튜닝 방법
하둡-맵리듀스 튜닝 방법
 
좌충우돌 CLOUD 학습기(이동민)
좌충우돌 CLOUD 학습기(이동민)좌충우돌 CLOUD 학습기(이동민)
좌충우돌 CLOUD 학습기(이동민)
 
GCP 자격증 취득 후 찾아온 기회들
GCP 자격증 취득 후 찾아온 기회들GCP 자격증 취득 후 찾아온 기회들
GCP 자격증 취득 후 찾아온 기회들
 
Airflow introduce
Airflow introduceAirflow introduce
Airflow introduce
 

Similar to 7. Application - Hive Bucket

NetApp AI Control Plane
NetApp AI Control PlaneNetApp AI Control Plane
NetApp AI Control PlaneSeungYong Baek
 
2020년 4월 18일 개발 이야기 정리
2020년 4월 18일 개발 이야기 정리2020년 4월 18일 개발 이야기 정리
2020년 4월 18일 개발 이야기 정리Jay Park
 
Distributed Programming Framework, hadoop
Distributed Programming Framework, hadoopDistributed Programming Framework, hadoop
Distributed Programming Framework, hadoopLGU+
 
Real-time Big Data Analytics Practice with Unstructured Data
Real-time Big Data Analytics Practice with Unstructured DataReal-time Big Data Analytics Practice with Unstructured Data
Real-time Big Data Analytics Practice with Unstructured DataTed Won
 
성공적인 게임 런칭을 위한 비밀의 레시피 #3
성공적인 게임 런칭을 위한 비밀의 레시피 #3성공적인 게임 런칭을 위한 비밀의 레시피 #3
성공적인 게임 런칭을 위한 비밀의 레시피 #3Amazon Web Services Korea
 
어그로월드 Season1 - Aggro World season 1
어그로월드 Season1 - Aggro World season 1어그로월드 Season1 - Aggro World season 1
어그로월드 Season1 - Aggro World season 1bingoori
 
제로부터시작하는 Git 두번째 이야기
제로부터시작하는 Git 두번째 이야기제로부터시작하는 Git 두번째 이야기
제로부터시작하는 Git 두번째 이야기Mario Cho
 
Jco 소셜 빅데이터_20120218
Jco 소셜 빅데이터_20120218Jco 소셜 빅데이터_20120218
Jco 소셜 빅데이터_20120218Hyoungjun Kim
 
[아이펀팩토리] 2018 데브데이 서버위더스 _01 HTML5/WebSocket으로 Pong 게임 만들기
[아이펀팩토리] 2018 데브데이 서버위더스 _01 HTML5/WebSocket으로 Pong 게임 만들기[아이펀팩토리] 2018 데브데이 서버위더스 _01 HTML5/WebSocket으로 Pong 게임 만들기
[아이펀팩토리] 2018 데브데이 서버위더스 _01 HTML5/WebSocket으로 Pong 게임 만들기iFunFactory Inc.
 
서버 H/W, S/W 인벤토리 Auto Discovery 솔루션
서버 H/W, S/W 인벤토리 Auto Discovery 솔루션서버 H/W, S/W 인벤토리 Auto Discovery 솔루션
서버 H/W, S/W 인벤토리 Auto Discovery 솔루션옥시즌
 
Cloud-Barista 제1차 오픈세미나 - CB-Spider : 멀티 클라우드 인프라 연동 프레임워크(1st Open Seminar, ...
Cloud-Barista 제1차 오픈세미나 - CB-Spider : 멀티 클라우드 인프라 연동 프레임워크(1st Open Seminar, ...Cloud-Barista 제1차 오픈세미나 - CB-Spider : 멀티 클라우드 인프라 연동 프레임워크(1st Open Seminar, ...
Cloud-Barista 제1차 오픈세미나 - CB-Spider : 멀티 클라우드 인프라 연동 프레임워크(1st Open Seminar, ...Cloud-Barista Community
 
Introduction to Hadoop, Big Data, Training, Use Cases
Introduction to Hadoop, Big Data, Training, Use CasesIntroduction to Hadoop, Big Data, Training, Use Cases
Introduction to Hadoop, Big Data, Training, Use CasesJongwook Woo
 
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1 나무기술(주) 최유석 20170912
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1  나무기술(주) 최유석 20170912Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1  나무기술(주) 최유석 20170912
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1 나무기술(주) 최유석 20170912Yooseok Choi
 
라즈베리파이로 보일러 제어하기
라즈베리파이로 보일러 제어하기라즈베리파이로 보일러 제어하기
라즈베리파이로 보일러 제어하기Tai Hoon KIM
 
Lablupconf session8 "Paving the road to AI-powered world"
Lablupconf session8 "Paving the road to AI-powered world"Lablupconf session8 "Paving the road to AI-powered world"
Lablupconf session8 "Paving the road to AI-powered world"Lablup Inc.
 
201210 그루터 빅데이터_플랫폼_아키텍쳐_및_솔루션_소개
201210 그루터 빅데이터_플랫폼_아키텍쳐_및_솔루션_소개201210 그루터 빅데이터_플랫폼_아키텍쳐_및_솔루션_소개
201210 그루터 빅데이터_플랫폼_아키텍쳐_및_솔루션_소개Gruter
 
하이퍼레저 프로젝트 개요
하이퍼레저 프로젝트 개요하이퍼레저 프로젝트 개요
하이퍼레저 프로젝트 개요TIMEGATE
 
하이퍼레저 프로젝트 개요
하이퍼레저 프로젝트 개요하이퍼레저 프로젝트 개요
하이퍼레저 프로젝트 개요Seung-Woo Kang
 
[Koss Con 2016] CloudBread Tutorial PT
[Koss Con 2016] CloudBread Tutorial PT[Koss Con 2016] CloudBread Tutorial PT
[Koss Con 2016] CloudBread Tutorial PT윤석 홍
 

Similar to 7. Application - Hive Bucket (20)

NetApp AI Control Plane
NetApp AI Control PlaneNetApp AI Control Plane
NetApp AI Control Plane
 
2020년 4월 18일 개발 이야기 정리
2020년 4월 18일 개발 이야기 정리2020년 4월 18일 개발 이야기 정리
2020년 4월 18일 개발 이야기 정리
 
Distributed Programming Framework, hadoop
Distributed Programming Framework, hadoopDistributed Programming Framework, hadoop
Distributed Programming Framework, hadoop
 
Real-time Big Data Analytics Practice with Unstructured Data
Real-time Big Data Analytics Practice with Unstructured DataReal-time Big Data Analytics Practice with Unstructured Data
Real-time Big Data Analytics Practice with Unstructured Data
 
성공적인 게임 런칭을 위한 비밀의 레시피 #3
성공적인 게임 런칭을 위한 비밀의 레시피 #3성공적인 게임 런칭을 위한 비밀의 레시피 #3
성공적인 게임 런칭을 위한 비밀의 레시피 #3
 
어그로월드 Season1 - Aggro World season 1
어그로월드 Season1 - Aggro World season 1어그로월드 Season1 - Aggro World season 1
어그로월드 Season1 - Aggro World season 1
 
제로부터시작하는 Git 두번째 이야기
제로부터시작하는 Git 두번째 이야기제로부터시작하는 Git 두번째 이야기
제로부터시작하는 Git 두번째 이야기
 
Jco 소셜 빅데이터_20120218
Jco 소셜 빅데이터_20120218Jco 소셜 빅데이터_20120218
Jco 소셜 빅데이터_20120218
 
[아이펀팩토리] 2018 데브데이 서버위더스 _01 HTML5/WebSocket으로 Pong 게임 만들기
[아이펀팩토리] 2018 데브데이 서버위더스 _01 HTML5/WebSocket으로 Pong 게임 만들기[아이펀팩토리] 2018 데브데이 서버위더스 _01 HTML5/WebSocket으로 Pong 게임 만들기
[아이펀팩토리] 2018 데브데이 서버위더스 _01 HTML5/WebSocket으로 Pong 게임 만들기
 
서버 H/W, S/W 인벤토리 Auto Discovery 솔루션
서버 H/W, S/W 인벤토리 Auto Discovery 솔루션서버 H/W, S/W 인벤토리 Auto Discovery 솔루션
서버 H/W, S/W 인벤토리 Auto Discovery 솔루션
 
Portfolio
PortfolioPortfolio
Portfolio
 
Cloud-Barista 제1차 오픈세미나 - CB-Spider : 멀티 클라우드 인프라 연동 프레임워크(1st Open Seminar, ...
Cloud-Barista 제1차 오픈세미나 - CB-Spider : 멀티 클라우드 인프라 연동 프레임워크(1st Open Seminar, ...Cloud-Barista 제1차 오픈세미나 - CB-Spider : 멀티 클라우드 인프라 연동 프레임워크(1st Open Seminar, ...
Cloud-Barista 제1차 오픈세미나 - CB-Spider : 멀티 클라우드 인프라 연동 프레임워크(1st Open Seminar, ...
 
Introduction to Hadoop, Big Data, Training, Use Cases
Introduction to Hadoop, Big Data, Training, Use CasesIntroduction to Hadoop, Big Data, Training, Use Cases
Introduction to Hadoop, Big Data, Training, Use Cases
 
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1 나무기술(주) 최유석 20170912
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1  나무기술(주) 최유석 20170912Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1  나무기술(주) 최유석 20170912
Bigquery와 airflow를 이용한 데이터 분석 시스템 구축 v1 나무기술(주) 최유석 20170912
 
라즈베리파이로 보일러 제어하기
라즈베리파이로 보일러 제어하기라즈베리파이로 보일러 제어하기
라즈베리파이로 보일러 제어하기
 
Lablupconf session8 "Paving the road to AI-powered world"
Lablupconf session8 "Paving the road to AI-powered world"Lablupconf session8 "Paving the road to AI-powered world"
Lablupconf session8 "Paving the road to AI-powered world"
 
201210 그루터 빅데이터_플랫폼_아키텍쳐_및_솔루션_소개
201210 그루터 빅데이터_플랫폼_아키텍쳐_및_솔루션_소개201210 그루터 빅데이터_플랫폼_아키텍쳐_및_솔루션_소개
201210 그루터 빅데이터_플랫폼_아키텍쳐_및_솔루션_소개
 
하이퍼레저 프로젝트 개요
하이퍼레저 프로젝트 개요하이퍼레저 프로젝트 개요
하이퍼레저 프로젝트 개요
 
하이퍼레저 프로젝트 개요
하이퍼레저 프로젝트 개요하이퍼레저 프로젝트 개요
하이퍼레저 프로젝트 개요
 
[Koss Con 2016] CloudBread Tutorial PT
[Koss Con 2016] CloudBread Tutorial PT[Koss Con 2016] CloudBread Tutorial PT
[Koss Con 2016] CloudBread Tutorial PT
 

More from merry7

15. Application - Solr Indexing & Searching
15. Application - Solr Indexing & Searching15. Application - Solr Indexing & Searching
15. Application - Solr Indexing & Searchingmerry7
 
14. Install - Solr
14. Install - Solr14. Install - Solr
14. Install - Solrmerry7
 
12. Application - Python + Pandas
12. Application - Python + Pandas12. Application - Python + Pandas
12. Application - Python + Pandasmerry7
 
13. Application - Tensorflow Autoencoder
13. Application - Tensorflow Autoencoder 13. Application - Tensorflow Autoencoder
13. Application - Tensorflow Autoencoder merry7
 
11. Application - Phoenix
11. Application - Phoenix11. Application - Phoenix
11. Application - Phoenixmerry7
 
10. Install - Phoenix
10. Install - Phoenix10. Install - Phoenix
10. Install - Phoenixmerry7
 
3. Install - Tensorflow
3. Install - Tensorflow3. Install - Tensorflow
3. Install - Tensorflowmerry7
 

More from merry7 (7)

15. Application - Solr Indexing & Searching
15. Application - Solr Indexing & Searching15. Application - Solr Indexing & Searching
15. Application - Solr Indexing & Searching
 
14. Install - Solr
14. Install - Solr14. Install - Solr
14. Install - Solr
 
12. Application - Python + Pandas
12. Application - Python + Pandas12. Application - Python + Pandas
12. Application - Python + Pandas
 
13. Application - Tensorflow Autoencoder
13. Application - Tensorflow Autoencoder 13. Application - Tensorflow Autoencoder
13. Application - Tensorflow Autoencoder
 
11. Application - Phoenix
11. Application - Phoenix11. Application - Phoenix
11. Application - Phoenix
 
10. Install - Phoenix
10. Install - Phoenix10. Install - Phoenix
10. Install - Phoenix
 
3. Install - Tensorflow
3. Install - Tensorflow3. Install - Tensorflow
3. Install - Tensorflow
 

7. Application - Hive Bucket

  • 1. 빅데이터 ~ 머신(딥)러닝 실무로 배우는 빅데이터 기술  Hive Bucket 활용 ☆ 확장하기 – 7편 ☆ 김강원
  • 2. Hive Bucket(버켓) 은? 버켓으로 지정된 필드의 데이터들을 해싱값 기준으로 버켓팅(그룹핑)해 저장함으로써 효율적인 Hive 쿼리를 지원 ※ Hive의 기본 개념과 기능들은 구글링을 통해 확인 하세요!
  • 4. 책 246 페이지 중에서… (개정판) Bucket 활용 파일럿 프로젝트 확장 (2/2)
  • 6.  Hue > Hive 에디터 접속 URL: http://server02.hadoop.com:8888 Hue Home > Query Editor > Hive Step-1  버켓팅할 데이터를 Hive QL로 확인 SELECT * FROM smartcar_master; Step-2  버켓팅할 데이터를 파일 브라우져로 확인 파일 브라우져 > /pilot-pjt/collect/car-master Step-3
  • 7.  버켓팅할 테이블 생성 set hive.enforce.bucketing = true; CREATE TABLE smartcar_master_bucketed ( car_number String, sex String, age String, marriage String, region String, job String, car_capacity String, car_year String, car_model String ) CLUSTERED BY (car_number) SORTED BY(car_number ASC) INTO 10 BUCKETS ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'; Step-4  버켓팅된 테이블에 데이터 생성 INSERT OVERWRITE TABLE smartcar_master_bucketed SELECT * FROM smartcar_master; Step-5
  • 8.  버켓팅된 데이터를 파일 브라우져로 확인 파일 브라우져 > /user/hive/warehouse/smartcar_master_bucketed Step-6  버켓을 이용해 데이터 샘플링 SELECT * FROM smartcar_master_bucketed TABLESAMPLE (bucket 1 out of 10 on region); Step-7
  • 9. 실무로 배우는 빅데이터 기술 확장하기 7편 – Hive Bucket 활용 [ 강의자료 ]  동 영 상: 유튜브 www.youtube.com  실습문서: 슬라이드쉐어 www.slideshare.net