Best code practices in coding Notebooks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2023 05:57 AM
Hi All,
Good day!
Could you suggest some best code practices while coding in Databricks Notebooks.
- Labels:
-
Databricks Notebooks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2023 06:40 AM
Let me think:
- do not repeat yourself aka create functions
- use markdown! this is probably the most important one as it is one of the big advantages of using a notebook
- try to use libraries (or .py files) to group code which is used often
- use repos
- and this is personal taste and perhaps controversial but use python or scala (not SQL)
- and a lot of stuff I probably forget, but other people will add this 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2023 08:07 PM
Hi, in addition to the above comment, you can also refer SE best practises with notebooks: https://www.databricks.com/blog/2022/06/25/software-engineering-best-practices-with-databricks-noteb...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2023 09:25 PM
Hi @KVNARK .
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!

