Skip to content

Commit 99dfc76

Browse files
committed
updates
1 parent 9bfe023 commit 99dfc76

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default {
8383
type: "object",
8484
label: "Channel",
8585
description:
86-
"Channel details. Example: `{ \"name\": \"CHANNEL_NAME_CURRENT\", \"dbsql_version\": \"2023.35\" }`",
86+
"Channel details. Example: `{ \"name\": \"CHANNEL_NAME_CUSTOM\", \"dbsql_version\": \"2023.35\" }`",
8787
optional: true,
8888
},
8989
tags: {

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default {
9292
channel: {
9393
type: "object",
9494
label: "Channel",
95-
description: "Channel details. Example: `{ \"name\": \"CHANNEL_NAME_CURRENT\", \"dbsql_version\": \"2023.35\" }`",
95+
description: "Channel details. Example: `{ \"name\": \"CHANNEL_NAME_CUSTOM\", \"dbsql_version\": \"2023.35\" }`",
9696
optional: true,
9797
},
9898
instanceProfileArn: {
@@ -179,7 +179,5 @@ export default {
179179

180180
$.export("$summary", `Successfully edited SQL Warehouse ID ${this.warehouseId}`);
181181
return response;
182-
}
183-
,
184-
182+
},
185183
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default {
3636
channel: {
3737
type: "object",
3838
label: "Channel",
39-
description: "Channel details. Example: `{ \"name\": \"CHANNEL_NAME_PREVIEW\", \"dbsql_version\": \"2023.35\" }`",
39+
description: "Channel details. Example: `{ \"name\": \"CHANNEL_NAME_CUSTOM\", \"dbsql_version\": \"2023.35\" }`",
4040
optional: true,
4141
},
4242
enabledWarehouseTypes: {

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import databricks from "../../databricks.app.mjs";
2+
import utils from "../../common/utils.mjs";
3+
import { ConfigurationError } from "@pipedream/platform";
24

35
export default {
46
key: "databricks-set-sql-warehouse-permissions",
@@ -22,17 +24,11 @@ export default {
2224
},
2325
},
2426
async run({ $ }) {
25-
let acl = [];
26-
try {
27-
acl = (this.accessControlList || [])
28-
.map((entry) =>
29-
typeof entry === "string"
30-
? JSON.parse(entry)
31-
: entry)
32-
.filter((entry) => entry && Object.keys(entry).length > 0);
33-
} catch (err) {
34-
throw new Error(`Invalid JSON in Access Control List: ${err.message}`);
27+
let acl = utils.parseObject(this.accessControlList);
28+
if (!Array.isArray(acl)) {
29+
throw new ConfigurationError("Access Control List must be an array");
3530
}
31+
acl = acl.filter((entry) => entry && Object.keys(entry).length > 0);
3632

3733
const response = await this.databricks.setSQLWarehousePermissions({
3834
warehouseId: this.warehouseId,

0 commit comments

Comments
 (0)