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: 

Saving complete notebooks to GitHub from Databricks repos.

Serhii
Contributor

When saving notebook to GiHub repo, it is stripped to Python source code. Is it possible to save it in the ipynb formt?

1 ACCEPTED SOLUTION

Accepted Solutions

-werners-
Esteemed Contributor III

as git is a repository for source code it is logical it is converted to py files as these can be run as a job.

Is this what you look for?

https://github.com/Yoyodyne-Data-Science/ipynb-py-convert-databricks

View solution in original post

7 REPLIES 7

-werners-
Esteemed Contributor III

as git is a repository for source code it is logical it is converted to py files as these can be run as a job.

Is this what you look for?

https://github.com/Yoyodyne-Data-Science/ipynb-py-convert-databricks

Serhii
Contributor

Exactly - thanks for pointing out!

-werners-
Esteemed Contributor III

you can also use the databricks cli. There is a jupyter format option.

https://docs.microsoft.com/en-us/azure/databricks/dev-tools/cli/workspace-cli

Anonymous
Not applicable

The notesbooks save to git are in .py format. The code that is markdown or magic commands get commented out. If you reload it as a notebook, then it will render that markdown and code again. Here is what the python would look like

# Databricks notebook source
# INCLUDE_HEADER_TRUE
# INCLUDE_FOOTER_TRUE
 
# COMMAND ----------
 
# MAGIC %md 
# MAGIC # Databricks Platform
# MAGIC 

Anonymous
Not applicable

Awesome ideas and responses here in this thread @Werner Stinckens​  @Joseph Kambourakis​ ! Thanks for helping out!

@Sergii Ivakhno​ If you got what you needed, please let us know by selecting the "best answer"! This helps the community see when a question has its answer! 😊

GlennStrycker
New Contributor III

When I save+commit+push my .ipynb file to my linked git repo, I noticed that only the cell inputs are saved, not the output.  This differs from the .ipynb file I get when I choose "File / Export / iPython Notebook".  Is there a way to save the cell outputs in my git commit as well? 

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