Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Aggregate script
#!/bin/bash
if [ -z "$1" ]; then echo "Must supply DATE."; exit; fi
DATE="$1"
PIG_SCRIPT="aggregate.pig"
# totals are recalculated every time the script is executed
rm -rf totals
rm -rf daily/by_station/ds=$DATE
CMD=$(cat <<EOS
pig $PIG_OPTIONS -l /tmp -x local -p DATE=$DATE -f $PIG_SCRIPT
EOS)
echo $CMD
$CMD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment