How to create SQL Functions using Pysparkin local machine

badari_narayan
Databricks Partner

I am trying to create spark SQL function in particular schema 

(i.e) 

spark.sql(" CREATE OR REPLACE FUNCTION <spark_catalog>.<schema_name>.<function_name()> RETURNS STRING RETURN <value>")

This works perfectly fine on Databricks using notebooks.

But, I need to use this same in my project which is to run in local machine (VScode). But I am facing issues. Please advise me on how to implement this in my local machine.