-
-
Save evanfrisch/2a5a7bafb46f811c6305ae0343f0b8b3 to your computer and use it in GitHub Desktop.
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 | |
OUTPUTFILE=$1 | |
SQLFILE=$2 | |
STARTDATE=$3 | |
ENDDATE=$4 | |
bq query -q --headless --format=csv --use_legacy_sql=false --max_rows=10000000 --parameter start_date:TIMESTAMP:$STARTDATE --parameter end_date:TIMESTAMP:$ENDDATE > ~/$OUTPUTFILE "$(< ${SQLFILE})" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment