mukul1409
Contributor II

hi @CHorton 
This is a known limitation when calling Databricks SQL user defined functions with parameters through the Spark ODBC driver. Positional parameters using question marks are supported in standard SQL statements, but they are not supported when used inside function calls, which is why the unbound SQL parameter error occurs. Databricks SQL currently expects parameters to be resolved before function evaluation and does not support parameter binding for UDF arguments through ODBC. A common workaround is to avoid parameterized function calls and instead rewrite the logic inline in the SQL query or use a view or table valued function that does not require runtime parameters. Another option is to construct the SQL string dynamically in the client application with the parameter value substituted, taking care to handle escaping safely.

Mukul Chauhan