snowflake.snowpark.types.YearMonthIntervalType¶
- class snowflake.snowpark.types.YearMonthIntervalType(start_field: Optional[int] = None, end_field: Optional[int] = None)[source]¶
Bases:
_AnsiIntervalTypeYearMonthIntervalType data type. This maps to the INTERVAL YEAR TO MONTH data type in Snowflake.
- Parameters:
start_field – The start field of the interval (0=YEAR, 1=MONTH)
end_field – The end field of the interval (0=YEAR, 1=MONTH)
Notes
YearMonthIntervalType is currently in private preview since 1.38.0. It needs to be enabled by setting parameter FEATURE_INTERVAL_TYPES to ENABLED.
YearMonthIntervalType is currently not supported in UDFs and Stored Procedures.
Methods
jsonValue()json_value()simpleString()simple_string()Attributes
MONTHConstant representing the MONTH field for interval start/end positions
YEARConstant representing the YEAR field for interval start/end positions