dataiku-sdk 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/packages/types/src/index.d.ts +19 -2
- package/dist/packages/types/src/index.js +13 -1
- package/dist/src/cli/coerce.d.ts +36 -0
- package/dist/src/cli/coerce.js +239 -0
- package/dist/src/cli/commands/analysis.d.ts +2 -0
- package/dist/src/cli/commands/analysis.js +66 -0
- package/dist/src/cli/commands/api-deployer.d.ts +2 -0
- package/dist/src/cli/commands/api-deployer.js +170 -0
- package/dist/src/cli/commands/api-service.d.ts +2 -0
- package/dist/src/cli/commands/api-service.js +121 -0
- package/dist/src/cli/commands/app.d.ts +2 -0
- package/dist/src/cli/commands/app.js +78 -0
- package/dist/src/cli/commands/bundle.d.ts +2 -0
- package/dist/src/cli/commands/bundle.js +107 -0
- package/dist/src/cli/commands/business-app.d.ts +2 -0
- package/dist/src/cli/commands/business-app.js +76 -0
- package/dist/src/cli/commands/code-env.d.ts +2 -0
- package/dist/src/cli/commands/code-env.js +255 -0
- package/dist/src/cli/commands/code.d.ts +2 -0
- package/dist/src/cli/commands/code.js +63 -0
- package/dist/src/cli/commands/connection.d.ts +2 -0
- package/dist/src/cli/commands/connection.js +54 -0
- package/dist/src/cli/commands/continuous-activity.d.ts +2 -0
- package/dist/src/cli/commands/continuous-activity.js +38 -0
- package/dist/src/cli/commands/dashboard.d.ts +2 -0
- package/dist/src/cli/commands/dashboard.js +99 -0
- package/dist/src/cli/commands/data-quality.d.ts +2 -0
- package/dist/src/cli/commands/data-quality.js +235 -0
- package/dist/src/cli/commands/dataset.d.ts +2 -0
- package/dist/src/cli/commands/dataset.js +288 -0
- package/dist/src/cli/commands/discussion.d.ts +2 -0
- package/dist/src/cli/commands/discussion.js +47 -0
- package/dist/src/cli/commands/doctor.d.ts +2 -0
- package/dist/src/cli/commands/doctor.js +9 -0
- package/dist/src/cli/commands/flow-zone.d.ts +2 -0
- package/dist/src/cli/commands/flow-zone.js +282 -0
- package/dist/src/cli/commands/folder.d.ts +2 -0
- package/dist/src/cli/commands/folder.js +202 -0
- package/dist/src/cli/commands/future.d.ts +2 -0
- package/dist/src/cli/commands/future.js +57 -0
- package/dist/src/cli/commands/index.d.ts +2 -0
- package/dist/src/cli/commands/index.js +78 -0
- package/dist/src/cli/commands/insight.d.ts +2 -0
- package/dist/src/cli/commands/insight.js +156 -0
- package/dist/src/cli/commands/job.d.ts +2 -0
- package/dist/src/cli/commands/job.js +406 -0
- package/dist/src/cli/commands/meaning.d.ts +2 -0
- package/dist/src/cli/commands/meaning.js +115 -0
- package/dist/src/cli/commands/metrics.d.ts +2 -0
- package/dist/src/cli/commands/metrics.js +39 -0
- package/dist/src/cli/commands/ml-task.d.ts +2 -0
- package/dist/src/cli/commands/ml-task.js +171 -0
- package/dist/src/cli/commands/model-evaluation-store.d.ts +2 -0
- package/dist/src/cli/commands/model-evaluation-store.js +83 -0
- package/dist/src/cli/commands/notebook.d.ts +2 -0
- package/dist/src/cli/commands/notebook.js +242 -0
- package/dist/src/cli/commands/project-deployer.d.ts +2 -0
- package/dist/src/cli/commands/project-deployer.js +118 -0
- package/dist/src/cli/commands/project-library.d.ts +2 -0
- package/dist/src/cli/commands/project-library.js +197 -0
- package/dist/src/cli/commands/project.d.ts +2 -0
- package/dist/src/cli/commands/project.js +133 -0
- package/dist/src/cli/commands/recipe.d.ts +2 -0
- package/dist/src/cli/commands/recipe.js +659 -0
- package/dist/src/cli/commands/saved-model.d.ts +2 -0
- package/dist/src/cli/commands/saved-model.js +85 -0
- package/dist/src/cli/commands/scenario.d.ts +2 -0
- package/dist/src/cli/commands/scenario.js +190 -0
- package/dist/src/cli/commands/sql.d.ts +2 -0
- package/dist/src/cli/commands/sql.js +109 -0
- package/dist/src/cli/commands/statistics.d.ts +2 -0
- package/dist/src/cli/commands/statistics.js +165 -0
- package/dist/src/cli/commands/streaming-endpoint.d.ts +2 -0
- package/dist/src/cli/commands/streaming-endpoint.js +50 -0
- package/dist/src/cli/commands/variable.d.ts +2 -0
- package/dist/src/cli/commands/variable.js +49 -0
- package/dist/src/cli/commands/webapp.d.ts +2 -0
- package/dist/src/cli/commands/webapp.js +67 -0
- package/dist/src/cli/commands/wiki.d.ts +2 -0
- package/dist/src/cli/commands/wiki.js +123 -0
- package/dist/src/cli/commands/workspace.d.ts +2 -0
- package/dist/src/cli/commands/workspace.js +68 -0
- package/dist/src/cli/contract.d.ts +104 -0
- package/dist/src/cli/contract.js +2041 -0
- package/dist/src/cli/doctor.d.ts +104 -0
- package/dist/src/cli/doctor.js +356 -0
- package/dist/src/cli/env.d.ts +2 -0
- package/dist/src/cli/env.js +37 -0
- package/dist/src/cli/flags.d.ts +16 -0
- package/dist/src/cli/flags.js +272 -0
- package/dist/src/cli/helpers/cleanup.d.ts +3 -0
- package/dist/src/cli/helpers/cleanup.js +204 -0
- package/dist/src/cli/helpers/dataset.d.ts +2 -0
- package/dist/src/cli/helpers/dataset.js +17 -0
- package/dist/src/cli/helpers/flow-zone.d.ts +69 -0
- package/dist/src/cli/helpers/flow-zone.js +420 -0
- package/dist/src/cli/helpers/recipe.d.ts +11 -0
- package/dist/src/cli/helpers/recipe.js +83 -0
- package/dist/src/cli/output.d.ts +38 -0
- package/dist/src/cli/output.js +159 -0
- package/dist/src/cli/runtime.d.ts +15 -0
- package/dist/src/cli/runtime.js +59 -0
- package/dist/src/cli/types.d.ts +25 -0
- package/dist/src/cli/types.js +1 -0
- package/dist/src/cli/usage.d.ts +16 -0
- package/dist/src/cli/usage.js +84 -0
- package/dist/src/cli/version.d.ts +14 -0
- package/dist/src/cli/version.js +63 -0
- package/dist/src/cli.js +671 -8254
- package/dist/src/client.d.ts +13 -1
- package/dist/src/client.js +34 -13
- package/dist/src/errors.d.ts +6 -0
- package/dist/src/errors.js +102 -4
- package/dist/src/index.d.ts +7 -3
- package/dist/src/index.js +6 -2
- package/dist/src/resources/analyses.d.ts +34 -0
- package/dist/src/resources/analyses.js +31 -0
- package/dist/src/resources/api-services.d.ts +2 -0
- package/dist/src/resources/api-services.js +10 -0
- package/dist/src/resources/applications.d.ts +1 -1
- package/dist/src/resources/applications.js +27 -1
- package/dist/src/resources/continuous-activities.js +1 -0
- package/dist/src/resources/data-quality.js +5 -3
- package/dist/src/resources/datasets.d.ts +3 -0
- package/dist/src/resources/datasets.js +10 -5
- package/dist/src/resources/flow-zones.d.ts +2 -2
- package/dist/src/resources/flow-zones.js +4 -1
- package/dist/src/resources/meanings.d.ts +2 -0
- package/dist/src/resources/meanings.js +4 -0
- package/dist/src/resources/ml-tasks.d.ts +91 -0
- package/dist/src/resources/ml-tasks.js +130 -0
- package/dist/src/resources/model-evaluation-stores.d.ts +41 -0
- package/dist/src/resources/model-evaluation-stores.js +36 -0
- package/dist/src/resources/notebooks.d.ts +5 -7
- package/dist/src/resources/notebooks.js +10 -7
- package/dist/src/resources/projects.d.ts +1 -1
- package/dist/src/resources/projects.js +2 -2
- package/dist/src/resources/recipes.d.ts +3 -3
- package/dist/src/resources/recipes.js +198 -38
- package/dist/src/resources/saved-models.d.ts +41 -0
- package/dist/src/resources/saved-models.js +40 -0
- package/dist/src/resources/scenarios.js +67 -26
- package/dist/src/resources/statistics.js +9 -0
- package/dist/src/schemas.d.ts +2 -2
- package/dist/src/schemas.js +1 -1
- package/dist/src/skill.js +2 -2
- package/dist/src/utils/sanitize.js +2 -1
- package/package.json +1 -1
- package/packages/types/dist/index.d.ts +19 -2
- package/packages/types/dist/index.js +13 -1
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { buildDatasetCloneSettings, } from "../../resources/datasets.js";
|
|
2
|
+
import { deepMerge, } from "../../utils/deep-merge.js";
|
|
3
|
+
import { jsonInput, num, schemaColumnsInput, } from "../coerce.js";
|
|
4
|
+
import { datasetSourceSummary, } from "../helpers/dataset.js";
|
|
5
|
+
import { moveCreatedItemsToZone, resolveFlowZoneIdFromFlags, } from "../helpers/flow-zone.js";
|
|
6
|
+
import { enqueueCliWarning, readIfExists, skipResult, } from "../output.js";
|
|
7
|
+
import { requireArgs, UsageError, } from "../usage.js";
|
|
8
|
+
export const datasetCommands = {
|
|
9
|
+
list: {
|
|
10
|
+
handler: (c, _a, f) => c.datasets.list(f["project-key"]),
|
|
11
|
+
usage: "dss dataset list [--project-key KEY]",
|
|
12
|
+
description: "List all datasets in a project.",
|
|
13
|
+
examples: ["dss dataset list", "dss dataset list --project-key MYPROJ",],
|
|
14
|
+
},
|
|
15
|
+
rename: {
|
|
16
|
+
handler: async (c, a, f) => {
|
|
17
|
+
requireArgs(a, 2, "dss dataset rename <oldName> <newName> [--project-key KEY]");
|
|
18
|
+
await c.datasets.rename(a[0], a[1], f["project-key"]);
|
|
19
|
+
return { renamed: a[0], to: a[1], };
|
|
20
|
+
},
|
|
21
|
+
usage: "dss dataset rename <oldName> <newName> [--project-key KEY]",
|
|
22
|
+
description: "Rename a dataset (updates downstream flow references).",
|
|
23
|
+
examples: ["dss dataset rename old_ds new_ds",],
|
|
24
|
+
},
|
|
25
|
+
"list-partitions": {
|
|
26
|
+
handler: (c, a, f) => {
|
|
27
|
+
requireArgs(a, 1, "dss dataset list-partitions <name> [--project-key KEY]");
|
|
28
|
+
return c.datasets.listPartitions(a[0], f["project-key"]);
|
|
29
|
+
},
|
|
30
|
+
usage: "dss dataset list-partitions <name> [--project-key KEY]",
|
|
31
|
+
description: "List the partitions of a partitioned dataset.",
|
|
32
|
+
examples: ["dss dataset list-partitions events",],
|
|
33
|
+
},
|
|
34
|
+
clear: {
|
|
35
|
+
handler: async (c, a, f) => {
|
|
36
|
+
requireArgs(a, 1, "dss dataset clear <name> [--partitions SPEC] [--project-key KEY]");
|
|
37
|
+
const partitions = f["partitions"];
|
|
38
|
+
await c.datasets.clear(a[0], partitions, f["project-key"]);
|
|
39
|
+
return { cleared: a[0], partitions: partitions ?? "ALL", };
|
|
40
|
+
},
|
|
41
|
+
usage: "dss dataset clear <name> [--partitions SPEC] [--project-key KEY]",
|
|
42
|
+
description: "Clear a dataset's data (all, or a partition spec); keeps the dataset.",
|
|
43
|
+
examples: ["dss dataset clear staging", "dss dataset clear events --partitions 2024-01",],
|
|
44
|
+
},
|
|
45
|
+
get: {
|
|
46
|
+
handler: (c, a, f) => {
|
|
47
|
+
requireArgs(a, 1, "dss dataset get <name>");
|
|
48
|
+
return c.datasets.get(a[0], f["project-key"]);
|
|
49
|
+
},
|
|
50
|
+
usage: "dss dataset get <name> [--project-key KEY]",
|
|
51
|
+
description: "Get full settings for a dataset.",
|
|
52
|
+
examples: ["dss dataset get orders", "dss dataset get orders --project-key MYPROJ",],
|
|
53
|
+
},
|
|
54
|
+
schema: {
|
|
55
|
+
handler: (c, a, f) => {
|
|
56
|
+
requireArgs(a, 1, "dss dataset schema <name>");
|
|
57
|
+
return c.datasets.schema(a[0], f["project-key"]);
|
|
58
|
+
},
|
|
59
|
+
usage: "dss dataset schema <name> [--project-key KEY]",
|
|
60
|
+
description: "Show the column schema of a dataset.",
|
|
61
|
+
examples: ["dss dataset schema orders",],
|
|
62
|
+
},
|
|
63
|
+
source: {
|
|
64
|
+
handler: async (c, a, f) => {
|
|
65
|
+
requireArgs(a, 1, "dss dataset source <name>");
|
|
66
|
+
return datasetSourceSummary(await c.datasets.get(a[0], f["project-key"]));
|
|
67
|
+
},
|
|
68
|
+
usage: "dss dataset source <name> [--project-key KEY]",
|
|
69
|
+
description: "Show backing connection, catalog/schema/table, path, and format for a dataset.",
|
|
70
|
+
examples: ["dss dataset source orders",],
|
|
71
|
+
},
|
|
72
|
+
"refresh-schema": {
|
|
73
|
+
handler: async (c, a, f) => {
|
|
74
|
+
const usage = "dss dataset refresh-schema <name> [--data JSON | --data-file PATH | --stdin] [--dry-run] [--project-key KEY]";
|
|
75
|
+
requireArgs(a, 1, usage);
|
|
76
|
+
const columns = schemaColumnsInput(f, usage);
|
|
77
|
+
const pk = f["project-key"];
|
|
78
|
+
if (f["dry-run"] === true) {
|
|
79
|
+
const current = await c.datasets.schema(a[0], pk);
|
|
80
|
+
return {
|
|
81
|
+
dryRun: true,
|
|
82
|
+
action: "refresh-schema",
|
|
83
|
+
resource: "dataset",
|
|
84
|
+
name: a[0],
|
|
85
|
+
current,
|
|
86
|
+
next: { columns, },
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
await c.datasets.updateSchema(a[0], columns, pk);
|
|
90
|
+
return { updated: a[0], resource: "dataset", schema: { columns, }, };
|
|
91
|
+
},
|
|
92
|
+
usage: "dss dataset refresh-schema <name> [--data JSON | --data-file PATH | --stdin] [--dry-run] [--project-key KEY]",
|
|
93
|
+
description: "Replace a dataset schema through the DSS schema endpoint.",
|
|
94
|
+
examples: [
|
|
95
|
+
`dss dataset refresh-schema orders --data '{"columns":[{"name":"id","type":"bigint"}]}' --dry-run`,
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
"validate-build": {
|
|
99
|
+
handler: (c, a, f) => {
|
|
100
|
+
requireArgs(a, 1, "dss dataset validate-build <name>");
|
|
101
|
+
return c.datasets.validateBuildSettings(a[0], f["project-key"]);
|
|
102
|
+
},
|
|
103
|
+
usage: "dss dataset validate-build <name> [--project-key KEY]",
|
|
104
|
+
description: "Check common dataset settings that can make file-backed builds fail.",
|
|
105
|
+
examples: ["dss dataset validate-build orders",],
|
|
106
|
+
},
|
|
107
|
+
preview: {
|
|
108
|
+
handler: (c, a, f) => {
|
|
109
|
+
requireArgs(a, 1, "dss dataset preview <name>");
|
|
110
|
+
return c.datasets.preview(a[0], {
|
|
111
|
+
maxRows: num(f["max-rows"]),
|
|
112
|
+
projectKey: f["project-key"],
|
|
113
|
+
timeoutMs: num(f["timeout"]),
|
|
114
|
+
});
|
|
115
|
+
},
|
|
116
|
+
usage: "dss dataset preview <name> [--max-rows N] [--rows N] [--project-key KEY] [--timeout MS]",
|
|
117
|
+
description: "Preview dataset rows (--rows is an alias for --max-rows).",
|
|
118
|
+
examples: ["dss dataset preview orders", "dss dataset preview orders --rows 5",],
|
|
119
|
+
},
|
|
120
|
+
metadata: {
|
|
121
|
+
handler: (c, a, f) => {
|
|
122
|
+
requireArgs(a, 1, "dss dataset metadata <name>");
|
|
123
|
+
return c.datasets.metadata(a[0], f["project-key"]);
|
|
124
|
+
},
|
|
125
|
+
usage: "dss dataset metadata <name> [--project-key KEY]",
|
|
126
|
+
description: "Get dataset-level metadata.",
|
|
127
|
+
examples: ["dss dataset metadata orders",],
|
|
128
|
+
},
|
|
129
|
+
download: {
|
|
130
|
+
handler: async (c, a, f) => {
|
|
131
|
+
requireArgs(a, 1, "dss dataset download <name>");
|
|
132
|
+
const result = await c.datasets.download(a[0], {
|
|
133
|
+
outputPath: f["output"],
|
|
134
|
+
projectKey: f["project-key"],
|
|
135
|
+
limit: num(f["limit"]),
|
|
136
|
+
});
|
|
137
|
+
if (result.truncated) {
|
|
138
|
+
enqueueCliWarning({
|
|
139
|
+
code: "dataset_download_truncated",
|
|
140
|
+
message: `Download of '${a[0]}' stopped at the ${result.limit}-row cap; the dataset has more rows. `
|
|
141
|
+
+ "Re-run with --limit N for more, or read inside a recipe (get_dataframe) for the full data.",
|
|
142
|
+
dataset: a[0],
|
|
143
|
+
rows: result.rows,
|
|
144
|
+
limit: result.limit,
|
|
145
|
+
path: result.path,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
if (!f["output"]) {
|
|
149
|
+
enqueueCliWarning({
|
|
150
|
+
code: "dataset_download_default_location",
|
|
151
|
+
message: `No --output was given, so '${a[0]}' was written to '${result.path}' in the current directory. `
|
|
152
|
+
+ "Pass --output PATH to control the destination and avoid writing into your working tree.",
|
|
153
|
+
dataset: a[0],
|
|
154
|
+
path: result.path,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return result;
|
|
158
|
+
},
|
|
159
|
+
usage: "dss dataset download <name> [--output PATH] [--limit N] [--project-key KEY]",
|
|
160
|
+
description: "Download up to --limit rows (default 100k) as CSV; returns { path, rows, truncated, limit }. When truncated, a dataset_download_truncated warning is written to stderr; when --output is omitted, a dataset_download_default_location warning names the file's path in the working directory so the write is never silent.",
|
|
161
|
+
examples: ["dss dataset download orders", "dss dataset download orders --output ./data/",],
|
|
162
|
+
},
|
|
163
|
+
create: {
|
|
164
|
+
handler: async (c, _a, f) => {
|
|
165
|
+
const pk = f["project-key"];
|
|
166
|
+
const name = f["name"];
|
|
167
|
+
const connection = f["connection"];
|
|
168
|
+
const dsType = f["type"];
|
|
169
|
+
if (!name || !connection || !dsType) {
|
|
170
|
+
throw new UsageError("--name, --connection, and --type are required. Usage: dss dataset create --name NAME --connection CONN --type TYPE");
|
|
171
|
+
}
|
|
172
|
+
const payload = {
|
|
173
|
+
datasetName: name,
|
|
174
|
+
connection,
|
|
175
|
+
dsType,
|
|
176
|
+
projectKey: pk,
|
|
177
|
+
};
|
|
178
|
+
const zoneId = await resolveFlowZoneIdFromFlags(c, f, pk);
|
|
179
|
+
if (f["if-not-exists"] === true || f["dry-run"] === true) {
|
|
180
|
+
const list = await c.datasets.list(pk);
|
|
181
|
+
const existing = list.find((d) => d.name === name);
|
|
182
|
+
if (existing && f["if-not-exists"] === true && f["dry-run"] !== true) {
|
|
183
|
+
return skipResult("dataset", name, "exists", { current: existing, });
|
|
184
|
+
}
|
|
185
|
+
if (f["dry-run"] === true) {
|
|
186
|
+
return {
|
|
187
|
+
dryRun: true,
|
|
188
|
+
action: "create",
|
|
189
|
+
resource: "dataset",
|
|
190
|
+
name,
|
|
191
|
+
payload,
|
|
192
|
+
...(existing ? { current: existing, } : {}),
|
|
193
|
+
...(zoneId ? { zoneId, zoneMove: [{ objectId: name, objectType: "DATASET", },], } : {}),
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
await c.datasets.create(payload);
|
|
198
|
+
const moved = await moveCreatedItemsToZone(c, f, [{ objectId: name, objectType: "DATASET", },], pk);
|
|
199
|
+
return { created: name, resource: "dataset", ...moved, };
|
|
200
|
+
},
|
|
201
|
+
usage: "dss dataset create --name NAME --connection CONN --type TYPE [--zone ZONE|--zone-id ID] [--if-not-exists] [--dry-run] [--project-key KEY]",
|
|
202
|
+
description: "Create a new dataset.",
|
|
203
|
+
examples: [
|
|
204
|
+
"dss dataset create --name orders --connection filesystem --type Filesystem",
|
|
205
|
+
"dss dataset create --name orders --connection filesystem --type Filesystem --zone Experiments --dry-run",
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
clone: {
|
|
209
|
+
handler: async (c, a, f) => {
|
|
210
|
+
const usage = "dss dataset clone <source> <target> [--path PATH] [--table TABLE] [--metastore-table TABLE] [--allow-same-path] [--zone ZONE|--zone-id ID] [--dry-run] [--project-key KEY]";
|
|
211
|
+
requireArgs(a, 2, usage);
|
|
212
|
+
const pk = f["project-key"];
|
|
213
|
+
const opts = {
|
|
214
|
+
projectKey: pk,
|
|
215
|
+
path: f["path"],
|
|
216
|
+
table: f["table"],
|
|
217
|
+
metastoreTableName: f["metastore-table"],
|
|
218
|
+
allowSamePath: f["allow-same-path"] === true,
|
|
219
|
+
};
|
|
220
|
+
const current = await c.datasets.get(a[0], pk);
|
|
221
|
+
const next = buildDatasetCloneSettings(current, a[1], pk ?? c.resolveProjectKey(pk), opts);
|
|
222
|
+
const zoneId = await resolveFlowZoneIdFromFlags(c, f, pk);
|
|
223
|
+
if (f["dry-run"] === true) {
|
|
224
|
+
return {
|
|
225
|
+
dryRun: true,
|
|
226
|
+
action: "clone",
|
|
227
|
+
resource: "dataset",
|
|
228
|
+
source: a[0],
|
|
229
|
+
target: a[1],
|
|
230
|
+
current,
|
|
231
|
+
next,
|
|
232
|
+
...(zoneId ? { zoneId, zoneMove: [{ objectId: a[1], objectType: "DATASET", },], } : {}),
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
const cloned = await c.datasets.clone(a[0], a[1], opts);
|
|
236
|
+
const moved = await moveCreatedItemsToZone(c, f, [{ objectId: a[1], objectType: "DATASET", },], pk);
|
|
237
|
+
return { ...cloned, resource: "dataset", ...moved, };
|
|
238
|
+
},
|
|
239
|
+
usage: "dss dataset clone <source> <target> [--path PATH] [--table TABLE] [--metastore-table TABLE] [--allow-same-path] [--zone ZONE|--zone-id ID] [--dry-run] [--project-key KEY]",
|
|
240
|
+
description: "Clone dataset settings into a new dataset, with storage/table overrides.",
|
|
241
|
+
examples: [
|
|
242
|
+
"dss dataset clone source_ds experiment_ds --path /dataiku/TEST/experiment_ds --dry-run",
|
|
243
|
+
"dss dataset clone source_ds experiment_ds --allow-same-path",
|
|
244
|
+
],
|
|
245
|
+
},
|
|
246
|
+
delete: {
|
|
247
|
+
handler: async (c, a, f) => {
|
|
248
|
+
requireArgs(a, 1, "dss dataset delete <name>");
|
|
249
|
+
const pk = f["project-key"];
|
|
250
|
+
if (f["dry-run"] === true || f["if-exists"] === true) {
|
|
251
|
+
const current = await readIfExists(() => c.datasets.get(a[0], pk));
|
|
252
|
+
if (!current)
|
|
253
|
+
return skipResult("dataset", a[0], "missing");
|
|
254
|
+
if (f["dry-run"] === true) {
|
|
255
|
+
return { dryRun: true, action: "delete", resource: "dataset", name: a[0], current, };
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
await c.datasets.delete(a[0], pk);
|
|
259
|
+
return { deleted: a[0], resource: "dataset", };
|
|
260
|
+
},
|
|
261
|
+
usage: "dss dataset delete <name> [--if-exists] [--dry-run] [--project-key KEY]",
|
|
262
|
+
description: "Delete a dataset.",
|
|
263
|
+
examples: ["dss dataset delete orders", "dss dataset delete orders --if-exists",],
|
|
264
|
+
},
|
|
265
|
+
update: {
|
|
266
|
+
handler: async (c, a, f) => {
|
|
267
|
+
requireArgs(a, 1, "dss dataset update <name> [--data '{...}' | --data-file PATH | --stdin]");
|
|
268
|
+
const data = jsonInput(f);
|
|
269
|
+
if (!data) {
|
|
270
|
+
throw new UsageError("--data, --data-file, or --stdin is required. Usage: dss dataset update <name> [--data '{...}' | --data-file PATH | --stdin]");
|
|
271
|
+
}
|
|
272
|
+
const pk = f["project-key"];
|
|
273
|
+
if (f["dry-run"] === true) {
|
|
274
|
+
const current = await c.datasets.get(a[0], pk);
|
|
275
|
+
const next = deepMerge(current, data);
|
|
276
|
+
return { dryRun: true, action: "update", resource: "dataset", name: a[0], current, next, };
|
|
277
|
+
}
|
|
278
|
+
await c.datasets.update(a[0], data, pk);
|
|
279
|
+
return { updated: a[0], resource: "dataset", };
|
|
280
|
+
},
|
|
281
|
+
usage: "dss dataset update <name> [--data '{...}' | --data-file PATH | --stdin] [--dry-run] [--project-key KEY]",
|
|
282
|
+
description: "Update dataset settings via JSON merge.",
|
|
283
|
+
examples: [
|
|
284
|
+
'dss dataset update orders --data \'{"tags":["production"]}\' --dry-run',
|
|
285
|
+
"echo '{\"tags\":[]}' | dss dataset update orders --stdin",
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { requireArgs, UsageError, } from "../usage.js";
|
|
2
|
+
export const discussionCommands = {
|
|
3
|
+
list: {
|
|
4
|
+
handler: (c, a, f) => {
|
|
5
|
+
requireArgs(a, 2, "dss discussion list <objectType> <objectId> [--project-key KEY]");
|
|
6
|
+
return c.discussions.list(a[0], a[1], f["project-key"]);
|
|
7
|
+
},
|
|
8
|
+
usage: "dss discussion list <objectType> <objectId> [--project-key KEY]",
|
|
9
|
+
description: "List discussions attached to a project object.",
|
|
10
|
+
examples: ["dss discussion list DATASET customers",],
|
|
11
|
+
},
|
|
12
|
+
get: {
|
|
13
|
+
handler: (c, a, f) => {
|
|
14
|
+
requireArgs(a, 3, "dss discussion get <objectType> <objectId> <discussionId> [--project-key KEY]");
|
|
15
|
+
return c.discussions.get(a[0], a[1], a[2], f["project-key"]);
|
|
16
|
+
},
|
|
17
|
+
usage: "dss discussion get <objectType> <objectId> <discussionId> [--project-key KEY]",
|
|
18
|
+
description: "Get one discussion with its replies.",
|
|
19
|
+
examples: ["dss discussion get DATASET customers d123",],
|
|
20
|
+
},
|
|
21
|
+
create: {
|
|
22
|
+
handler: (c, a, f) => {
|
|
23
|
+
requireArgs(a, 2, "dss discussion create <objectType> <objectId> --topic TEXT --reply TEXT [--project-key KEY]");
|
|
24
|
+
const topic = f["topic"];
|
|
25
|
+
const reply = f["reply"];
|
|
26
|
+
if (!topic || !reply) {
|
|
27
|
+
throw new UsageError("--topic and --reply are required.", "missing_required_flag");
|
|
28
|
+
}
|
|
29
|
+
return c.discussions.create(a[0], a[1], topic, reply, f["project-key"]);
|
|
30
|
+
},
|
|
31
|
+
usage: "dss discussion create <objectType> <objectId> --topic TEXT --reply TEXT [--project-key KEY]",
|
|
32
|
+
description: "Create a discussion with its first reply.",
|
|
33
|
+
examples: ["dss discussion create DATASET customers --topic Schema --reply Please-review",],
|
|
34
|
+
},
|
|
35
|
+
reply: {
|
|
36
|
+
handler: (c, a, f) => {
|
|
37
|
+
requireArgs(a, 3, "dss discussion reply <objectType> <objectId> <discussionId> --text TEXT [--project-key KEY]");
|
|
38
|
+
const text = f["text"];
|
|
39
|
+
if (!text)
|
|
40
|
+
throw new UsageError("--text is required.", "missing_required_flag");
|
|
41
|
+
return c.discussions.reply(a[0], a[1], a[2], text, f["project-key"]);
|
|
42
|
+
},
|
|
43
|
+
usage: "dss discussion reply <objectType> <objectId> <discussionId> --text TEXT [--project-key KEY]",
|
|
44
|
+
description: "Add a reply to an existing discussion.",
|
|
45
|
+
examples: ["dss discussion reply DATASET customers d123 --text Done",],
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { runDoctor, } from "../doctor.js";
|
|
2
|
+
export const doctorCommands = {
|
|
3
|
+
run: {
|
|
4
|
+
handler: async (_c, _a, f) => (await runDoctor(f)).result,
|
|
5
|
+
usage: "dss doctor [--project-key KEY] [--capabilities] [--fast]",
|
|
6
|
+
description: "Run JSON diagnostics for DSS credentials, connectivity, and project access.",
|
|
7
|
+
examples: ["dss doctor", "dss doctor --project-key MYPROJ", "dss doctor --capabilities --fast",],
|
|
8
|
+
},
|
|
9
|
+
};
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { deepMerge, } from "../../utils/deep-merge.js";
|
|
2
|
+
import { ensureFlowZonePlanTarget, findFlowZoneForPlan, flowZoneColor, flowZoneContains, flowZoneCurrentPosition, flowZoneDetailSummary, flowZoneId, flowZoneMoveItems, flowZoneName, flowZoneOrganizeStep, flowZonePlanItemKeys, flowZonePruneItems, flowZoneSamePosition, flowZoneSummary, readFlowZoneOrganizePlan, resolveFlowZoneIdFromFlags, throwFlowZoneValidationError, validateFlowZoneOrganizeObjects, } from "../helpers/flow-zone.js";
|
|
3
|
+
import { readIfExists, skipResult, } from "../output.js";
|
|
4
|
+
import { requireArgs, UsageError, } from "../usage.js";
|
|
5
|
+
export const flowZoneCommands = {
|
|
6
|
+
list: {
|
|
7
|
+
handler: async (c, _a, f) => {
|
|
8
|
+
const zones = await c.flowZones.list(f["project-key"]);
|
|
9
|
+
if (f["summary"] !== true)
|
|
10
|
+
return zones;
|
|
11
|
+
const objects = flowZoneMoveItems(f);
|
|
12
|
+
const object = objects.length === 1 ? objects[0] : undefined;
|
|
13
|
+
return zones.map((zone) => flowZoneSummary(zone, object));
|
|
14
|
+
},
|
|
15
|
+
usage: "dss flow-zone list [--summary] [--object TYPE:ID] [--project-key KEY]",
|
|
16
|
+
description: "List flow zones in a project, optionally as compact summaries.",
|
|
17
|
+
examples: ["dss flow-zone list", "dss flow-zone list --summary --object RECIPE:compute_orders",],
|
|
18
|
+
},
|
|
19
|
+
find: {
|
|
20
|
+
handler: async (c, a, f) => {
|
|
21
|
+
const zones = await c.flowZones.list(f["project-key"]);
|
|
22
|
+
const objects = flowZoneMoveItems(f);
|
|
23
|
+
const query = a[0]?.trim();
|
|
24
|
+
if (query && objects.length === 0) {
|
|
25
|
+
const normalized = query.toLowerCase();
|
|
26
|
+
return zones
|
|
27
|
+
.filter((zone) => zone.id.toLowerCase().includes(normalized)
|
|
28
|
+
|| zone.name.toLowerCase().includes(normalized))
|
|
29
|
+
.map((zone) => flowZoneDetailSummary(zone));
|
|
30
|
+
}
|
|
31
|
+
if (objects.length !== 1) {
|
|
32
|
+
throw new UsageError("Exactly one zone name/id or object is required. Use <name>, --object TYPE:ID, --dataset DS, or --recipe R.");
|
|
33
|
+
}
|
|
34
|
+
const object = objects[0];
|
|
35
|
+
return zones
|
|
36
|
+
.filter((zone) => flowZoneContains(zone, object))
|
|
37
|
+
.map((zone) => flowZoneSummary(zone, object));
|
|
38
|
+
},
|
|
39
|
+
usage: "dss flow-zone find [name-or-id] [--object TYPE:ID | --dataset DS | --recipe R | --folder F] [--project-key KEY]",
|
|
40
|
+
description: "Find flow zones by name/id or by contained flow object.",
|
|
41
|
+
examples: [
|
|
42
|
+
"dss flow-zone find ATH_SNW_MAP_FRG49",
|
|
43
|
+
"dss flow-zone find --object RECIPE:compute_orders",
|
|
44
|
+
"dss flow-zone find --dataset orders",
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
get: {
|
|
48
|
+
handler: (c, a, f) => {
|
|
49
|
+
requireArgs(a, 1, "dss flow-zone get <id>");
|
|
50
|
+
return c.flowZones.get(flowZoneId(a[0]), f["project-key"]);
|
|
51
|
+
},
|
|
52
|
+
usage: "dss flow-zone get <id> [--project-key KEY]",
|
|
53
|
+
description: "Get a flow zone by id.",
|
|
54
|
+
examples: ["dss flow-zone get ZONE_ID",],
|
|
55
|
+
},
|
|
56
|
+
create: {
|
|
57
|
+
handler: async (c, _a, f) => {
|
|
58
|
+
const pk = f["project-key"];
|
|
59
|
+
const name = flowZoneName(f["name"]);
|
|
60
|
+
const payload = {
|
|
61
|
+
name,
|
|
62
|
+
color: flowZoneColor(f["color"]),
|
|
63
|
+
projectKey: pk,
|
|
64
|
+
};
|
|
65
|
+
if (f["if-not-exists"] === true || f["dry-run"] === true) {
|
|
66
|
+
const list = await c.flowZones.list(pk);
|
|
67
|
+
const existing = list.find((zone) => zone.name === name);
|
|
68
|
+
if (existing && f["if-not-exists"] === true && f["dry-run"] !== true) {
|
|
69
|
+
return skipResult("flow-zone", existing.id, "exists", { current: existing, });
|
|
70
|
+
}
|
|
71
|
+
if (f["dry-run"] === true) {
|
|
72
|
+
return {
|
|
73
|
+
dryRun: true,
|
|
74
|
+
action: "create",
|
|
75
|
+
resource: "flow-zone",
|
|
76
|
+
name,
|
|
77
|
+
payload,
|
|
78
|
+
...(existing ? { current: existing, } : {}),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const created = await c.flowZones.create(payload);
|
|
83
|
+
return { created: created.id, resource: "flow-zone", ...created, };
|
|
84
|
+
},
|
|
85
|
+
usage: "dss flow-zone create --name NAME [--color #RRGGBB] [--if-not-exists] [--dry-run] [--project-key KEY]",
|
|
86
|
+
description: "Create a flow zone.",
|
|
87
|
+
examples: [
|
|
88
|
+
"dss flow-zone create --name Exports",
|
|
89
|
+
"dss flow-zone create --name Exports --color '#2ab1ac' --dry-run",
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
update: {
|
|
93
|
+
handler: async (c, a, f) => {
|
|
94
|
+
requireArgs(a, 1, "dss flow-zone update <id> [--name NAME] [--color #RRGGBB]");
|
|
95
|
+
if (typeof f["name"] !== "string" && typeof f["color"] !== "string") {
|
|
96
|
+
throw new UsageError("--name and/or --color is required.");
|
|
97
|
+
}
|
|
98
|
+
const zoneId = flowZoneId(a[0]);
|
|
99
|
+
const pk = f["project-key"];
|
|
100
|
+
const patch = {
|
|
101
|
+
name: typeof f["name"] === "string" ? flowZoneName(f["name"]) : undefined,
|
|
102
|
+
color: flowZoneColor(f["color"]),
|
|
103
|
+
projectKey: pk,
|
|
104
|
+
};
|
|
105
|
+
if (f["dry-run"] === true) {
|
|
106
|
+
const current = await c.flowZones.get(zoneId, pk);
|
|
107
|
+
const next = deepMerge(current, patch);
|
|
108
|
+
return { dryRun: true, action: "update", resource: "flow-zone", id: zoneId, current, next, };
|
|
109
|
+
}
|
|
110
|
+
return c.flowZones.update(zoneId, patch);
|
|
111
|
+
},
|
|
112
|
+
usage: "dss flow-zone update <id> [--name NAME] [--color #RRGGBB] [--dry-run] [--project-key KEY]",
|
|
113
|
+
description: "Update flow zone settings.",
|
|
114
|
+
examples: ["dss flow-zone update ZONE_ID --name Exports --color '#2ab1ac' --dry-run",],
|
|
115
|
+
},
|
|
116
|
+
delete: {
|
|
117
|
+
handler: async (c, a, f) => {
|
|
118
|
+
requireArgs(a, 1, "dss flow-zone delete <id>");
|
|
119
|
+
const zoneId = flowZoneId(a[0]);
|
|
120
|
+
if (f["dry-run"] === true || f["if-exists"] === true) {
|
|
121
|
+
const current = await readIfExists(() => c.flowZones.get(zoneId, f["project-key"]));
|
|
122
|
+
if (!current)
|
|
123
|
+
return skipResult("flow-zone", zoneId, "missing");
|
|
124
|
+
if (f["dry-run"] === true) {
|
|
125
|
+
return { dryRun: true, action: "delete", resource: "flow-zone", id: zoneId, current, };
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
await c.flowZones.delete(zoneId, f["project-key"]);
|
|
129
|
+
return { deleted: zoneId, resource: "flow-zone", };
|
|
130
|
+
},
|
|
131
|
+
usage: "dss flow-zone delete <id> [--if-exists] [--dry-run] [--project-key KEY]",
|
|
132
|
+
description: "Delete a flow zone. DSS moves zone items back to the default zone.",
|
|
133
|
+
examples: [
|
|
134
|
+
"dss flow-zone delete ZONE_ID --dry-run",
|
|
135
|
+
"dss flow-zone delete ZONE_ID --if-exists",
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
move: {
|
|
139
|
+
handler: async (c, a, f) => {
|
|
140
|
+
const pk = f["project-key"];
|
|
141
|
+
const zoneId = a[0] ? flowZoneId(a[0]) : await resolveFlowZoneIdFromFlags(c, f, pk);
|
|
142
|
+
if (!zoneId) {
|
|
143
|
+
throw new UsageError("A zone id or --zone/--zone-id is required. Usage: dss flow-zone move <id> [--dataset DS] [--recipe R] [--folder F] [--object TYPE:ID]");
|
|
144
|
+
}
|
|
145
|
+
const items = flowZoneMoveItems(f);
|
|
146
|
+
if (items.length === 0) {
|
|
147
|
+
throw new UsageError("At least one object is required. Use --dataset, --recipe, --folder, or --object TYPE:ID.");
|
|
148
|
+
}
|
|
149
|
+
if (f["dry-run"] === true) {
|
|
150
|
+
return {
|
|
151
|
+
dryRun: true,
|
|
152
|
+
action: "move",
|
|
153
|
+
resource: "flow-zone",
|
|
154
|
+
id: zoneId,
|
|
155
|
+
items,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
return c.flowZones.moveItems(zoneId, items, pk);
|
|
159
|
+
},
|
|
160
|
+
usage: "dss flow-zone move [id] [--zone ZONE|--zone-id ID] [--dataset DS[,DS2]] [--recipe R] [--folder F] [--object TYPE:ID] [--dry-run] [--project-key KEY]",
|
|
161
|
+
description: "Move datasets, recipes, managed folders, or other flow objects into a zone by id or --zone name.",
|
|
162
|
+
examples: [
|
|
163
|
+
"dss flow-zone move ZONE_ID --dataset orders --dry-run",
|
|
164
|
+
"dss flow-zone move --zone ATH_SNW_MAP_FRG49 --dataset raw_orders,clean_orders --recipe prepare_orders",
|
|
165
|
+
"dss flow-zone move ZONE_ID --folder FOLDER_ID",
|
|
166
|
+
"dss flow-zone move ZONE_ID --object SAVED_MODEL:model_id",
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
organize: {
|
|
170
|
+
handler: async (c, _a, f) => {
|
|
171
|
+
const usage = "dss flow-zone organize (--data JSON|--data-file PATH|--file PATH|--stdin) [--sync] [--validate-objects] [--dry-run] [--project-key KEY]";
|
|
172
|
+
const pk = f["project-key"];
|
|
173
|
+
const plan = readFlowZoneOrganizePlan(f, usage);
|
|
174
|
+
const sync = f["sync"] === true;
|
|
175
|
+
const validateObjects = f["validate-objects"] === true;
|
|
176
|
+
const zones = await c.flowZones.list(pk);
|
|
177
|
+
const plannedItemKeys = flowZonePlanItemKeys(plan);
|
|
178
|
+
const planned = plan.zones.map((zonePlan) => flowZoneOrganizeStep(zonePlan, findFlowZoneForPlan(zones, zonePlan), sync, plannedItemKeys));
|
|
179
|
+
const validation = validateObjects
|
|
180
|
+
? await validateFlowZoneOrganizeObjects(c, plan, pk)
|
|
181
|
+
: undefined;
|
|
182
|
+
if (validation)
|
|
183
|
+
throwFlowZoneValidationError(validation);
|
|
184
|
+
const itemCount = plan.zones.reduce((count, zonePlan) => count + zonePlan.items.length, 0);
|
|
185
|
+
const pruneItemCount = planned.reduce((count, step) => {
|
|
186
|
+
const pruneItems = Array.isArray(step.pruneItems) ? step.pruneItems : [];
|
|
187
|
+
return count + pruneItems.length;
|
|
188
|
+
}, 0);
|
|
189
|
+
if (f["dry-run"] === true) {
|
|
190
|
+
return {
|
|
191
|
+
dryRun: true,
|
|
192
|
+
action: "organize",
|
|
193
|
+
resource: "flow-zone",
|
|
194
|
+
projectKey: pk,
|
|
195
|
+
sync,
|
|
196
|
+
validateObjects,
|
|
197
|
+
zoneCount: plan.zones.length,
|
|
198
|
+
itemCount,
|
|
199
|
+
pruneItemCount,
|
|
200
|
+
...(validation ? { validation, } : {}),
|
|
201
|
+
planned,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
const currentZones = [...zones,];
|
|
205
|
+
const created = [];
|
|
206
|
+
const updated = [];
|
|
207
|
+
const moved = [];
|
|
208
|
+
const pruned = [];
|
|
209
|
+
for (const zonePlan of plan.zones) {
|
|
210
|
+
let zone = findFlowZoneForPlan(currentZones, zonePlan);
|
|
211
|
+
ensureFlowZonePlanTarget(zonePlan, zone);
|
|
212
|
+
const pruneItems = sync ? flowZonePruneItems(zone, plannedItemKeys) : [];
|
|
213
|
+
if (!zone) {
|
|
214
|
+
zone = await c.flowZones.create({
|
|
215
|
+
name: zonePlan.name,
|
|
216
|
+
color: zonePlan.color,
|
|
217
|
+
position: zonePlan.position,
|
|
218
|
+
projectKey: pk,
|
|
219
|
+
});
|
|
220
|
+
currentZones.push(zone);
|
|
221
|
+
created.push(zone);
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
const patch = {
|
|
225
|
+
...(zonePlan.name && zonePlan.name !== zone.name ? { name: zonePlan.name, } : {}),
|
|
226
|
+
...(zonePlan.color && zonePlan.color !== zone.color ? { color: zonePlan.color, } : {}),
|
|
227
|
+
...(zonePlan.position !== undefined
|
|
228
|
+
&& !flowZoneSamePosition(flowZoneCurrentPosition(zone), zonePlan.position)
|
|
229
|
+
? { position: zonePlan.position, }
|
|
230
|
+
: {}),
|
|
231
|
+
projectKey: pk,
|
|
232
|
+
};
|
|
233
|
+
if (patch.name !== undefined || patch.color !== undefined || patch.position !== undefined) {
|
|
234
|
+
zone = await c.flowZones.update(zone.id, patch);
|
|
235
|
+
const index = currentZones.findIndex((candidate) => candidate.id === zone.id);
|
|
236
|
+
if (index !== -1)
|
|
237
|
+
currentZones[index] = zone;
|
|
238
|
+
updated.push(zone);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
if (zonePlan.items.length > 0) {
|
|
242
|
+
await c.flowZones.moveItems(zone.id, zonePlan.items, pk);
|
|
243
|
+
moved.push({ zoneId: zone.id, name: zone.name, items: zonePlan.items, });
|
|
244
|
+
}
|
|
245
|
+
if (pruneItems.length > 0) {
|
|
246
|
+
await c.flowZones.moveItems("default", pruneItems, pk);
|
|
247
|
+
pruned.push({ zoneId: "default", fromZoneId: zone.id, name: zone.name, items: pruneItems, });
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return {
|
|
251
|
+
organized: true,
|
|
252
|
+
action: "organize",
|
|
253
|
+
resource: "flow-zone",
|
|
254
|
+
projectKey: pk,
|
|
255
|
+
sync,
|
|
256
|
+
validateObjects,
|
|
257
|
+
zoneCount: plan.zones.length,
|
|
258
|
+
itemCount,
|
|
259
|
+
pruneItemCount,
|
|
260
|
+
created,
|
|
261
|
+
updated,
|
|
262
|
+
moved,
|
|
263
|
+
pruned,
|
|
264
|
+
};
|
|
265
|
+
},
|
|
266
|
+
usage: "dss flow-zone organize (--data JSON|--data-file PATH|--file PATH|--stdin) [--sync] [--validate-objects] [--dry-run] [--project-key KEY]",
|
|
267
|
+
description: "Create/update flow zones and move objects from a declarative visual organization plan.",
|
|
268
|
+
examples: [
|
|
269
|
+
"dss flow-zone organize --file flow-zones.json --dry-run",
|
|
270
|
+
`dss flow-zone organize --data '{"zones":[{"name":"Raw","color":"#64748b","datasets":["raw_orders"]}]}'`,
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
graph: {
|
|
274
|
+
handler: (c, a, f) => {
|
|
275
|
+
const id = a[0] === undefined ? undefined : flowZoneId(a[0]);
|
|
276
|
+
return c.flowZones.graph(id, f["project-key"]);
|
|
277
|
+
},
|
|
278
|
+
usage: "dss flow-zone graph [<id>] [--project-key KEY]",
|
|
279
|
+
description: "Get the full flow graph or the graph for a single flow zone.",
|
|
280
|
+
examples: ["dss flow-zone graph", "dss flow-zone graph ZONE_ID",],
|
|
281
|
+
},
|
|
282
|
+
};
|