master notebook cannot find the udf registered in the child notebook

andrew0117
Contributor

The master notebook is calling a child notebook using

dbutils.notebook.run("PathToChildnotebook")

. The child notebook defines a user-defined function (UDF) and registers it using

spark.udf.register

. However, when the child notebook finishes running and returns to the master notebook, the UDF cannot be found and the master notebook encounters an error when it tries to use the UDF?