Search code examples
hadoopcloudera-cdhimpala

Is there any way to run impala shell with sql script with parameters?


Is there any way to run impala shell with SQL script with parameters?

For example:

impala-shell -f /home/john/sql/load.sql /dir1/dir2/dir3/data_file

I got errors:

Error, could not parse arguments "-f /home/john/sql/load.sql /dir1/dir2/dir3/data_file”


Solution

  • No, you can specify a file of sql statements with -f, but it does not take a file of parameters. See the impala-shell documentation for more details: http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/impala_impala_shell.html