Skip to content

Commit 61a1f8b

Browse files
authored
Merge pull request #706 from guanjieshen/feat_dbx
Update Community Template - Databricks Run Serverless Notebooks
2 parents a205d24 + 47437a4 commit 61a1f8b

File tree

2 files changed

+65
-3
lines changed

2 files changed

+65
-3
lines changed

community templates/Databricks - Run Serverless Notebook/Databricks - Run Serverless Notebook.json

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,68 @@
241241
],
242242
"setSystemVariable": true
243243
}
244+
},
245+
{
246+
"name": "Get Job Output",
247+
"type": "WebActivity",
248+
"dependsOn": [
249+
{
250+
"activity": "Check Job Status",
251+
"dependencyConditions": [
252+
"Succeeded"
253+
]
254+
}
255+
],
256+
"policy": {
257+
"timeout": "0.12:00:00",
258+
"retry": 0,
259+
"retryIntervalInSeconds": 30,
260+
"secureOutput": false,
261+
"secureInput": false
262+
},
263+
"userProperties": [],
264+
"typeProperties": {
265+
"method": "GET",
266+
"headers": {},
267+
"url": {
268+
"value": "@concat('https://',pipeline().parameters.DatabricksWorkspaceID,'.azuredatabricks.net/api/2.1/jobs/runs/get-output?run_id=',activity('Check Job Run API').output.tasks[0].run_id)",
269+
"type": "Expression"
270+
},
271+
"authentication": {
272+
"type": "MSI",
273+
"resource": "2ff814a6-3304-4ab8-85cb-cd0e6f879c1d"
274+
}
275+
}
276+
},
277+
{
278+
"name": "Set Notebook Output Result",
279+
"type": "SetVariable",
280+
"dependsOn": [
281+
{
282+
"activity": "Get Job Output",
283+
"dependencyConditions": [
284+
"Succeeded"
285+
]
286+
}
287+
],
288+
"policy": {
289+
"secureOutput": false,
290+
"secureInput": false
291+
},
292+
"userProperties": [],
293+
"typeProperties": {
294+
"variableName": "pipelineReturnValue",
295+
"value": [
296+
{
297+
"key": "notebookOutputResult",
298+
"value": {
299+
"type": "Expression",
300+
"content": "@if(\n contains(activity('Get Job Output').output.notebook_output, 'result'),\n activity('Get Job Output').output.notebook_output.result,\n null\n)"
301+
}
302+
}
303+
],
304+
"setSystemVariable": true
305+
}
244306
}
245307
],
246308
"policy": {
@@ -249,7 +311,7 @@
249311
"parameters": {
250312
"DatabricksNotebookPath": {
251313
"type": "string",
252-
"defaultValue": "/Workspace/Shared/guanjie_shared/test"
314+
"defaultValue": "/Workspace/Shared/test"
253315
},
254316
"DatabricksWorkspaceID": {
255317
"type": "string",
@@ -282,7 +344,7 @@
282344
"annotations": [
283345
"Databricks"
284346
],
285-
"lastPublishTime": "2024-06-13T04:49:32Z"
347+
"lastPublishTime": "2024-10-21T23:16:25Z"
286348
},
287349
"dependsOn": []
288350
}

community templates/Databricks - Run Serverless Notebook/manifest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)