Accessing parameter defined in python notebook into sql notebook.

sensanjoy
Contributor II

Hi All,

I have one python notebook(../../config/param_notebook), where all parameters are defined, like:

dbutils.widgets.text( "catalog", "catalog_de")
spark.conf.set( "catalog.name", dbutils.widgets.get( "catalog"))

dbutils.widgets.text( "schema", "emp")
spark.conf.set( "schema.name", dbutils.widgets.get( "schema"))

In another SQL notebook, above parameters are used like below:

%run ../../config/param_notebook

select '${catalog.name}' as catalog,
'${schema.name}' as schema

use ${catalog.name};
select * from ${schema.name}.emp_details;

Since ${param} is deprecated in databricks, what would be the best approach to make minimal changes for all sql notebook to accommodate new changes. Thanks.