Skip to content

Commit

Permalink
Output Databricks CLI error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
algattik committed Jul 23, 2019
1 parent f0b3825 commit ab27917
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion streaming/databricks/job/run-databricks-job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ echo "starting Databricks notebook job for $notebook_name" | tee -a log.txt

job_def=$(cat ../streaming/databricks/job/job-config.json | jq "$cluster_jq_command" | jq "$job_jq_command")

job=$(databricks jobs create --json "$job_def")
if ! job=$(databricks jobs create --json "$job_def"); then
#Databricks CLI outputs any error message to stdout rather than stderr, intercept that
echo $job >&2
exit 1
fi
job_id=$(echo $job | jq .job_id)

run=$(databricks jobs run-now --job-id $job_id)
Expand Down

0 comments on commit ab27917

Please sign in to comment.