Skip to content

SNOW-2216201: Allow for passing pyarrow schema to write_pandas #2416

@Seminko

Description

@Seminko

What is the current behavior?

I have a dataframe where one column holds python dicts. When I want to import it to snowflake using write_pandas it fails on memory (basically eats up all the memory and then fails on malloc).

To solve this I have to define a custom pyarrow schema. However I am unable to pass it as a kwarg to write_pandas because schema is already a named parameter.

Here's the complete flow:

pandas_tools.py
def write_pandas
chunk.to_parquet(chunk_path, compression=compression, **kwargs) # <-- if I pass schema=my_pyarrow_schema here, it works fine, but I cant because write_pandas already has a parameter named schema

What is the desired behavior?

Be able to pass pyarrow schema to write_pandas

How would this improve snowflake-connector-python?

Allow for non-standard dfs to be imported into SF.

References and other background

No response

Metadata

Metadata

Labels

featurestatus-triage_doneInitial triage done, will be further handled by the driver team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions