Search code examples
linuxshimpala

Impala-shell Command Argument List Too Long


I have a 1,700 lines query to be executed in Impala-shell. I created a shell script with below command:

impala-shell -V -i hostname -q "[QUERY]"

However, when I executed it using sh script.sh, I got the error message "Argument list too long". I am able to run simpler/short query using Impala-shell command.

I also tried to enlarge the limit by running command ulimit -s 65536 but I got the same error.

I suspect the number of lines of the query is too big.


Solution

  • -f option is the answer. I prepared a separate SQL file and it worked. impala-shell -V -i hostname -f file.sql