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

Feature request - additional arguments to write_object #30

Open
ampx-mg opened this issue Jan 16, 2023 · 1 comment
Open

Feature request - additional arguments to write_object #30

ampx-mg opened this issue Jan 16, 2023 · 1 comment

Comments

@ampx-mg
Copy link
Collaborator

ampx-mg commented Jan 16, 2023

It would be nice to be able to specify additional arguments for specific format in write_object. The desired state would be to be able to run something similar to

df.to_csv(file_name, index=False)

Similarly to how engine is solved I can imagine either expanding format_options or adding a new argument, e.g. format_kwargs and then have smth like

write_object(url, df, format="csv", format_kwargs={"index": False}
@vojtechtuma-imi
Copy link
Contributor

I have to admit that I don't like this :), including the already present engine etc. This is a wrong abstraction, where we are putting fsql in front of existing different incompatible layers, forcing it to adopt all their API idiosyncracies

what I'd like to do instead is to get a get_file_descriptor(url) which you would then use in any function you like (df.to_csv, df.to_parquet, etc); or, in case we'll ever support partitioned writing, to have write_partitioned_df(url_base, partition_columns, single_partition_writer: Callable[[fd, df], None])

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

2 participants