cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.