In this article
Overview
You can use this Snap to execute a job, check its status in Databricks, and, based on the job's status, complete or fail the pipeline. The Snap triggers the task to execute and then periodically checks its status. The Snap stops after the job is executed. However, if the pipeline is canceled before the task is finished, the Snap requests to stop the task.
Example
Run Job on a Cluster
The following example pipeline demonstrates how to run a job specified in the notebook on a cluster.Snap Type
The Databricks - Run Job Snap is a Write-type Snap.
Prerequisites
Valid client ID.
A valid account with the required permissions.
Support for Ultra Pipelines
Works in Ultra Pipelines.
Limitations and Known Issues
None.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document
|
|
| Requires a valid task name, notebook path, and cluster-info. |
Output | Document
|
|
| Executes the selected notebook. |
Error | Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab:
Learn more about Error handling in Pipelines. |
Snap Settings
Asterisk ( * ): Indicates a mandatory field.
Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.
Expression icon ( ): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
Add icon ( ): Indicates that you can add fields in the field set.
Remove icon ( ): Indicates that you can remove fields from the field set.
Upload icon ( ): Indicates that you can upload files.
Field Name | Field Type | Description | |
---|---|---|---|
Label*
Default Value: Databricks - Run Job | String | Specify the name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.
| |
Task name*
Default Value: N/A | String/Expression | Specify the name of the task to perform the job. | |
Notebook path*
Default Value: N/A | String/Expression/Suggestion | Specify the path of the saved notebook that will run in this job. Notebook is a web-based interface that allows you to create, edit, and execute data science and data engineering workflows. Learn more about Databricks notebooks. | |
Cluster*
Default Value: N/A | String/Expression/Suggest | Specify the cluster to run the job within its environment. | |
Parameter(s) | Use this field set to specify the parameters to run the job. | ||
Key* Default Value: N/A | String/Expression | Specify the parameter key. | |
Value* Default Value: N/A | String/Expression | Specify the parameter value. | |
Interval check (seconds)*
Default Value: 10 | Integer/Expression | Specify the number of seconds to wait before checking the status of the task. | |
Snap Execution Default Value: Execute only | Dropdown list | Select one of the following three modes in which the Snap executes:
|
Example
Run Job on a Cluster
The following example pipeline demonstrates how to run a job specified in the notebook on a cluster.
Download this pipeline.
Step 1: Configure the Databricks - Run Job Snap with the following settings:
a. Task name: Specify the task the Databricks - Run Job Snap must perform in this field.
b. Notebook path: Specify the path to the Databricks notebook that contains the code to be executed. This path indicates the location within the Databricks environment where the notebook is stored.
c. Cluster: Specify the cluster on which the job must be executed. The cluster configuration (including computational resources) is predefined and identified by this name and ID.
d. Interval check (seconds): Specify the frequency (in seconds) at which the Snap will check the status of the running job. In this case, it will check every 10 seconds.
Databricks - Run Job Configuration | Databricks - Run Job Output |
---|---|
|
Step 2: Configure the Mapper Snap to store the result status of the Databricks - Run Job Snap. On validation, the Mapper Snap displays the job success message.
Downloads
Snap Pack History
Release | Snap Pack Version | Date | Type | Updates |
---|---|---|---|---|
August 2024 | main27765 | Stable | Upgraded the | |
May 2024 | 437patches27246 |
| Latest | Added Databricks - Run Job. This Snap executes a job, checks its status in Databricks, and, based on the job's status, completes or fails the pipeline. |
May 2024 | 437patches26400 |
| Latest | Fixed an invalid session handle issue with the Databricks Snap Pack that intermittently triggered an error message when the Snaps failed to connect with Databricks to execute the SQL statement. |
May 2024 | main26341 |
| Stable | Updated the Delete Condition (Truncates a Table if empty) field in the Databricks - Delete Snap to Delete condition (deletes all records from a table if left blank) to indicate that all entries will be deleted from the table when this field is blank, but no truncate operation is performed. |
February 2024 | main25112 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
November 2023 | main23721 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
August 2023 | main22460 |
| Stable | Updated and certified against the current SnapLogic Platform release. |
May 2023 | 433patches21630 |
| Latest | Enhanced the performance of the Databricks - Insert Snap to improve the amount of time it takes for validation. |
May 2023 | main21015 |
| Stable | Upgraded with the latest SnapLogic Platform release. |
February 2023 | main19844 |
| Stable | Upgraded with the latest SnapLogic Platform release. |
November 2022 | main18944 |
| Stable | The Databricks - Insert Snap now creates the target table only from the table metadata of the second input view when the following conditions are met:
|
September 2022 | 430patches18305 |
| Latest |
The following fields are added to each Databricks Snap as part of this enhancement:
|
September 2022 | 430patches17796 |
| Latest | The Manage Queued Queries property in the Databricks Snap Pack enables you to decide whether a given Snap should continue or cancel executing the queued Databricks SQL queries. |
August 2022 | main17386 |
| Stable | Upgraded with the latest SnapLogic Platform release. |
4.29.2.0 | 42920rc17045 |
| Latest | A new Snap Pack for Databricks Lakehouse Platform (Databricks or DLP) introduces the following Snaps:
|