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

Cannot write parquet in an S3 path that includes white spaces when using ray #2788

Open
andreaschiappacasse opened this issue Apr 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@andreaschiappacasse
Copy link

andreaschiappacasse commented Apr 23, 2024

When using ray, trying to write a parquet file to a path that includes spaces an error is returned.
i.e.
ArrowInvalid: Expected a local filesystem path, got a URI: 's3://mybucket/path with space/table/a=a/'
This is particularly annoying since the same happens if a partition col includes values with spaces.

How to Reproduce

import awswrangler as wr
wr.engine.set("ray")
import pandas as pd


data = pd.DataFrame({'a':['a','b','c'],'b':['a - 1','b - 1','c - 1']}, columns=['a','b'])


wr.s3.to_parquet(
    df=data,
    path=F"s3://mybucket/path with space/table",
    dataset=True,
    mode="overwrite_partitions",
    partition_cols=['a'],
    database='mydb',
    table="test_arrow",
)

Expected behavior

The write should be successful, as with the python engine.

OS

Windows

Python version

3.10

AWS SDK for pandas version

3.3.0

Additional context

pyarrow 13.0.0
ray 2.3.0

@andreaschiappacasse andreaschiappacasse added the bug Something isn't working label Apr 23, 2024
@jaidisido
Copy link
Contributor

This seems like a problem related to the PyArrow filesystem resolution. I have opened apache/arrow#41365 with them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants