snowflake-connector-python
snowflake-connector-python copied to clipboard
SNOW-872017: Add wrapper function to encapsulate the result from write_pandas into a dataclass
What is the current behavior?
Currently, the result of write_pandas is tuple with multiple data types.
What is the desired behavior?
Addition of a new function that maps the result tuple to a dataclass with named attributes.
@dataclass
class WritePandasResult:
success: bool
num_chunks: int
num_rows: int
output: Sequence
How would this improve snowflake-connector-python
?
Improve the readability of the existing code. This type of change would allow for the code to be self documenting in place of digging through the documentation to determine the purpose of each element of the tuple.
References and other background
No response
This is a good suggestion and we will work on it in the future. If you are willing to help, please create a PR and we would review and merge it for you
@sfc-gh-aalam do you know if you require DCO or CLA when submitting a PR?