I'm exporting a bigquery table as a CSV to a public Google Cloud bucket. From there I can host it publicly over HTTP. The BigQuery export (aka extract) feature doesn't seem to set the file's Google Cloud Storage metadata correctly.
The exporter sets the Content-Type field to be application/octet-stream
. Because it's a CSV file, I want it to be set to text/csv
(or maybe text/plain
). Why? As google outlines here, that's a best practice for a variety of reasons.
I don't see any option in the api documentation to control this.
Another issue: when I set configuration.extract.compression
to be GZIP
, the resulting file in GCS doesn't have the Content-Encoding
property set to 'gzip'. It would be nice if the exporter did that too!