Search code examples
shellhadoophiveimpala

Tell Impala to ignore errors and continue


I am trying to run a long refresh script using shell nohup,

Script

#!/bin/bash
impala-shell -f Refresh.sql -i "landingarea"

But every time it hits an error it stops, I have to go into the script fix the error and re run from the beginning, id like it to just run to the end and I can pick up the errors, is this possible?

Shell

nohup sh Refresh.sh cat nohup.out 

Solution

  • Please use -c Continues on query failure.

    impala-shell -f -c Refresh.sql -i "landingarea"
    

    if you donot want to capture the verbose/error message you can problably include --quiet option

     impala-shell -f -c -quiet Refresh.sql -i "landingarea"
    

    Please go though the documentation link below for more information.

    http://www.cloudera.com/documentation/cdh/5-1-x/Impala/Installing-and-Using-Impala/ciiu_shell_options.html