pyspark.sql.Catalog.functionExists¶
-
Catalog.
functionExists
(functionName: str, dbName: Optional[str] = None) → bool[source]¶ Check if the function with the specified name exists. This can either be a temporary function or a function.
New in version 3.3.0.
- Parameters
- functionNamestr
name of the function to check existence
- dbNamestr, optional
name of the database to check function existence in. If no database is specified, the current database is used
- Returns
- bool
Indicating whether the function exists
Examples
>>> spark.catalog.functionExists("unexisting_function") False