Monday
Impala-shell 변수 사용하기 본문
report.sql이란 파일이 다음과 같이 저장되어 있을 때 impala-shell을 통해서 사용하는 법을 보여드리겠습니다.
# report.sql
SELECT * FROM accounting.current WHERE month= '$var:month}'
or
# report.sql (변수 선언 포함)
SET var:month = October;
SELECT * FROM accounting.current WHERE month= '${var:month}'
사용법
$ impala-shell --var month="October" -f report.sql
'빅데이터 > Impala' 카테고리의 다른 글
Apache Impala: 혁신적인 Hadoop SQL 쿼리 엔진의 탄생 (0) | 2024.11.24 |
---|---|
Impala Union 사용 (0) | 2021.03.21 |
Comments