Codementor Events

Create your Own %Magic Commands in Databricks

Published Aug 26, 2022
Create your Own %Magic Commands in Databricks

Ever wanted to build your own %Magic commands in Databricks? Well here is a handy guide on how to achive that with **Databricks Runtime 11x+. **

The new ipython notebook kernel included with databricks runtime 11 and above allows you to create your own magic commands. If you're familar with the use of %magic commands such as %python, %ls, %fs, %sh %history and such in databricks then now you can build your OWN!

Below is how you would achieve this in code!

FWgKNJ-XkAAGS3r.jpg

Here's how we leveraged it to display HTML for some notebooks

FWgMDMRXwAAZeil.png

Documentation and more information on this feature can be found here
FWgM1RwWIAA0lTQ.png

Tip original appears over on twitter. Follow us for more

Discover and read more posts from Scott Bell
get started