Skip to content

Drive letter removed when writing parquet file #3561

Closed

Description

@frutti93

Hi everyone,

I encountered a problem while working with pyarrow: I am working on Windows 10. When I want to save a table using pq.write_table(tab, r'E:\parquetfiles'), I get the Error "No such file or directory".
After searching a bit, i found out that the drive letter is getting removed while parsing the where string, but I could not find a way solve my problem: I can write the files on my C:\ drive without problems, but I am not able to write a parquet file on another drive than C:.

Am I doing something wrong or is this just how it works? I would really appreciate any help, because I just cannot fit my files on C: drive.

Activity

  1. nevi-me commented on Feb 5, 2019

    @nevi-me
    Contributor

    I can reproduce the behaviour, specifically:

    pa.write_table(dataframe, "D:/path") ignores the drive name and defaults to C. In your case, it's looking for C:/parquetfiles.

    I then tried writing to a non-existent drive, but to a path that exists on my C drive (F:/Users/{myuser}/Desktop/file.parquet), and this writes to the C drive.

    Can you please open a JIRA (https://issues.apache.org/jira/browse/ARROW)?

  2. frutti93 commented on Feb 5, 2019

    @frutti93
    Author

    Thanks, just did:
    ARROW-4480

    As a workaround I now mounted my other harddrive as a folder on my C drive. This works, but does not resolve the core problem.

  3. rmoser commented on Mar 18, 2019

    @rmoser

    I was just about to file this issue, but I found I'm a bit late.

    FYI, another workaround is to change the working directory to the drive where you want to save files.

    So for your case above:

    os.chdir(r"D:")
    pa.write_table(dataframe, "D:/path")
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions