I tried to implement the if else condition in Airflow, if a condition is true then statements under this condition will execute. In the else part the statements will not execute and return the task as failed
"a=0;"
"if [[$a -ge "1"]] ; then"
" echo 'Job Success';"
"else "
" echo 'Need Investigation';"
" exit 0;"
"fi;"
Here, If a is equal to 1 then the echo statement 'Job Success' is printed If a is equal to 0 then the echo statement is not printed and the respective Airflow Dag is marked as failed