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: 

Run a multiple %command in the same cell

BriceBuso
Contributor II

Hello, 

is there a way to run multiple %command in a same cell ? 

I heard that's not possible but would like a confirmation and maybe if it could be an idea for future updates.

Moreover, is there a way to mask the output of cells (especially markdown) when using %run. I would like to keep some documentation in the notebook executed with the %run command but not prompt it in the destination notebook. 

 

Thanks 

3 REPLIES 3

Tharun-Kumar
Honored Contributor II
Honored Contributor II

@BriceBuso 

No, we cannot have multiple %command in the same cell.

About your other question, could you try using dbutils.notebook.run(). This would also provide the possibility of providing optional parameters to the child notebook. More details are available here - https://docs.databricks.com/notebooks/notebook-workflows.html

dream
New Contributor III

just a slight correction but you can also pass parameters when using %run

Anonymous
Not applicable

Hi @BriceBuso 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!