snowflake.snowpark.functions.try_to_numeric¶
- snowflake.snowpark.functions.try_to_numeric(e: Union[Column, str], precision: Optional[int] = None, scale: Optional[int] = None, fmt: Optional[Union[Column, str]] = None) Column[source]¶
A special version of TO_DECIMAL that returns NULL instead of raising an error if the conversion cannot be performed. Snowflake’s TRY_TO_DECIMAL only accepts string input. If
scaleis given withoutprecision, the default precision of 38 is used. Also available astry_to_numberandtry_to_numeric.Example: