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-1866493: Add python_type property to SnowflakeType #562

Open
Econ808 opened this issue Dec 20, 2024 · 1 comment
Open

SNOW-1866493: Add python_type property to SnowflakeType #562

Econ808 opened this issue Dec 20, 2024 · 1 comment
Labels
feature status-triage_done Initial triage done, will be further handled by the driver team

Comments

@Econ808
Copy link

Econ808 commented Dec 20, 2024

What is the current behavior?

When calling TIMESTAMP_NTX().python_type an NotImplemented Error is raised

What is the desired behavior?

Return the relevant python type, e.g. dt.datetime for TIMESTAMP_NTZ and list for ARRAY etc.

How would this improve snowflake-connector-python?

  • It would follow the original design of sql types implemented by SQLAlchemy.
  • You can use the python_type to create pandas dataframes more reliably by passing the python type as a dtype argument (Sometimes a column might be inferred as an object when NULL values are present)
@github-actions github-actions bot changed the title Add python_type property to SnowflakeType SNOW-1866493: Add python_type property to SnowflakeType Dec 20, 2024
@sfc-gh-dszmolka
Copy link
Contributor

hi - thanks for filing this enhancement request, the team will evaluate

@sfc-gh-dszmolka sfc-gh-dszmolka added the status-triage_done Initial triage done, will be further handled by the driver team label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants