I use the bq command line tool to run queries, e.g:
bq
bq query "select * from table"
What if I store the query in a file
There is another way.
Try this:
bq query --flagfile=[your file with absolute path]
Ex:
bq query --flagfile=/home/user/abc.sql