cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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 ?

Ajay Kumar Pandey

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group