Im running bigquery table extract to google clous storage by use extract job.
with compression:'GZIP' option
but it's not work.
it is extracted as plane csv file in gcs. not gzip file.
It works yesterday.
but not works today.
Im running bigquery table extract to google clous storage by use extract job.
with compression:'GZIP' option
but it's not work.
it is extracted as plane csv file in gcs. not gzip file.
It works yesterday.
but not works today.
As commented, it's due to GCS' decompressive transcoding. I think it's a bug that the BQ compressed export ends up as uncompressed. We'll see if they change it during the day.
Workaround: Reset the header
gsutil setmeta -h "Content-Encoding: "gs://bucket_name/path/*.gz
Public tracker: https://issuetracker.google.com/issues/113252895
I experienced the same problem today. It seems Google BigQuery saves the files now by default in the Google cloud bucket in such format that albeit they are compressed in your bucket, allows from their files metadata for Google cloud storage to uncompress them when downloading them ( also called as decompressive transcoding). I found a solution to my problem, not from BigQuery api, but cloud storage api.
Before I run:
blob.download_to_file(file name)
I use:
blob.cache_control = ‘no-transform’
That seems to fix my problem. By the way, the solution above is for Google-Cloud-Python. Your tools may be different, but I hope I helped someone. Other tools may have similar solutions to the tool I am using, so this could help.