Skip to content

Commit 289b7f9

Browse files
committed
update cmemc reference
1 parent baec6fd commit 289b7f9

File tree

3 files changed

+199
-6
lines changed

3 files changed

+199
-6
lines changed

docs/automate/cmemc-command-line-interface/command-reference/dataset/resource/index.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "cmemc: Command Group - dataset resource"
33
description: "List, inspect or delete dataset file resources."
4-
icon: eccenca/artefact-file
4+
icon: octicons/cross-reference-24
55
tags:
66
- cmemc
77
---
@@ -12,6 +12,10 @@ List, inspect or delete dataset file resources.
1212

1313
File resources are identified by their paths and project IDs.
1414

15+
!!! warning
16+
This command group is deprecated and will be removed with the next major release. Please use the `project file` command group instead.
17+
18+
1519

1620
## dataset resource list
1721

@@ -24,17 +28,16 @@ $ cmemc dataset resource list [OPTIONS]
2428

2529

2630

27-
Outputs a table or a list of dataset resources (files).
31+
Outputs a table or a list of file resources.
2832

2933

3034

3135
??? info "Options"
3236
```text
3337

3438
--raw Outputs raw JSON.
35-
--id-only Lists only resource names and no other metadata.
36-
This is useful for piping the IDs into other
37-
commands.
39+
--id-only Lists only resource IDs and no other metadata. This
40+
is useful for piping the IDs into other commands.
3841
--filter <TEXT TEXT>... Filter file resources based on metadata. First
3942
parameter CHOICE can be one of ['project',
4043
'regex']. The second parameter is based on CHOICE,
@@ -52,7 +55,7 @@ $ cmemc dataset resource delete [OPTIONS] [RESOURCE_IDS]...
5255

5356

5457

55-
There are three selection mechanisms: with specific IDs, only those specified resources will be deleted; by using `--filter`, resources based on the filter type and value will be deleted; using `--all` will delete all resources.
58+
There are three selection mechanisms: with specific IDs - only those specified resources will be deleted; by using `--filter` - resources based on the filter type and value will be deleted; by using `--all`, which will delete all resources.
5659

5760

5861

docs/automate/cmemc-command-line-interface/command-reference/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ tags:
9898
| [project](project/index.md) | [delete](project/index.md#project-delete) | Delete projects. |
9999
| [project](project/index.md) | [create](project/index.md#project-create) | Create projects. |
100100
| [project](project/index.md) | [reload](project/index.md#project-reload) | Reload projects from the workspace provider. |
101+
| [project file](project/file/index.md) | [list](project/file/index.md#project-file-list) | List available file resources. |
102+
| [project file](project/file/index.md) | [delete](project/file/index.md#project-file-delete) | Delete file resources. |
103+
| [project file](project/file/index.md) | [download](project/file/index.md#project-file-download) | Download file resources to the local file system. |
104+
| [project file](project/file/index.md) | [upload](project/file/index.md#project-file-upload) | Upload a file to a project. |
105+
| [project file](project/file/index.md) | [inspect](project/file/index.md#project-file-inspect) | Display all metadata of a file resource. |
106+
| [project file](project/file/index.md) | [usage](project/file/index.md#project-file-usage) | Display all usage data of a file resource. |
101107
| [project variable](project/variable/index.md) | [list](project/variable/index.md#project-variable-list) | List available project variables. |
102108
| [project variable](project/variable/index.md) | [get](project/variable/index.md#project-variable-get) | Get the value or other data of a project variable. |
103109
| [project variable](project/variable/index.md) | [delete](project/variable/index.md#project-variable-delete) | Delete a project variable. |
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
---
2+
title: "cmemc: Command Group - project file"
3+
description: "List, inspect, up-/download or delete project file resources."
4+
icon: eccenca/artefact-file
5+
tags:
6+
- Files
7+
- cmemc
8+
---
9+
# project file Command Group
10+
<!-- This file was generated - DO NOT CHANGE IT MANUALLY -->
11+
12+
List, inspect, up-/download or delete project file resources.
13+
14+
File resources are identified with a `RESOURCE_ID` which is a concatenation of its project ID and its relative path, e.g. `my-project:path-to/table.csv`.
15+
16+
!!! note
17+
To get a list of existing file resources, execute the `project file list` command or use tab-completion.
18+
19+
20+
21+
## project file list
22+
23+
List available file resources.
24+
25+
```shell-session title="Usage"
26+
$ cmemc project file list [OPTIONS]
27+
```
28+
29+
30+
31+
32+
Outputs a table or a list of file resources.
33+
34+
35+
36+
??? info "Options"
37+
```text
38+
39+
--raw Outputs raw JSON.
40+
--id-only Lists only resource IDs and no other metadata. This
41+
is useful for piping the IDs into other commands.
42+
--filter <TEXT TEXT>... Filter file resources based on metadata. First
43+
parameter CHOICE can be one of ['project',
44+
'regex']. The second parameter is based on CHOICE,
45+
e.g. a project ID or a regular expression string.
46+
```
47+
48+
## project file delete
49+
50+
Delete file resources.
51+
52+
```shell-session title="Usage"
53+
$ cmemc project file delete [OPTIONS] [RESOURCE_IDS]...
54+
```
55+
56+
57+
58+
59+
There are three selection mechanisms: with specific IDs - only those specified resources will be deleted; by using `--filter` - resources based on the filter type and value will be deleted; by using `--all`, which will delete all resources.
60+
61+
62+
63+
??? info "Options"
64+
```text
65+
66+
--force Delete resource even if in use by a task.
67+
-a, --all Delete all resources. This is a dangerous option,
68+
so use it with care.
69+
--filter <TEXT TEXT>... Filter file resources based on metadata. First
70+
parameter CHOICE can be one of ['project',
71+
'regex']. The second parameter is based on CHOICE,
72+
e.g. a project ID or a regular expression string.
73+
```
74+
75+
## project file download
76+
77+
Download file resources to the local file system.
78+
79+
```shell-session title="Usage"
80+
$ cmemc project file download [OPTIONS] [RESOURCE_IDS]...
81+
```
82+
83+
84+
85+
86+
This command downloads one or more file resources from projects to your local file system. Files are saved with their resource names in the output directory.
87+
88+
Resources are identified by their IDs in the format `PROJECT_ID`:`RESOURCE_NAME`.
89+
90+
```shell-session title="Example"
91+
$ cmemc project file download my-proj:my-file.csv
92+
```
93+
94+
95+
```shell-session title="Example"
96+
$ cmemc project file download my-proj:file1.csv my-proj:file2.csv --output-dir /tmp
97+
```
98+
99+
100+
101+
102+
??? info "Options"
103+
```text
104+
105+
--output-dir DIRECTORY The directory where the downloaded files will be
106+
saved. If this directory does not exist, it will be
107+
created. [default: .]
108+
--replace Replace existing files. This is a dangerous option,
109+
so use it with care!
110+
```
111+
112+
## project file upload
113+
114+
Upload a file to a project.
115+
116+
```shell-session title="Usage"
117+
$ cmemc project file upload [OPTIONS] INPUT_PATH
118+
```
119+
120+
121+
122+
123+
This command uploads a file to a project as a file resource.
124+
125+
!!! note
126+
If you want to create a dataset from your file, the `dataset create` command is maybe the better option.
127+
128+
129+
```shell-session title="Example"
130+
$ cmemc project file upload my-file.csv --project my-project
131+
```
132+
133+
134+
135+
136+
??? info "Options"
137+
```text
138+
139+
--project TEXT The project where you want to upload the file. If there is
140+
only one project in the workspace, this option can be
141+
omitted.
142+
--path TEXT The path/name of the file resource in the project (e.g.,
143+
'data/file.csv'). If not specified, the local file name will
144+
be used.
145+
--replace Replace existing file resource. This is a dangerous option,
146+
so use it with care!
147+
```
148+
149+
## project file inspect
150+
151+
Display all metadata of a file resource.
152+
153+
```shell-session title="Usage"
154+
$ cmemc project file inspect [OPTIONS] RESOURCE_ID
155+
```
156+
157+
158+
159+
160+
161+
??? info "Options"
162+
```text
163+
164+
--raw Outputs raw JSON.
165+
```
166+
167+
## project file usage
168+
169+
Display all usage data of a file resource.
170+
171+
```shell-session title="Usage"
172+
$ cmemc project file usage [OPTIONS] RESOURCE_ID
173+
```
174+
175+
176+
177+
178+
179+
??? info "Options"
180+
```text
181+
182+
--raw Outputs raw JSON.
183+
```
184+

0 commit comments

Comments
 (0)