pyspark.sql.Catalog.listFunctions¶
-
Catalog.
listFunctions
(dbName: Optional[str] = None, pattern: Optional[str] = None) → List[pyspark.sql.catalog.Function][source]¶ Returns a list of functions registered in the specified database.
New in version 3.4.0.
- Parameters
- dbNamestr
name of the database to list the functions.
dbName
can be qualified with catalog name.- patternstr
The pattern that the function name needs to match.
- Returns
- list
A list of
Function
.
Notes
If no database is specified, the current database and catalog are used. This API includes all temporary functions.
Examples
>>> spark.catalog.listFunctions() [Function(name=...
>>> spark.catalog.listFunctions(pattern="to_*") [Function(name=...
>>> spark.catalog.listFunctions(pattern="*not_existing_func*") []