pyspark.sql.Catalog.listFunctions#
- Catalog.listFunctions(dbName=None, pattern=None)[source]#
Returns a list of functions registered in the specified database.
New in version 3.4.0.
- Parameters
- dbNamestr, optional
name of the database to list the functions.
dbName
can be qualified with catalog name.- patternstr, optional
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*") []