This official document and this stackoverflow answer here talks about exporting a table to cloud storage and then downloading it. An answer to this stackoverflow question confirms that exporting few columns is not possible.
However, I think there is another simple way do this. Make a query (bq) using CLI and redirect the output to a text file. I tried and it worked.
- However, I got only 100 rows as output.
- So, next I used the flag --max_rows and set the maximum number of rows as desired.
- Did the size estimation of the output with
--dry_runflag and the output was well within all the limits. - This time also the query returned
Donebut nothing was outputed (redirecting stdout) in the file.
Not sure why? Any help will be appreciated. If you want I can share the queries too. Please let me know if anymore information is needed.