Using a SQL source file with the bigquery cli
If you're using unix (or have cygwin installed on windows), you can use xargs:
xargs -a my_query.sql -0 bq query
Alternately you can use back-ticks:
bq query `cat my_query.sql`
Note that bq can only process one command at a time -- if your .sql script has several queries, you'll need to split the file on ;