달나라 노트

Hive : hive.mapred.mode (Hive data full scan하기. partition 모두 조회하기) 본문

SQL/Apache Hive

Hive : hive.mapred.mode (Hive data full scan하기. partition 모두 조회하기)

CosmosProject 2021. 6. 4. 02:15
728x90
반응형

 

 

 

 

Hive에서는 기본적으로 partition이 있는 table은 partition 조건을 명시해야합니다.

(data full scan은 성능에 영향을 미칠 수 있기 때문이죠.)

만약 partition 조건을 명시하지 않으면 Error가 발생합니다.

 

 

 

그런데 사용하다보면 partition 조건 없이 table full scan을 해야하는 경우가 있죠.

 

set hive.mapred.mode = nonstrict;

이 경우 위처럼 hive.mapred.mode를 nonstrict 모드로 설정해주면 partition table에 대해서도 table full scan이 가능해집니다.

 

 

 

참고

위같은 option은 그냥 쿼리돌리듯이 돌리면 설정됩니다.

Apache Hive document = https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-Tez

 

Configuration Properties - Apache Hive - Apache Software Foundation

 

cwiki.apache.org

 

 

 

 

 

 

 

 

 

 

728x90
반응형
Comments