Catalog.
functionExists
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.
name of the function to check existence
Changed in version 3.4.0: Allow functionName to be qualified with catalog name
functionName
name of the database to check function existence in.
Indicating whether the function exists
Notes
If no database is specified, the current database and catalog are used. This API includes all temporary functions.
Examples
>>> spark.catalog.functionExists("count") True
Using the fully qualified name for function name.
>>> spark.catalog.functionExists("default.unexisting_function") False >>> spark.catalog.functionExists("spark_catalog.default.unexisting_function") False