You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Azure Databricks Notebook Activity in a [pipeline](concepts-pipelines-activities.md) runs a Databricks notebook in your Azure Databricks workspace. This article builds on the [data transformation activities](transform-data.md) article, which presents a general overview of data transformation and the supported transformation activities. Azure Databricks is a managed platform for running Apache Spark.
17
18
18
-
You can create a Databricks notebook with an ARM template using JSON, or directly through the Azure Data Factory Studio user interface. For a step-by-step walkthrough of how to create a Databricks notebook activity using the user interface, reference the tutorial [Run a Databricks notebook with the Databricks Notebook Activity in Azure Data Factory](transform-data-using-databricks-notebook.md).
19
+
You can create a Databricks notebook with an ARM template using JSON, or directly through the Azure Data Factory Studio user interface. For a step-by-step walkthrough of how to create a Databricks notebook activity using the user interface, reference the tutorial [Run a Databricks notebook with the Databricks Notebook Activity in Azure Data Factory](transform-data-using-databricks-notebook.md).
19
20
20
21
## Add a Notebook activity for Azure Databricks to a pipeline with UI
21
22
22
23
To use a Notebook activity for Azure Databricks in a pipeline, complete the following steps:
23
24
24
25
1. Search for _Notebook_ in the pipeline Activities pane, and drag a Notebook activity to the pipeline canvas.
25
-
1. Select the new Notebook activity on the canvas if it is not already selected.
26
+
1. Select the new Notebook activity on the canvas if it isn't already selected.
26
27
1. Select the **Azure Databricks** tab to select or create a new Azure Databricks linked service that will execute the Notebook activity.
27
28
28
29
:::image type="content" source="media/transform-data-databricks-notebook/notebook-activity.png" alt-text="Shows the UI for a Notebook activity.":::
29
30
30
-
1. Select the **Settings** tab and specify the notebook path to be executed on Azure Databricks, optional base parameters to be passed to the notebook, and any additional libraries to be installed on the cluster to execute the job.
31
+
1. Select the **Settings** tab and specify the notebook path to be executed on Azure Databricks, optional base parameters to be passed to the notebook, and any other libraries to be installed on the cluster to execute the job.
31
32
32
33
:::image type="content" source="media/transform-data-databricks-notebook/notebook-settings.png" alt-text="Shows the UI for the Settings tab for a Notebook activity.":::
33
34
34
35
## Databricks Notebook activity definition
35
36
36
-
Here is the sample JSON definition of a Databricks Notebook Activity:
37
+
Here's the sample JSON definition of a Databricks Notebook Activity:
37
38
38
39
```json
39
40
{
@@ -73,7 +74,7 @@ definition:
73
74
|type|For Databricks Notebook Activity, the activity type is DatabricksNotebook.|Yes|
74
75
|linkedServiceName|Name of the Databricks Linked Service on which the Databricks notebook runs. To learn about this linked service, see [Compute linked services](compute-linked-services.md) article.|Yes|
75
76
|notebookPath|The absolute path of the notebook to be run in the Databricks Workspace. This path must begin with a slash.|Yes|
76
-
|baseParameters|An array of Key-Value pairs. Base parameters can be used for each activity run. If the notebook takes a parameter that is not specified, the default value from the notebook will be used. Find more on parameters in [Databricks Notebooks](https://docs.databricks.com/api/latest/jobs.html#jobsparampair).|No|
77
+
|baseParameters|An array of Key-Value pairs. Base parameters can be used for each activity run. If the notebook takes a parameter that isn't specified, the default value from the notebook will be used. Find more on parameters in [Databricks Notebooks](https://docs.databricks.com/api/latest/jobs.html#jobsparampair).|No|
77
78
|libraries|A list of libraries to be installed on the cluster that will execute the job. It can be an array of \<string, object>.|No|
78
79
79
80
## Supported libraries for Databricks activities
@@ -126,28 +127,28 @@ You can pass parameters to notebooks using *baseParameters* property in databric
126
127
127
128
In certain cases, you might require to pass back certain values from notebook back to the service, which can be used for control flow (conditional checks) in the service or be consumed by downstream activities (size limit is 2 MB).
128
129
129
-
1. In your notebook, you may call [dbutils.notebook.exit("returnValue")](/azure/databricks/notebooks/notebook-workflows#notebook-workflows-exit) and corresponding "returnValue" will be returned to the service.
130
+
1. In your notebook, you can call [dbutils.notebook.exit("returnValue")](/azure/databricks/notebooks/notebook-workflows#python-1) and corresponding "returnValue" will be returned to the service.
130
131
131
132
2. You can consume the output in the service by using expression such as `@{activity('databricks notebook activity name').output.runOutput}`.
132
133
133
134
> [!IMPORTANT]
134
-
> If you are passing JSON object you can retrieve values by appending property names. Example: `@{activity('databricks notebook activity name').output.runOutput.PropertyName}`
135
+
> If you're passing JSON object, you can retrieve values by appending property names. Example: `@{activity('databricks notebook activity name').output.runOutput.PropertyName}`
135
136
136
137
## How to upload a library in Databricks
137
138
138
139
### You can use the Workspace UI:
139
140
140
-
1.[Use the Databricks workspace UI](/azure/databricks/libraries/#create-a-library)
141
+
1.[Use the Databricks workspace UI](/azure/databricks/libraries/cluster-libraries#install-a-library-on-a-cluster)
141
142
142
-
2. To obtain the dbfs path of the library added using UI, you can use [Databricks CLI](/azure/databricks/dev-tools/cli/#install-the-cli).
143
+
2. To obtain the dbfs path of the library added using UI, you can use [Databricks CLI](/azure/databricks/dev-tools/cli/fs-commands#list-the-contents-of-a-directory).
143
144
144
145
Typically the Jar libraries are stored under dbfs:/FileStore/jars while using the UI. You can list all through the CLI: *databricks fs ls dbfs:/FileStore/job-jars*
145
146
146
147
### Or you can use the Databricks CLI:
147
148
148
-
1. Follow [Copy the library using Databricks CLI](/azure/databricks/dev-tools/cli/#copy-a-file-to-dbfs)
149
+
1. Follow [Copy the library using Databricks CLI](/azure/databricks/dev-tools/cli/fs-commands#copy-a-directory-or-a-file)
149
150
150
-
2. Use Databricks CLI [(installation steps)](/azure/databricks/dev-tools/cli/#install-the-cli)
151
+
2. Use Databricks CLI [(installation steps)](/azure/databricks/dev-tools/cli/commands#compute-commands)
Copy file name to clipboardExpand all lines: articles/data-factory/transform-data-using-databricks-notebook.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,7 +203,7 @@ You can log on to the **Azure Databricks workspace**, go to **Job Runs** and you
203
203
204
204
You can select the **Job name** and navigate to see further details. On successful run, you can validate the parameters passed and the output of the Python notebook.
205
205
206
-
## Related content
206
+
## Summary
207
207
208
208
The pipeline in this sample triggers a Databricks Notebook activity and passes a parameter to it. You learned how to:
0 commit comments