How to write Notebook to Databricks using API?

Viewed 434
1 Answers

You need to use Workspace API instead, specifically the Import call. For example, with curl (example from documentation):

curl -n -F path=/Users/user@example.com/project/ScalaExampleNotebook  \
  -F language=SCALA -F content=@example.scala \
  https://<databricks-instance>/api/2.0/workspace/import

If you don't use API directly, the better way would be to use workspace subcommand of Databricks CLI (import or import_dir), or use Databricks Terraform provider

Related