Skip to content

Instantly share code, notes, and snippets.

@nescobar
Last active August 31, 2021 08:35
Show Gist options
  • Save nescobar/0ff427e4396b6b31c5a0055576672fce to your computer and use it in GitHub Desktop.
Save nescobar/0ff427e4396b6b31c5a0055576672fce to your computer and use it in GitHub Desktop.
%scala
val runId = dbutils.notebook.getContext.currentRunId.toString
Seq(runId).toDF("run_id").createOrReplaceTempView("run_id")
val notebookPath = dbutils.notebook.getContext().notebookPath.get
Seq(notebookPath).toDF("notebook_path").createOrReplaceTempView("notebook_path")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment