-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Added Databricks SQL Warehouses API actions #18148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jcortes
merged 21 commits into
PipedreamHQ:master
from
Lokeshchand33:databricks-sql-warehouses
Sep 3, 2025
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
97b92e1
Added Databricks SQL Warehouses API actions
Lokeshchand33 5a697bd
Update Databricks SQL Warehouse docs URLs
Lokeshchand33 6623be2
Merge branch 'master' into databricks-sql-warehouses
Lokeshchand33 8343661
Merge branch 'master' into databricks-sql-warehouses
Lokeshchand33 9292e93
fix(databricks): bump component versions and apply lint fixes
Lokeshchand33 6a9646c
fix(databricks): addressed requested changes
Lokeshchand33 d66788b
addressed coderabbit review feedback
Lokeshchand33 e120588
resolved the linting issues
Lokeshchand33 5238430
Merge branch 'master' into databricks-sql-warehouses
Lokeshchand33 e742ec2
addressed all test failures
Lokeshchand33 01ed509
addressed coderabbit review feedback
Lokeshchand33 d83d206
Merge branch 'master' into databricks-sql-warehouses
Lokeshchand33 49e997c
resolved the linting issues
Lokeshchand33 0535802
addressed coderabbit review feedback
Lokeshchand33 b98476c
addressed coderabbit review feedback
Lokeshchand33 2153ac3
resolved the linting issues
Lokeshchand33 b04a050
updates
michelle0927 2222816
Add default value for maxNumClusters
vunguyenhung 2aeacf2
create and edit sql warehouses fixes
Lokeshchand33 9bfe023
create and edit sql warehouse fixes
Lokeshchand33 99dfc76
updates
michelle0927 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
components/databricks/actions/create-sql-warehouse/create-sql-warehouse.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-create-sql-warehouse", | ||
name: "Create SQL Warehouse", | ||
description: "Creates a new SQL Warehouse in Databricks. [See the documentation](https://docs.databricks.com/api/workspace/warehouse/create)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
databricks, | ||
name: { | ||
type: "string", | ||
label: "Warehouse Name", | ||
description: "A human-readable name for the warehouse", | ||
}, | ||
clusterSize: { | ||
type: "string", | ||
label: "Cluster Size", | ||
description: "Size of the cluster (e.g., `Small`, `Medium`, `Large`)", | ||
}, | ||
autoStopMinutes: { | ||
type: "integer", | ||
label: "Auto Stop (minutes)", | ||
description: "Number of minutes of inactivity before the warehouse auto-stops", | ||
optional: true, | ||
default: 10, | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const payload = { | ||
name: this.name, | ||
cluster_size: this.clusterSize, | ||
auto_stop_mins: this.autoStopMinutes, | ||
}; | ||
|
||
const response = await this.databricks.createSQLWarehouse({ | ||
data: payload, | ||
$, | ||
}); | ||
|
||
$.export("$summary", `Successfully created SQL Warehouse: ${response?.name || this.name}`); | ||
return response; | ||
}, | ||
}; |
26 changes: 26 additions & 0 deletions
26
components/databricks/actions/delete-sql-warehouse/delete-sql-warehouse.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-delete-sql-warehouse", | ||
name: "Delete SQL Warehouse", | ||
description: "Deletes a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouse/delete)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
databricks, | ||
warehouseId: { | ||
type: "string", | ||
label: "Warehouse ID", | ||
description: "The ID of the SQL Warehouse to delete", | ||
}, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
async run({ $ }) { | ||
await this.databricks.deleteSQLWarehouse({ | ||
warehouseId: this.warehouseId, | ||
$, | ||
}); | ||
|
||
$.export("$summary", `Successfully deleted SQL Warehouse with ID ${this.warehouseId}`); | ||
return { success: true }; | ||
}, | ||
}; |
32 changes: 32 additions & 0 deletions
32
components/databricks/actions/edit-sql-warehouse/edit-sql-warehouse.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-edit-sql-warehouse", | ||
name: "Edit SQL Warehouse", | ||
description: "Edits the configuration of an existing SQL Warehouse. [See docs](https://docs.databricks.com/api/workspace/warehouse/edit)", | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
databricks, | ||
warehouseId: { | ||
type: "string", | ||
label: "Warehouse ID", | ||
description: "The ID of the SQL Warehouse to edit", | ||
}, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
body: { | ||
type: "object", | ||
label: "Edit Configuration", | ||
description: "The new configuration for the SQL Warehouse (JSON object). Example: `{ \"name\": \"Updated Warehouse\", \"cluster_size\": \"2X-Small\" }`", | ||
}, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
async run({ $ }) { | ||
const response = await this.databricks.editSQLWarehouse({ | ||
warehouseId: this.warehouseId, | ||
data: this.body, | ||
$, | ||
}); | ||
|
||
$.export("$summary", `Successfully edited SQL Warehouse ID ${this.warehouseId}`); | ||
return response; | ||
}, | ||
}; |
17 changes: 17 additions & 0 deletions
17
components/databricks/actions/get-sql-warehouse-config/get-sql-warehouse-config.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-get-sql-warehouse-config", | ||
name: "Get SQL Warehouse Config", | ||
description: "Retrieves the global configuration for SQL Warehouses. [See docs](https://docs.databricks.com/api/workspace/warehouse/get-config)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
databricks, | ||
}, | ||
async run({ $ }) { | ||
const response = await this.databricks.getSQLWarehouseConfig({ $ }); | ||
$.export("$summary", "Successfully retrieved SQL Warehouse configuration"); | ||
return response; | ||
}, | ||
}; |
26 changes: 26 additions & 0 deletions
26
...onents/databricks/actions/get-sql-warehouse-permissions/get-sql-warehouse-permissions.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-get-sql-warehouse-permissions", | ||
name: "Get SQL Warehouse Permissions", | ||
description: "Retrieves the permissions for a specific SQL Warehouse. [See docs](https://docs.databricks.com/api/workspace/warehouse/get-permissions)", | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
databricks, | ||
warehouseId: { | ||
type: "string", | ||
label: "Warehouse ID", | ||
description: "The ID of the SQL Warehouse to fetch permissions for", | ||
}, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
async run({ $ }) { | ||
const response = await this.databricks.getSQLWarehousePermissions({ | ||
warehouseId: this.warehouseId, | ||
$, | ||
}); | ||
|
||
$.export("$summary", `Retrieved permissions for SQL Warehouse ID ${this.warehouseId}`); | ||
return response; | ||
}, | ||
}; |
26 changes: 26 additions & 0 deletions
26
components/databricks/actions/get-sql-warehouse/get-sql-warehouse.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-get-sql-warehouse", | ||
name: "Get SQL Warehouse", | ||
description: "Retrieves details for a specific SQL Warehouse. [See docs](https://docs.databricks.com/api/workspace/warehouse/get)", | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
databricks, | ||
warehouseId: { | ||
type: "string", | ||
label: "Warehouse ID", | ||
description: "The ID of the SQL Warehouse to retrieve", | ||
}, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
async run({ $ }) { | ||
const response = await this.databricks.getSQLWarehouse({ | ||
warehouseId: this.warehouseId, | ||
$, | ||
}); | ||
|
||
$.export("$summary", `Retrieved details for SQL Warehouse ID ${this.warehouseId}`); | ||
return response; | ||
}, | ||
}; |
38 changes: 38 additions & 0 deletions
38
components/databricks/actions/list-sql-warehouses/list-sql-warehouses.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-list-sql-warehouses", | ||
name: "List SQL Warehouses", | ||
description: "Lists all SQL Warehouses available in the Databricks workspace. [See the documentation](https://docs.databricks.com/api/workspace/warehouse/list)", | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version: "0.0.1", | ||
jcortes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
type: "action", | ||
props: { | ||
databricks, | ||
maxResults: { | ||
type: "integer", | ||
label: "Max Results", | ||
description: "Maximum number of warehouses to return", | ||
default: 50, | ||
optional: true, | ||
}, | ||
}, | ||
async run({ $ }) { | ||
const params = { | ||
limit: this.maxResults || 50, | ||
}; | ||
|
||
const { warehouses } = await this.databricks.listSQLWarehouses({ | ||
params, | ||
$, | ||
}); | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
if (!warehouses?.length) { | ||
$.export("$summary", "No warehouses found."); | ||
return []; | ||
} | ||
|
||
$.export("$summary", `Successfully retrieved ${warehouses.length} warehouse${warehouses.length === 1 ? "" : "s"}.`); | ||
|
||
return warehouses; | ||
}, | ||
}; |
26 changes: 26 additions & 0 deletions
26
components/databricks/actions/set-sql-warehouse-config/set-sql-warehouse-config.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-set-sql-warehouse-config", | ||
name: "Set SQL Warehouse Config", | ||
description: "Updates the global configuration for SQL Warehouses. [See docs](https://docs.databricks.com/api/workspace/warehouse/set-config)", | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version: "0.0.1", | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
type: "action", | ||
props: { | ||
databricks, | ||
config: { | ||
type: "object", | ||
label: "Configuration", | ||
description: "The configuration object for SQL Warehouses. Example: `{ \"enable_serverless_compute\": true }`", | ||
}, | ||
}, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
async run({ $ }) { | ||
const response = await this.databricks.setSQLWarehouseConfig({ | ||
data: this.config, | ||
$, | ||
}); | ||
|
||
$.export("$summary", "Successfully updated SQL Warehouse configuration"); | ||
return response; | ||
}, | ||
}; |
32 changes: 32 additions & 0 deletions
32
...onents/databricks/actions/set-sql-warehouse-permissions/set-sql-warehouse-permissions.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-set-sql-warehouse-permissions", | ||
name: "Set SQL Warehouse Permissions", | ||
description: "Updates the permissions for a specific SQL Warehouse. [See docs](https://docs.databricks.com/api/workspace/warehouse/set-permissions)", | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
databricks, | ||
warehouseId: { | ||
type: "string", | ||
label: "Warehouse ID", | ||
description: "The ID of the SQL Warehouse to update permissions for", | ||
}, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
permissions: { | ||
type: "object", | ||
label: "Permissions", | ||
description: "The permissions object. Example: `{ \"access_control_list\": [{ \"user_name\": \"alice@example.com\", \"permission_level\": \"CAN_MANAGE\" }] }`", | ||
}, | ||
}, | ||
jcortes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
async run({ $ }) { | ||
const response = await this.databricks.setSQLWarehousePermissions({ | ||
warehouseId: this.warehouseId, | ||
data: this.permissions, | ||
$, | ||
}); | ||
|
||
$.export("$summary", `Successfully updated permissions for SQL Warehouse ID ${this.warehouseId}`); | ||
return response; | ||
}, | ||
}; |
26 changes: 26 additions & 0 deletions
26
components/databricks/actions/start-sql-warehouse/start-sql-warehouse.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-start-sql-warehouse", | ||
name: "Start SQL Warehouse", | ||
description: "Starts a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouse/start)", | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
databricks, | ||
warehouseId: { | ||
type: "string", | ||
label: "Warehouse ID", | ||
description: "The ID of the SQL Warehouse to start", | ||
}, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
async run({ $ }) { | ||
const response = await this.databricks.startSQLWarehouse({ | ||
warehouseId: this.warehouseId, | ||
$, | ||
}); | ||
|
||
$.export("$summary", `Successfully started SQL Warehouse with ID ${this.warehouseId}`); | ||
return response; | ||
}, | ||
}; |
26 changes: 26 additions & 0 deletions
26
components/databricks/actions/stop-sql-warehouse/stop-sql-warehouse.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import databricks from "../../databricks.app.mjs"; | ||
|
||
export default { | ||
key: "databricks-stop-sql-warehouse", | ||
name: "Stop SQL Warehouse", | ||
description: "Stops a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouse/stop)", | ||
version: "0.0.1", | ||
type: "action", | ||
props: { | ||
databricks, | ||
warehouseId: { | ||
type: "string", | ||
label: "Warehouse ID", | ||
description: "The ID of the SQL Warehouse to stop", | ||
}, | ||
Lokeshchand33 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
async run({ $ }) { | ||
const response = await this.databricks.stopSQLWarehouse({ | ||
warehouseId: this.warehouseId, | ||
$, | ||
}); | ||
|
||
$.export("$summary", `Successfully stopped SQL Warehouse with ID ${this.warehouseId}`); | ||
return response; | ||
}, | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.