I am trying to convert a SQL stored procedure to databricks notebook. In the stored procedure below 2 statements are to be implemented. Here the tables 1 and 2 are delta lake tables in databricks cluster.
I want to use a python variable in place of max_date in SQL query. How to do it?
%sql
DELETE FROM table1 WHERE Date = max_date;
INSERT INTO table1
SELECT * FROM table2 WHERE Date = max_date;

Run Allor to run the NB as job, having widgets defined in a language different to the primary language is not recommended and doesn't fall within purpose of widgets.