impala-shell
--
--
/**/
[impala] > -- This is a test comment
> SHOW TABLES LIKE 't*';
${variable_name}$--\${hello}
--var=variable_name=value
-f
SETVAR:variable_name=value
impala-shell
${VAR:variable_name}
注意:
-q
-f
-q
${var:value}
$ impala-shell --var=tname=table1 --var=colname=x --var=coltype=string -q 'CREATE TABLE ${var:tname} (${var:colname} ${var:coltype}) STORED AS PARQUET'
Query: CREATE TABLE table1 (x STRING) STORED AS PARQUET
--var
SET
$ impala-shell --quiet --var=tname=table1
[impala] > SELECT COUNT(*) FROM ${var:tname};
[impala] > SET VAR:tname=table2;
[impala] > SELECT COUNT(*) FROM ${var:tname};