Comment
Databricks Employee
Databricks Employee

The definition of a session variable is not persisted in a catalog.
Therefor the function (or view) cannot assert a dependency on its existence.
This is similar to the inability reference a temporary function or view.
The long term solution is to support a feature which CREATE VARIABLEs in the catalog.
The content would still be session private, but the definition would be guaranteed to exist for all sessions.