Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system-defined vs user-defined metadata for Content-Encoding on S3 object misses gzip #15

Open
jleto opened this issue Jul 17, 2021 · 0 comments

Comments

@jleto
Copy link
Contributor

jleto commented Jul 17, 2021

Screen Shot 2021-07-12 at 10 33 00 AM

Some tools like pyspark dataframe s3 write does not set AWS system-defined metadata when writing and specifying "gzip" compression. Postgres s3_import extension fails to identify gzip file as gzip compressed. This results in a UTF-8 encoding error (reported byte sequence is the start of a gzip byte sequence). The real error is that postgres did not recognize it as gzip encoding and attempted to process it like an uncompresed text file.

If you attempt to add "Content-Encoding" = "gzip" metadata programmatically, this is added as user-defined metadata. When viewing this metadata via the AWS console after adding this metadata is appears with the key name of "x-amz-meta-content-encoding" and this is not tested for in the extension code.

I will submit a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant