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

SNOW-872017: Add wrapper function to encapsulate the result from write_pandas into a dataclass #1650

Open
DJ-DropTable opened this issue Jul 19, 2023 · 2 comments

Comments

@DJ-DropTable
Copy link

DJ-DropTable commented Jul 19, 2023

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

@github-actions github-actions bot changed the title Add wrapper function to encapsulate the result from write_pandas into a dataclass SNOW-872017: Add wrapper function to encapsulate the result from write_pandas into a dataclass Jul 19, 2023
@sfc-gh-aalam
Copy link
Collaborator

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

@DJ-DropTable
Copy link
Author

@sfc-gh-aalam do you know if you require DCO or CLA when submitting a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants