Skip to content
Merged
Show file tree
Hide file tree
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 Aug 22, 2025
5a697bd
Update Databricks SQL Warehouse docs URLs
Lokeshchand33 Aug 22, 2025
6623be2
Merge branch 'master' into databricks-sql-warehouses
Lokeshchand33 Aug 23, 2025
8343661
Merge branch 'master' into databricks-sql-warehouses
Lokeshchand33 Aug 27, 2025
9292e93
fix(databricks): bump component versions and apply lint fixes
Lokeshchand33 Aug 28, 2025
6a9646c
fix(databricks): addressed requested changes
Lokeshchand33 Aug 29, 2025
d66788b
addressed coderabbit review feedback
Lokeshchand33 Aug 29, 2025
e120588
resolved the linting issues
Lokeshchand33 Aug 29, 2025
5238430
Merge branch 'master' into databricks-sql-warehouses
Lokeshchand33 Aug 30, 2025
e742ec2
addressed all test failures
Lokeshchand33 Sep 1, 2025
01ed509
addressed coderabbit review feedback
Lokeshchand33 Sep 1, 2025
d83d206
Merge branch 'master' into databricks-sql-warehouses
Lokeshchand33 Sep 1, 2025
49e997c
resolved the linting issues
Lokeshchand33 Sep 1, 2025
0535802
addressed coderabbit review feedback
Lokeshchand33 Sep 1, 2025
b98476c
addressed coderabbit review feedback
Lokeshchand33 Sep 1, 2025
2153ac3
resolved the linting issues
Lokeshchand33 Sep 1, 2025
b04a050
updates
michelle0927 Sep 1, 2025
2222816
Add default value for maxNumClusters
vunguyenhung Sep 2, 2025
2aeacf2
create and edit sql warehouses fixes
Lokeshchand33 Sep 2, 2025
9bfe023
create and edit sql warehouse fixes
Lokeshchand33 Sep 2, 2025
99dfc76
updates
michelle0927 Sep 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
},
};
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",
},
},
async run({ $ }) {
await this.databricks.deleteSQLWarehouse({
warehouseId: this.warehouseId,
$,
});

$.export("$summary", `Successfully deleted SQL Warehouse with ID ${this.warehouseId}`);
return { success: true };
},
};
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)",
version: "0.0.1",
type: "action",
props: {
databricks,
warehouseId: {
type: "string",
label: "Warehouse ID",
description: "The ID of the SQL Warehouse to edit",
},
body: {
type: "object",
label: "Edit Configuration",
description: "The new configuration for the SQL Warehouse (JSON object). Example: `{ \"name\": \"Updated Warehouse\", \"cluster_size\": \"2X-Small\" }`",
},
},
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;
},
};
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;
},
};
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)",
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",
},
},
async run({ $ }) {
const response = await this.databricks.getSQLWarehousePermissions({
warehouseId: this.warehouseId,
$,
});

$.export("$summary", `Retrieved permissions for SQL Warehouse ID ${this.warehouseId}`);
return response;
},
};
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)",
version: "0.0.1",
type: "action",
props: {
databricks,
warehouseId: {
type: "string",
label: "Warehouse ID",
description: "The ID of the SQL Warehouse to retrieve",
},
},
async run({ $ }) {
const response = await this.databricks.getSQLWarehouse({
warehouseId: this.warehouseId,
$,
});

$.export("$summary", `Retrieved details for SQL Warehouse ID ${this.warehouseId}`);
return response;
},
};
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)",
version: "0.0.1",
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,
$,
});

if (!warehouses?.length) {
$.export("$summary", "No warehouses found.");
return [];
}

$.export("$summary", `Successfully retrieved ${warehouses.length} warehouse${warehouses.length === 1 ? "" : "s"}.`);

return warehouses;
},
};
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)",
version: "0.0.1",
type: "action",
props: {
databricks,
config: {
type: "object",
label: "Configuration",
description: "The configuration object for SQL Warehouses. Example: `{ \"enable_serverless_compute\": true }`",
},
},
async run({ $ }) {
const response = await this.databricks.setSQLWarehouseConfig({
data: this.config,
$,
});

$.export("$summary", "Successfully updated SQL Warehouse configuration");
return response;
},
};
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)",
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",
},
permissions: {
type: "object",
label: "Permissions",
description: "The permissions object. Example: `{ \"access_control_list\": [{ \"user_name\": \"alice@example.com\", \"permission_level\": \"CAN_MANAGE\" }] }`",
},
},
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;
},
};
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)",
version: "0.0.1",
type: "action",
props: {
databricks,
warehouseId: {
type: "string",
label: "Warehouse ID",
description: "The ID of the SQL Warehouse to start",
},
},
async run({ $ }) {
const response = await this.databricks.startSQLWarehouse({
warehouseId: this.warehouseId,
$,
});

$.export("$summary", `Successfully started SQL Warehouse with ID ${this.warehouseId}`);
return response;
},
};
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",
},
},
async run({ $ }) {
const response = await this.databricks.stopSQLWarehouse({
warehouseId: this.warehouseId,
$,
});

$.export("$summary", `Successfully stopped SQL Warehouse with ID ${this.warehouseId}`);
return response;
},
};
Loading