Databricks Markdown

Posted on  by admin

There is a magic command for markdown, which is useful for documenting notebooks. Run the following code in a cell and see the rendered content:%md # Exploring the Databricks File System.(DBFS). This Markdown cheat sheet provides a quick overview of all the Markdown syntax elements. It can’t cover every edge case, so if you need more information about any of these elements, refer to the reference guides for basic syntax and extended syntax.

  1. Databricks Markdown Table
  2. Databricks Markdown Variables
  3. Databricks Markdown Language
  4. Databricks Markdown Image
-->

Problem

Unlike a Azure Databricks notebook that has version control built in, code developed in RStudio is lost when the high concurrency cluster hosting Rstudio is shut down.

Databricks Markdown Table

Solution

To persist and share code in RStudio, do one of the following:

Databricks markdown table of contents

Databricks Markdown Variables

  • From RStudio, save the code to a folder on DBFS which is accessible from both Azure Databricks notebooks and RStudio.
  • Use the integrated support for version control like Git in RStudio.
  • Save the R notebook to your local file system by exporting it as Rmarkdown, then import the file into the RStudio instance.
Databricks markdown image

Databricks Markdown Language

The blog Sharing R Notebooks using RMarkdown describes the steps in more detail.

Databricks Markdown Image

This process allows you to persist code developed in RStudio and share notebooks between the Azure Databricks notebook environment and RStudio.