cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Variables passed from ADF to Databricks Notebook Try-Catch are not accessible

Abhi0607
New Contributor II

Dear Members,

I need your help in below scenario.

I am passing few parameters from ADF pipeline to Databricks notebook.

If I execute ADF pipeline to run my databricks notebook and use these variables as is in my code (python) then it works fine.

But as soon as I use Try and catch block in my notebook then these variables which are passed from ADF pipeline, it does not recognize these variables. I can still print value of those variables outside the Try-Catch block but not inside Try-Catch.

Can you please suggest how can I proceed or access the variables which are passed by ADF inside the Try-Catch blocks of databricks notebook?

Note: This issue happens only if I run my databricks notebook through ADF pipeline. If I assign values in notebooks and run standalone notebook then it works.

Thank you for your help! 

 

2 REPLIES 2

Ajay-Pandey
Esteemed Contributor III

Hi @Abhi0607  

Can you please help me to find if you are taking or defining these parameter value outside try catch or inside it ?

Parameters are defined in ADF and transferred to databricks so it is outside try catch