Use native parameters for safe query execution
mainThe Databricks SQL Connector supports native parameterized query execution. Instead of the connector escaping strings and rendering them inline (the legacy behavior), native parameters send variable markers and a separate collection of values to the Databricks Runtime. This prevents SQL injection and allows the server to cache prepared statements for better performance.
Requirements:
databricks-sql-connector>=3.0.0- A SQL warehouse or all-purpose cluster running Databricks Runtime >=14.2
Limitations:
- Maximum of 255 parameter markers per query.
- Total size of all parameterized values cannot exceed 1MB.
- Native parameters are not supported for volume operations like
PUT.