-
-
Save mjcreativeventures/1ea573e0519eac2fc320 to your computer and use it in GitHub Desktop.
Aggregate script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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