Aws-data-wrangler: Support for automatic index and timezone recovery from Parquet files.

Created on 27 Aug 2020  路  5Comments  路  Source: awslabs/aws-data-wrangler

When Parquet files are created by Wrangler/Pandas some metadata are stored into the file with hints about how to reconstruct Indexes correctly or how to localize a datetime column with a specific time zone.

  • [X] When wr.s3.to_parquet(index=True) we want to preserve the current behaviour of materialize the index(es) as a parquet column. This is important because non materialised index(es) will not be detected by engines such Spark, PrestoDB, Redshift Spectrum, Athena, Hive, etc.
  • [X] Support for index(es) recovery following Pandas metadata injected in the files.
  • [X] Support for MultiIndex
  • [X] Support for RangeIndex
  • [X] Support for datetime timezone recovery.

Related commits:

Original discussion: https://github.com/awslabs/aws-data-wrangler/pull/339

cc: @alexifm @Digma

Ready to release feature

Most helpful comment

Hey, I think this is awesome! I tested it out a bunch with different index types and partitions and I think the only round trip issues I found are known pyarrow issues, mostly relating to categoricals. Specific to what the wrangler is responsible for, I can't find any issues.

I did not test anything with the timezones.

All 5 comments

@alexifm @Digma

I've just added support for what we discussed previously.

Do you mind to test it from our development branch and check if it helps in your use case?
The ideia is to publish this enhancement in the version 1.9.0 later this week.

pip install git+https://github.com/awslabs/aws-data-wrangler.git@dev

Hey, I think this is awesome! I tested it out a bunch with different index types and partitions and I think the only round trip issues I found are known pyarrow issues, mostly relating to categoricals. Specific to what the wrangler is responsible for, I can't find any issues.

I did not test anything with the timezones.

Released on version 1.9.0

Thanks for releasing. I was off so I did not had time to test it but great that you went ahead and released that 馃憤

Tested it and everything seems to work ok for us. Thanks again!

Was this page helpful?
0 / 5 - 0 ratings