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:ย 

Is it possible to access a variable in markdown cells?

bdc
New Contributor III

I saw a similar question in a discussion 5 years ago and back then this option was not available.

https://community.databricks.com/s/question/0D53f00001HKHhNCAX/markup-in-databricks-notebook

I wonder if this feature has been added. It is possible to do it in Jupyter but notebook help page in databricks doesn't show such feature.

I think this is a beneficial add-on in case it doesn't yet exist because sometimes you don't wanna copy paste static values from one run and update it in every run in the markdown.

If it does exist, I'd appreciate if you can share the solution with me.

Thanks

4 REPLIES 4

Anonymous
Not applicable

Howdy!

My name is Piper and I'm one of the community moderators. Thank you for your question. Let's see how the community responds first and then we'll see if we need the team to follow up.

User16829050420
Databricks Employee
Databricks Employee

Thanks for your request. Have you already tried this magic command mentioned in the docs?

https://docs.databricks.com/notebooks/notebooks-use.html

bdc
New Contributor III

@Ashwinkumar Jayakumarโ€‹  I have. The magic command is not for this purpose. In one cmd you can only use one magic command: %md, %python, etc. and only in the beginning of the command.

To reiterate, I want to use a variable in a markdown cmd (a cmd that I start with %md) that I have already defined in my notebook code cmd.

bdc
New Contributor III

When I click on the feedback link under workspace/help, it opens a page with page not found. db feedback page

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