code: def file(path, format='csv', csv_delimiter=',', csv_header=True, compress=False,
             use_cache=True):
      
      output = QueryOutput()
      output._output_type = 'file'
      output._file_path = path
      output._file_format = format
      output._csv_delimiter = csv_delimiter
      output._csv_header = csv_header
      output._compress_file = compress
      return output
docs: Construct a query output object where the result is either a local file or a GCS path
  
      Note that there are two jobs that may need to be run sequentially, one to run the query,
      and the second to extract the resulting table. These are wrapped by a single outer Job.
  
      If the query has already been executed and you would prefer to get a Job just for the
      extract, you can can call extract[_async] on the QueryResultsTable returned by the query
  
      Args:
        path: the destination path. Can either be a local or GCS URI (starting with gs://)
        format: the format to use for the exported data; one of 'csv', 'json', or 'avro'
            (default 'csv').
        csv_delimiter: for CSV exports, the field delimiter to use (default ',').
        csv_header: for CSV exports, whether to include an initial header line (default True).
        compress: whether to compress the data on export. Compression is not supported for
            AVRO format (default False). Applies only to GCS URIs.
        use_cache: whether to use cached results or not (default True).