databuild/examples/multihop/job_beta.sh

27 lines
775 B
Bash
Executable file

#!/bin/bash
# Job Beta: Produces data/beta partition
# Depends on data/alpha from job_alpha
echo "Job Beta starting..." >&2
echo " Building partitions: $@" >&2
echo " Environment: JOB_NAME=$JOB_NAME" >&2
# Check if data/alpha marker exists (this would be real data in a real system)
ALPHA_MARKER="/tmp/databuild_multihop_alpha_complete"
if [ ! -f "$ALPHA_MARKER" ]; then
echo " Missing dependency: data/alpha" >&2
# Report missing dependency
echo 'DATABUILD_MISSING_DEPS_JSON:{"version":"1","missing_deps":[{"impacted":[{"ref":"data/beta"}],"missing":[{"ref":"data/alpha"}]}]}'
exit 1
fi
echo " Found dependency: data/alpha" >&2
# Simulate some work
sleep 0.5
# Output success - no special output needed, just exit 0
echo "Job Beta complete!" >&2