Skip to content

Naively roundtrip parquet data from Spark #4096

Closed

Description

@mrocklin

Currently it is not easy to roundtrip data between Spark and Dask Dataframe with Parquet. There are a variety of details one needs to know to do this well. This would be a good case study to improve our usability.

cc @martindurant

Activity

  1. mrocklin commented on Oct 13, 2018

    @mrocklin
    MemberAuthor

    In particular I'm thinking that the following should probably just work for a variety of data types.

    spark_df.write.parquet(fn)
    dask_df = dd.read_parquet(fn)
    
    dask_df.to_parquet(fn2)
    spark.read.parquet(fn2)
  2. martindurant commented on Oct 13, 2018

    @martindurant
    Member

    Fastparquet does have a number of tests specifically for spark round-tripping: https://github.com/dask/fastparquet/blob/master/fastparquet/test/test_aroundtrips.py
    (these are without dask's part, of course)

  3. mrocklin commented on Oct 13, 2018

    @mrocklin
    MemberAuthor

    Understood. To be clear, I'm not speaking about fastparquet, I'm talking about dask.dataframe. My attempt to recreate the workflow above failed with dask dataframe. I think that this is a fairly important issue.

  4. martindurant commented on Oct 13, 2018

    @martindurant
    Member

    Yes, agree, just thought I'd point it out, the FP tests might serve as a starting point. Would be easy to write out a set of tests like this (not for CI, though, probably), and then fix for FP and Arrow, as needed.

  5. mrocklin commented on Oct 13, 2018

    @mrocklin
    MemberAuthor
  6. martindurant commented on Oct 13, 2018

    @martindurant
    Member

    It's on the list...

  7. xhochy commented on Oct 16, 2018

    @xhochy
    Contributor

    We also have a flavor='spark' argument in pyarrow which handles some of the limitations that the Spark Parquet implementation has. Sadly there are still some features of Parquet that pyarrow uses but Spark cannot handle.

  8. mrocklin commented on Oct 16, 2018

    @mrocklin
    MemberAuthor
  9. jakirkham commented on Apr 30, 2019

    @jakirkham
    Member

    Is this still of interest?

  10. martindurant commented on Apr 30, 2019

    @martindurant
    Member

    Could be contemplated in the context of #4336 , but interop with arrow more important now that spark per se (plus pyspark's inherent limitations) - so maybe the issue of rountripping to spark should be something that they care about more than we do. In any case, I don't think there are any plans to work on this. I am ambivalent on whether to close.

  11. mrocklin commented on Apr 30, 2019

    @mrocklin
    MemberAuthor
  12. assigned and unassigned on Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions