arazzo: 1.0.1 info: title: Azure Databricks Create a Directory and Import a Notebook summary: Make a workspace directory, import a notebook into it, then verify it. description: >- Scaffolds a workspace folder and seeds it with a notebook. The workflow creates the directory recursively, imports base64-encoded notebook content into a path under that directory, and lists the directory to confirm the notebook is present. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: azureDatabricksApi url: ../openapi/azure-databricks-openapi.yml type: openapi workflows: - workflowId: create-directory-and-import-notebook summary: Create a workspace directory, import a notebook, and list to verify. description: >- Calls createWorkspaceDirectory, importWorkspaceObject, then listWorkspaceObjects to confirm the notebook landed. inputs: type: object required: - token - directoryPath - notebookPath - content - language properties: token: type: string description: Databricks personal access token for the Authorization header. directoryPath: type: string description: Absolute path of the workspace directory to create. notebookPath: type: string description: Absolute path (under the directory) to import the notebook to. content: type: string description: Base64-encoded notebook source content (max 10 MB). language: type: string description: Notebook language, one of SCALA, PYTHON, SQL, or R. steps: - stepId: createDirectory description: >- Create the workspace directory and all necessary parent directories recursively. operationId: createWorkspaceDirectory parameters: - name: Authorization in: header value: Bearer $inputs.token requestBody: contentType: application/json payload: path: $inputs.directoryPath successCriteria: - condition: $statusCode == 200 - stepId: importNotebook description: >- Import the base64-encoded notebook content into a path under the new directory, overwriting any existing object. operationId: importWorkspaceObject parameters: - name: Authorization in: header value: Bearer $inputs.token requestBody: contentType: application/json payload: path: $inputs.notebookPath format: SOURCE language: $inputs.language content: $inputs.content overwrite: true successCriteria: - condition: $statusCode == 200 - stepId: listDirectory description: >- List the directory contents to confirm the imported notebook is present. operationId: listWorkspaceObjects parameters: - name: Authorization in: header value: Bearer $inputs.token - name: path in: query value: $inputs.directoryPath successCriteria: - condition: $statusCode == 200 outputs: objects: $response.body#/objects outputs: directoryPath: $inputs.directoryPath notebookPath: $inputs.notebookPath objects: $steps.listDirectory.outputs.objects