This page describes how to import and export notebooks in Databricks and the notebook formats that Databricks supports.
Supported notebook formatsâDatabricks can import and export notebooks in the following formats:
.scala
, .py
, .sql
, or .r
..html
..dbc
archive..ipynb
..Rmd
.You can import an external notebook from a URL or a file. You can also import a ZIP archive of notebooks exported in bulk from a Databricks workspace.
An asset in the workspace is identified as a notebook if it has an .ipynb
extension, or contains the string Databricks notebook source
in a comment in the first line and has one of the following extensions: .py
, .r
, .scala
, .sql
. Any write or rename of a notebook or file that changes these conditions, also changes the type of the notebook or file. For example, if you have a file myfile.txt
that has # Databricks notebook source
as the first line, renaming that file to myfile.py
coverts it into a notebook.
note
Converting between file and notebook types can have unexpected results, as notebooks have a specific IPYNB or source format. See Notebook formats.
To convert Python, SQL, Scala, and R scripts to single-cell notebooks, add a comment to the first cell of the file:
To define cells in a script, use the special comment shown below. When you import the script to Databricks, cells are created as marked by the COMMAND
lines shown.
note
When you export a notebook as HTML, IPython notebook (.ipynb), or archive (DBC), and you have not cleared the command outputs, the outputs are included in the export.
To export a notebook, select File > Export in the notebook toolbar and select the export format.
To export all folders in a workspace folder as a ZIP archive:
Click Workspace in the sidebar.
Right-click the folder and select Export.
Select the export format:
note
HTML Archive is not supported in AWS GovCloud workspaces.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4