You are viewing documentation about an older version (1.5.0). View latest version

snowflake.snowpark.types.StringType

class snowflake.snowpark.types.StringType(length: int | None = None)[source] (https://github.com/snowflakedb/snowpark-python/blob/release-v1.5.0/src/snowflake/snowpark/types.py#L69-L109)

Bases: _AtomicType

String data type. This maps to the VARCHAR data type in Snowflake.

A StringType object can be created in the following ways:

>>> string_t = StringType(23)  # this can be used to create a string type column which holds at most 23 chars
>>> string_t = StringType()    # this can be used to create a string type column with maximum allowed length
Copy
语言: 中文