code: def _to_query_json(self):
      
      json = {
        'compression': 'GZIP' if self._compressed else 'NONE',
        'ignoreUnknownValues': self._ignore_unknown_values,
        'maxBadRecords': self._max_bad_records,
        'sourceFormat': self._bq_source_format,
        'sourceUris': self._source,
      }
      if self._source_format == 'csv' and self._csv_options:
        json['csvOptions'] = {}
        json['csvOptions'].update(self._csv_options._to_query_json())
      if self._schema:
        json['schema'] = {'fields': self._schema._bq_schema}
      return json
docs: Return the table as a dictionary to be used as JSON in a query job.