쿼리 파일로 쿼리 실행하기
파일에 쿼리를 작성하고 파일을 로딩하여 쿼리를 실행하기 위해서 다음의 커맨드를 사용할 수 있습니다.
# impala-shell.sh -i impala-host -f query.sql
Partition Key 지정하기
테이블 생성시 Partition Key를 지정하려면 다음과 같이 테이블을 생성합니다.
create table logs ( field1 string, field2 string, field3 string ) partitioned by (year string, month string , day string, host string) row format delimited fields terminated by ','
데이터를 INSERT할 때에는 다음과 같이 Partition Key를 지정할 수 있습니다.
insert into logs partition (year="2013", month="07", day="28", host="host1") values ("foo","foo","foo");