Skip to content

Commit a08f3ca

Browse files
authored
Databricks vector search endpoints (#18256)
* Add vector search endpoint actions and update package version - Introduced actions for creating, deleting, getting, and listing vector search endpoints. - Added endpoint name prop for dynamic endpoint selection. - Updated package version to 0.2.0 and dependencies to the latest version. - Incremented version for existing actions to 0.0.2 where applicable. * pnpm update * Update Databricks SQL Warehouse actions and versions - Incremented version numbers for multiple Databricks SQL Warehouse actions to 0.0.2 and 0.0.3 as applicable. - Added missing closing brackets in the `databricks.app.mjs` file. - Updated the `get-run-output` and `list-runs` actions to version 0.0.3. - Ensured consistency in action descriptions and documentation links. * Increment package version to 0.3.0 for @pipedream/databricks
1 parent ea4b419 commit a08f3ca

File tree

21 files changed

+209
-18
lines changed

21 files changed

+209
-18
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { ConfigurationError } from "@pipedream/platform";
2+
import databricks from "../../databricks.app.mjs";
3+
4+
export default {
5+
key: "databricks-create-endpoint",
6+
name: "Create Endpoint",
7+
description: "Create a new vector search endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/createendpoint)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
databricks,
12+
name: {
13+
type: "string",
14+
label: "Endpoint Name",
15+
description: "The name of the vector search endpoint",
16+
},
17+
},
18+
async run({ $ }) {
19+
try {
20+
const response = await this.databricks.createEndpoint({
21+
data: {
22+
name: this.name,
23+
endpoint_type: "STANDARD",
24+
},
25+
$,
26+
});
27+
28+
if (response) {
29+
$.export("$summary", `Successfully created endpoint with ID ${response.id}.`);
30+
}
31+
32+
return response;
33+
} catch ({ response }) {
34+
throw new ConfigurationError(response.data.message);
35+
}
36+
},
37+
};

components/databricks/actions/create-sql-warehouse/create-sql-warehouse.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "databricks-create-sql-warehouse",
88
name: "Create SQL Warehouse",
99
description: "Creates a new SQL Warehouse in Databricks. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/create)",
10-
version: "0.0.1",
10+
version: "0.0.2",
1111
type: "action",
1212
props: {
1313
databricks,
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import databricks from "../../databricks.app.mjs";
2+
3+
export default {
4+
key: "databricks-delete-endpoint",
5+
name: "Delete Endpoint",
6+
description: "Delete a vector search endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/deleteendpoint)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
databricks,
11+
endpointName: {
12+
propDefinition: [
13+
databricks,
14+
"endpointName",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.databricks.deleteEndpoint({
20+
endpointName: this.endpointName,
21+
$,
22+
});
23+
24+
$.export("$summary", `Successfully deleted endpoint "${this.endpointName}".`);
25+
return response;
26+
},
27+
};

components/databricks/actions/delete-sql-warehouse/delete-sql-warehouse.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "databricks-delete-sql-warehouse",
55
name: "Delete SQL Warehouse",
66
description: "Deletes a SQL Warehouse by ID. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/delete)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
databricks,

components/databricks/actions/edit-sql-warehouse/edit-sql-warehouse.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "databricks-edit-sql-warehouse",
88
name: "Edit SQL Warehouse",
99
description: "Edits the configuration of an existing SQL Warehouse. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/edit)",
10-
version: "0.0.1",
10+
version: "0.0.2",
1111
type: "action",
1212
props: {
1313
databricks,
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import databricks from "../../databricks.app.mjs";
2+
3+
export default {
4+
key: "databricks-get-endpoint",
5+
name: "Get Endpoint",
6+
description: "Get details of a specific vector search endpoint. [See the documentation](https://docs.databricks.com/api/workspace/vectorsearchendpoints/getendpoint)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
databricks,
11+
endpointName: {
12+
propDefinition: [
13+
databricks,
14+
"endpointName",
15+
],
16+
},
17+
},
18+
async run({ $ }) {
19+
const response = await this.databricks.getEndpoint({
20+
endpointName: this.endpointName,
21+
$,
22+
});
23+
24+
if (response) {
25+
$.export("$summary", `Successfully retrieved endpoint "${this.endpointName}".`);
26+
}
27+
28+
return response;
29+
},
30+
};

components/databricks/actions/get-run-output/get-run-output.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "databricks-get-run-output",
55
name: "Get Run Output",
66
description: "Retrieve the output and metadata of a single task run. [See the documentation](https://docs.databricks.com/en/workflows/jobs/jobs-2.0-api.html#runs-get-output)",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
type: "action",
99
props: {
1010
databricks,

components/databricks/actions/get-sql-warehouse-config/get-sql-warehouse-config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "databricks-get-sql-warehouse-config",
55
name: "Get SQL Warehouse Config",
66
description: "Retrieves the global configuration for SQL Warehouses. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/getworkspacewarehouseconfig)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
databricks,

components/databricks/actions/get-sql-warehouse-permissions/get-sql-warehouse-permissions.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "databricks-get-sql-warehouse-permissions",
55
name: "Get SQL Warehouse Permissions",
66
description: "Retrieves the permissions for a specific SQL Warehouse. [See the documentation](https://docs.databricks.com/api/workspace/warehouses/getpermissions)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
databricks,

components/databricks/actions/get-sql-warehouse/get-sql-warehouse.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "databricks-get-sql-warehouse",
55
name: "Get SQL Warehouse",
66
description: "Retrieves details for a specific SQL Warehouse. [See docs](https://docs.databricks.com/api/workspace/warehouses/get)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
databricks,

0 commit comments

Comments
 (0)