how to pull a parameter from .sql file with dbutils.notebook.run

carlos_tasayco
Contributor

Hi,

I want to use this:

result = dbutils.notebook.run('/Workspace/Usersxxxxt', 600, {"environment": inputEnvironment})
 
this pulls from this .sql file in that path:
DROP TEMPORARY VARIABLE IF EXISTS strEnv;
DECLARE VARIABLE strEnv STRING;
SET VARIABLE strEnv = '${inputEnvironment}';
This works with .py file with that sql code inside, but not if the file is .sql.
 
Someone has an inside why is failing?
 
carlos_tasayco_2-1738853738229.png

I already tested with another user, is not that I am not sure.

 

Thanks in advance