Skip to content

SNOW-1866493: Add python_type property to SnowflakeType #562

@Econ808

Description

@Econ808

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)

Metadata

Metadata

Assignees

No one assigned

    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