dremio-cli 1.3.0__tar.gz → 1.4.0__tar.gz

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.
Files changed (91) hide show
  1. {dremio_cli-1.3.0/dremio_cli.egg-info → dremio_cli-1.4.0}/PKG-INFO +1 -1
  2. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/README.md +25 -0
  3. dremio_cli-1.4.0/docs/admin.md +48 -0
  4. dremio_cli-1.4.0/docs/reflections.md +71 -0
  5. dremio_cli-1.4.0/docs/scripts.md +49 -0
  6. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/cli.py +13 -0
  7. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/client/base.py +4 -1
  8. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/client/cloud.py +148 -5
  9. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/client/software.py +194 -8
  10. dremio_cli-1.4.0/dremio_cli/commands/engine.py +118 -0
  11. dremio_cli-1.4.0/dremio_cli/commands/reflection.py +167 -0
  12. dremio_cli-1.4.0/dremio_cli/commands/script.py +139 -0
  13. dremio_cli-1.4.0/dremio_cli/commands/wlm.py +119 -0
  14. {dremio_cli-1.3.0 → dremio_cli-1.4.0/dremio_cli.egg-info}/PKG-INFO +1 -1
  15. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli.egg-info/SOURCES.txt +7 -2
  16. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/pyproject.toml +1 -1
  17. dremio_cli-1.3.0/dremio_cli/commands/lineage.py +0 -9
  18. dremio_cli-1.3.0/dremio_cli/commands/udf.py +0 -9
  19. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/LICENSE +0 -0
  20. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/MANIFEST.in +0 -0
  21. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/README.md +0 -0
  22. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/completions/dremio-completion.bash +0 -0
  23. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/completions/dremio-completion.zsh +0 -0
  24. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/advanced-features.md +0 -0
  25. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/catalog.md +0 -0
  26. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/grants.md +0 -0
  27. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/installation.md +0 -0
  28. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/jobs.md +0 -0
  29. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/profiles.md +0 -0
  30. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/quickstart.md +0 -0
  31. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/roles.md +0 -0
  32. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/sources.md +0 -0
  33. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/spaces-folders.md +0 -0
  34. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/sql.md +0 -0
  35. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/tables.md +0 -0
  36. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/tags-wiki.md +0 -0
  37. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/users.md +0 -0
  38. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/docs/views.md +0 -0
  39. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/__init__.py +0 -0
  40. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/__main__.py +0 -0
  41. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/client/__init__.py +0 -0
  42. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/client/auth.py +0 -0
  43. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/client/factory.py +0 -0
  44. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/__init__.py +0 -0
  45. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/catalog.py +0 -0
  46. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/favorite.py +0 -0
  47. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/folder.py +0 -0
  48. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/grant.py +0 -0
  49. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/history.py +0 -0
  50. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/job.py +0 -0
  51. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/profile.py +0 -0
  52. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/role.py +0 -0
  53. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/source.py +0 -0
  54. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/space.py +0 -0
  55. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/sql.py +0 -0
  56. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/table.py +0 -0
  57. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/tag.py +0 -0
  58. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/user.py +0 -0
  59. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/view.py +0 -0
  60. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/commands/wiki.py +0 -0
  61. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/config.py +0 -0
  62. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/env.py +0 -0
  63. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/formatters/__init__.py +0 -0
  64. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/formatters/json.py +0 -0
  65. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/formatters/table.py +0 -0
  66. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/formatters/yaml.py +0 -0
  67. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/history.py +0 -0
  68. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/utils/__init__.py +0 -0
  69. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/utils/exceptions.py +0 -0
  70. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/utils/helpers.py +0 -0
  71. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli/utils/validators.py +0 -0
  72. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli.egg-info/dependency_links.txt +0 -0
  73. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli.egg-info/entry_points.txt +0 -0
  74. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli.egg-info/requires.txt +0 -0
  75. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/dremio_cli.egg-info/top_level.txt +0 -0
  76. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/setup.cfg +0 -0
  77. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/setup.py +0 -0
  78. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/__init__.py +0 -0
  79. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_config.py +0 -0
  80. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_grant_commands.py +0 -0
  81. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_history_favorite.py +0 -0
  82. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_integration.py +0 -0
  83. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_job_commands.py +0 -0
  84. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_role_commands.py +0 -0
  85. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_source_commands.py +0 -0
  86. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_space_folder_commands.py +0 -0
  87. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_sql_commands.py +0 -0
  88. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_table_commands.py +0 -0
  89. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_tag_wiki_commands.py +0 -0
  90. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_user_commands.py +0 -0
  91. {dremio_cli-1.3.0 → dremio_cli-1.4.0}/tests/test_view_commands.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dremio-cli
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: A comprehensive command-line interface for Dremio Cloud and Dremio Software
5
5
  Home-page: https://github.com/your-org/dremio-cli
6
6
  Author: Your Name
@@ -23,9 +23,16 @@ Complete documentation for the Dremio Command Line Interface.
23
23
  - **[Tags & Wiki](tags-wiki.md)** - Document and categorize datasets
24
24
  - **[Grants](grants.md)** - Manage access control and permissions
25
25
 
26
+ ### Acceleration
27
+ - **[Reflections](reflections.md)** - Manage data reflections
28
+
26
29
  ### Administration
27
30
  - **[Users](users.md)** - User account management
28
31
  - **[Roles](roles.md)** - Role-based access control
32
+ - **[Admin Controls](admin.md)** - WLM Queues & Engines
33
+
34
+ ### Developer Tools
35
+ - **[Scripts](scripts.md)** - Manage SQL Runner scripts
29
36
 
30
37
  ## 🚀 Quick Start
31
38
 
@@ -122,6 +129,20 @@ dremio grant list <id> # List grants
122
129
  dremio grant add <id> # Add grant
123
130
  dremio user list # List users
124
131
  dremio role list # List roles
132
+ dremio wlm queue list # List WLM queues
133
+ dremio engine list # List engines
134
+ ```
135
+
136
+ ### Acceleration
137
+ ```bash
138
+ dremio reflection list # List reflections
139
+ dremio reflection get <id> # Get reflection
140
+ ```
141
+
142
+ ### Scripts
143
+ ```bash
144
+ dremio script list # List scripts
145
+ dremio script create # Create script
125
146
  ```
126
147
 
127
148
  ## 🌐 Platform Support
@@ -142,6 +163,10 @@ The CLI is designed to work across Dremio Cloud and Dremio Software (versions 24
142
163
  | **View/Space/Folder** | ✅ | ✅ | ✅ | Full CRUD support |
143
164
  | **Tags & Wiki** | ✅ | ✅ | ✅ | |
144
165
  | **Grants** | ✅ | ✅ | ✅ | |
166
+ | **Reflections** | ✅ | ✅ | ✅ | |
167
+ | **WLM (Queues)** | ✅ | ✅ | N/A | Software Only |
168
+ | **Engines** | ✅ | ✅ | ✅ | Replicas on Cloud |
169
+ | **Scripts** | ✅ | ✅ | ✅ | |
145
170
 
146
171
  ### Compatibility Notes
147
172
 
@@ -0,0 +1,48 @@
1
+ # Administrative Controls
2
+
3
+ The CLI provides administrative capabilities for managing workloads and compute engines.
4
+
5
+ ## Workload Management (WLM)
6
+
7
+ **Platform Support**: Dremio Software (v24+) Only.
8
+ **Note**: Dremio Cloud handles workload management automatically/differently via Engines (Replicas).
9
+
10
+ ### Queues
11
+
12
+ List defined WLM queues, their CPU tiers, and concurrency limits.
13
+
14
+ ```bash
15
+ dremio wlm queue list
16
+ ```
17
+
18
+ ### Rules
19
+
20
+ List WLM routing rules.
21
+
22
+ ```bash
23
+ dremio wlm rule list
24
+ ```
25
+
26
+ ## Engine Management
27
+
28
+ View and inspect Dremio Engines (Software) or Replicas (Cloud).
29
+
30
+ **Platform Support**: Software & Cloud.
31
+
32
+ ### List Engines
33
+
34
+ ```bash
35
+ dremio engine list
36
+ ```
37
+
38
+ **Output Differences:**
39
+ - **Software**: Displays Engine Name, Size (e.g., Medium, 4 executors), and Status (RUNNING, STOPPED).
40
+ - **Cloud**: Displays Engine Name, Size (e.g., 2X-Small), and Replica Count.
41
+
42
+ ### Get Engine Details
43
+
44
+ Get detailed specification and status for a specific engine.
45
+
46
+ ```bash
47
+ dremio engine get <engine-id>
48
+ ```
@@ -0,0 +1,71 @@
1
+ # Reflections
2
+
3
+ Reflections are Dremio's data acceleration technology. The CLI allows you to view and manage reflections programmatically.
4
+
5
+ ## Commands
6
+
7
+ ### List Reflections
8
+
9
+ List all reflections in the environment (Software) or Project (Cloud).
10
+
11
+ ```bash
12
+ dremio reflection list
13
+ dremio reflection list --output json
14
+ ```
15
+
16
+ ### Get Reflection Details
17
+
18
+ Get details for a specific reflection, including its status, footprint, and definition.
19
+
20
+ ```bash
21
+ dremio reflection get <reflection-id>
22
+ ```
23
+
24
+ ### Create Reflection (Software)
25
+
26
+ Create a new reflection on a dataset. You can create `RAW` or `AGGREGATION` reflections.
27
+
28
+ **Basic Usage:**
29
+
30
+ ```bash
31
+ dremio reflection create \
32
+ --dataset-id <dataset-id> \
33
+ --name "my_reflection" \
34
+ --type RAW \
35
+ --field "my_field"
36
+ ```
37
+
38
+ **Advanced Usage (File-based):**
39
+
40
+ For complex definitions involving partition keys, sort keys, or distribution keys, define the reflection in a JSON file.
41
+
42
+ *reflection.json*:
43
+ ```json
44
+ {
45
+ "name": "complex_reflection",
46
+ "type": "RAW",
47
+ "datasetId": "...",
48
+ "displayFields": [{"name": "field1"}, {"name": "field2"}],
49
+ "partitionDistributionStrategy": "STRIPED",
50
+ "partitionFields": [{"name": "fieldA"}]
51
+ }
52
+ ```
53
+
54
+ ```bash
55
+ dremio reflection create --from-file reflection.json
56
+ ```
57
+
58
+ ### Delete Reflection
59
+
60
+ Remove a reflection.
61
+
62
+ ```bash
63
+ dremio reflection delete <reflection-id>
64
+ ```
65
+
66
+ ## Platform Support
67
+
68
+ | Feature | Software | Cloud | Notes |
69
+ | :--- | :---: | :---: | :--- |
70
+ | **List/Get** | ✅ | ✅ | Cloud listing is scoped to the active Project. |
71
+ | **Create/Delete** | ✅ | ✅ | Valid Dataset IDs and Field names are required. |
@@ -0,0 +1,49 @@
1
+ # Scripts (SQL Runner)
2
+
3
+ Manage SQL scripts saved in the Dremio SQL Runner. This allows you to programmatically deploy, backup, or share SQL scripts.
4
+
5
+ ## Commands
6
+
7
+ ### List Scripts
8
+
9
+ List all saved scripts.
10
+
11
+ ```bash
12
+ dremio script list
13
+ ```
14
+
15
+ ### Get Script
16
+
17
+ View the content and details of a script.
18
+
19
+ ```bash
20
+ dremio script get <script-id>
21
+ ```
22
+
23
+ ### Create Script
24
+
25
+ Save a new script to the SQL Runner.
26
+
27
+ **From String:**
28
+ ```bash
29
+ dremio script create --name "Daily Analysis" --content "SELECT count(*) FROM sales WHERE date = CURRENT_DATE"
30
+ ```
31
+
32
+ **From File:**
33
+ ```bash
34
+ dremio script create --name "Complex Report" --file ./reports/complex_query.sql
35
+ ```
36
+
37
+ ### Delete Script
38
+
39
+ Remove a saved script.
40
+
41
+ ```bash
42
+ dremio script delete <script-id>
43
+ ```
44
+
45
+ ## Platform Support
46
+
47
+ | Feature | Software | Cloud | Notes |
48
+ | :--- | :---: | :---: | :--- |
49
+ | **All Operations** | ✅ | ✅ | Fully supported on both platforms. Cloud operations are scoped to the active Project. |
@@ -23,7 +23,12 @@ from dremio_cli.commands import (
23
23
  wiki,
24
24
  grant,
25
25
  history,
26
+ history,
26
27
  favorite,
28
+ reflection,
29
+ wlm,
30
+ engine,
31
+ script,
27
32
  )
28
33
 
29
34
 
@@ -90,6 +95,10 @@ cli.add_command(wiki.wiki)
90
95
  cli.add_command(grant.grant)
91
96
  cli.add_command(history.history)
92
97
  cli.add_command(favorite.favorite)
98
+ cli.add_command(reflection.reflection)
99
+ cli.add_command(wlm.wlm)
100
+ cli.add_command(engine.engine)
101
+ cli.add_command(script.script)
93
102
 
94
103
 
95
104
 
@@ -129,6 +138,10 @@ def repl(ctx: click.Context) -> None:
129
138
  table.add_row("grant", "Manage permissions")
130
139
  table.add_row("history", "View command history")
131
140
  table.add_row("favorite", "Manage favorite queries")
141
+ table.add_row("reflection", "Manage reflections")
142
+ table.add_row("wlm", "Manage queues/rules (Software)")
143
+ table.add_row("engine", "Manage engines")
144
+ table.add_row("script", "Manage SQL scripts")
132
145
  table.add_row("help [command]", "Show help for command")
133
146
  table.add_row("exit/quit", "Exit REPL")
134
147
 
@@ -179,11 +179,12 @@ class BaseClient:
179
179
  )
180
180
  return self._handle_response(response)
181
181
 
182
- def delete(self, endpoint: str) -> Any:
182
+ def delete(self, endpoint: str, params: Optional[Dict[str, Any]] = None) -> Any:
183
183
  """Make DELETE request.
184
184
 
185
185
  Args:
186
186
  endpoint: API endpoint
187
+ params: Query parameters
187
188
 
188
189
  Returns:
189
190
  Response data
@@ -192,6 +193,8 @@ class BaseClient:
192
193
  response = self.session.delete(
193
194
  url,
194
195
  headers=self._get_headers(),
196
+ params=params,
195
197
  timeout=self.timeout,
198
+ verify=self.verify,
196
199
  )
197
200
  return self._handle_response(response)
@@ -288,25 +288,168 @@ class CloudClient(BaseClient):
288
288
  return self.post(self._project_endpoint("role"), data=role_data)
289
289
 
290
290
  def update_role(self, role_id: str, role_data: Dict[str, Any]) -> Dict[str, Any]:
291
- """Update a role."""
292
291
  return self.put(self._project_endpoint(f"role/{role_id}"), data=role_data)
293
292
 
294
293
  def delete_role(self, role_id: str) -> None:
295
294
  """Delete a role."""
296
- return self.delete(self._project_endpoint(f"role/{role_id}"))
295
+ raise NotImplementedError("Role management is not available in Dremio Cloud API")
297
296
 
298
297
  def add_role_member(self, role_id: str, user_id: str) -> None:
299
298
  """Add a user to a role."""
300
- return self.post(self._project_endpoint(f"role/{role_id}/members"), data={"userId": user_id})
299
+ raise NotImplementedError("Role management is not available in Dremio Cloud API")
301
300
 
302
301
  def remove_role_member(self, role_id: str, user_id: str) -> None:
303
302
  """Remove a user from a role."""
304
- return self.delete(self._project_endpoint(f"role/{role_id}/members/{user_id}"))
303
+ raise NotImplementedError("Role management is not available in Dremio Cloud API")
304
+
305
+ # -------------------------
306
+ # Reflection Operations
307
+ # -------------------------
308
+
309
+ def list_reflections(self) -> Dict[str, Any]:
310
+ """List reflections.
311
+
312
+ Returns:
313
+ List of reflections
314
+ """
315
+ # Checks /v0/projects/{id}/reflection
316
+ return self.get(self._project_endpoint("reflection"))
317
+
318
+ def get_reflection(self, reflection_id: str) -> Dict[str, Any]:
319
+ """Get reflection by ID.
320
+
321
+ Args:
322
+ reflection_id: Reflection ID
323
+
324
+ Returns:
325
+ Reflection details
326
+ """
327
+ return self.get(self._project_endpoint(f"reflection/{reflection_id}"))
328
+
329
+ def create_reflection(self, reflection_data: Dict[str, Any]) -> Dict[str, Any]:
330
+ """Create a reflection.
331
+
332
+ Args:
333
+ reflection_data: Reflection definition
334
+
335
+ Returns:
336
+ Created reflection
337
+ """
338
+ return self.post(self._project_endpoint("reflection"), data=reflection_data)
339
+
340
+ def update_reflection(self, reflection_id: str, reflection_data: Dict[str, Any]) -> Dict[str, Any]:
341
+ """Update a reflection.
342
+
343
+ Args:
344
+ reflection_id: Reflection ID
345
+ reflection_data: Updated reflection definition
346
+
347
+ Returns:
348
+ Updated reflection
349
+ """
350
+ return self.put(self._project_endpoint(f"reflection/{reflection_id}"), data=reflection_data)
351
+
352
+ def delete_reflection(self, reflection_id: str) -> None:
353
+ """Delete a reflection.
354
+
355
+ Args:
356
+ reflection_id: Reflection ID
357
+ """
358
+ self.delete(self._project_endpoint(f"reflection/{reflection_id}"))
359
+
360
+ # -------------------------
361
+ # Engine Operations
362
+ # -------------------------
363
+
364
+ def list_engines(self) -> Dict[str, Any]:
365
+ """List engines.
366
+
367
+ Returns:
368
+ List of engines
369
+ """
370
+ return self.get(self._project_endpoint("engines"))
371
+
372
+ def get_engine(self, engine_id: str) -> Dict[str, Any]:
373
+ """Get engine by ID.
374
+
375
+ Args:
376
+ engine_id: Engine ID
377
+
378
+ Returns:
379
+ Engine details
380
+ """
381
+ return self.get(self._project_endpoint(f"engines/{engine_id}"))
382
+
305
383
 
306
384
  # Table operations
307
385
  def promote_dataset(self, dataset_id: str) -> Dict[str, Any]:
308
386
  """Promote a dataset to a physical dataset."""
309
- return self.post(self._project_endpoint(f"catalog/{dataset_id}/promote"))
387
+ # This implementation might vary for Cloud, usually via catalog
388
+ pass
389
+
390
+ # -------------------------
391
+ # Script Operations
392
+ # -------------------------
393
+
394
+ def list_scripts(self) -> Dict[str, Any]:
395
+ """List scripts.
396
+
397
+ Returns:
398
+ List of scripts
399
+ """
400
+ return self.get(self._project_endpoint("scripts"))
401
+
402
+ def get_script(self, script_id: str) -> Dict[str, Any]:
403
+ """Get script by ID.
404
+
405
+ Args:
406
+ script_id: Script ID
407
+
408
+ Returns:
409
+ Script details
410
+ """
411
+ return self.get(self._project_endpoint(f"scripts/{script_id}"))
412
+
413
+ def create_script(self, name: str, content: str, context: list = None) -> Dict[str, Any]:
414
+ """Create a script.
415
+
416
+ Args:
417
+ name: Script name
418
+ content: SQL content
419
+ context: Context list (optional)
420
+
421
+ Returns:
422
+ Created script
423
+ """
424
+ payload = {"name": name, "content": content}
425
+ if context:
426
+ payload["context"] = context
427
+ return self.post(self._project_endpoint("scripts"), data=payload)
428
+
429
+ def update_script(self, script_id: str, name: str, content: str, context: list = None) -> Dict[str, Any]:
430
+ """Update a script.
431
+
432
+ Args:
433
+ script_id: Script ID
434
+ name: Script name
435
+ content: SQL content
436
+ context: Context list
437
+
438
+ Returns:
439
+ Updated script
440
+ """
441
+ payload = {"name": name, "content": content}
442
+ if context:
443
+ payload["context"] = context
444
+ return self.put(self._project_endpoint(f"scripts/{script_id}"), data=payload)
445
+
446
+ def delete_script(self, script_id: str) -> None:
447
+ """Delete a script.
448
+
449
+ Args:
450
+ script_id: Script ID
451
+ """
452
+ self.delete(self._project_endpoint(f"scripts/{script_id}"))
310
453
 
311
454
  def set_dataset_format(self, dataset_id: str, format_config: Dict[str, Any]) -> Dict[str, Any]:
312
455
  """Set format configuration for a dataset."""
@@ -272,29 +272,215 @@ class SoftwareClient(BaseClient):
272
272
  folder_id: Folder ID
273
273
  tag: Version tag for optimistic concurrency
274
274
  """
275
- return self.delete(f"catalog/{folder_id}?tag={tag}")
275
+ self.delete(f"catalog/{folder_id}", params={"tag": tag})
276
+
277
+ # -------------------------
278
+ # Reflection Operations
279
+ # -------------------------
280
+
281
+ def list_reflections(self) -> Dict[str, Any]:
282
+ """List reflections.
283
+
284
+ Returns:
285
+ List of reflections
286
+ """
287
+ return self.get("reflection")
288
+
289
+ def get_reflection(self, reflection_id: str) -> Dict[str, Any]:
290
+ """Get reflection by ID.
291
+
292
+ Args:
293
+ reflection_id: Reflection ID
294
+
295
+ Returns:
296
+ Reflection details
297
+ """
298
+ return self.get(f"reflection/{reflection_id}")
299
+
300
+ def create_reflection(self, reflection_data: Dict[str, Any]) -> Dict[str, Any]:
301
+ """Create a reflection.
302
+
303
+ Args:
304
+ reflection_data: Reflection definition
305
+
306
+ Returns:
307
+ Created reflection
308
+ """
309
+ return self.post("reflection", data=reflection_data)
310
+
311
+ def update_reflection(self, reflection_id: str, reflection_data: Dict[str, Any]) -> Dict[str, Any]:
312
+ """Update a reflection.
313
+
314
+ Args:
315
+ reflection_id: Reflection ID
316
+ reflection_data: Updated reflection definition
317
+
318
+ Returns:
319
+ Updated reflection
320
+ """
321
+ return self.put(f"reflection/{reflection_id}", data=reflection_data)
322
+
323
+ def delete_reflection(self, reflection_id: str) -> None:
324
+ """Delete a reflection.
325
+
326
+ Args:
327
+ reflection_id: Reflection ID
328
+ """
329
+ self.delete(f"reflection/{reflection_id}")
330
+
331
+ # -------------------------
332
+ # WLM Operations
333
+ # -------------------------
334
+
335
+ def list_queues(self) -> Dict[str, Any]:
336
+ """List WLM queues.
337
+
338
+ Returns:
339
+ List of queues
340
+ """
341
+ return self.get("wlm/queue")
342
+
343
+ def get_queue(self, queue_id: str) -> Dict[str, Any]:
344
+ """Get WLM queue by ID.
345
+
346
+ Args:
347
+ queue_id: Queue ID
348
+
349
+ Returns:
350
+ Queue details
351
+ """
352
+ return self.get(f"wlm/queue/{queue_id}")
353
+
354
+ def update_queue(self, queue_id: str, queue_data: Dict[str, Any]) -> Dict[str, Any]:
355
+ """Update a WLM queue.
356
+
357
+ Args:
358
+ queue_id: Queue ID
359
+ queue_data: Updated queue definition
360
+
361
+ Returns:
362
+ Updated queue
363
+ """
364
+ return self.put(f"wlm/queue/{queue_id}", data=queue_data)
365
+
366
+ def list_rules(self) -> Dict[str, Any]:
367
+ """List WLM rules.
368
+
369
+ Returns:
370
+ List of rules
371
+ """
372
+ return self.get("wlm/rule")
373
+
374
+ # -------------------------
375
+ # Engine Operations
376
+ # -------------------------
377
+
378
+ def list_engines(self) -> Dict[str, Any]:
379
+ """List engines.
380
+
381
+ Returns:
382
+ List of engines
383
+ """
384
+ return self.get("engines")
385
+
386
+ def get_engine(self, engine_id: str) -> Dict[str, Any]:
387
+ """Get engine by ID.
388
+
389
+ Args:
390
+ engine_id: Engine ID
391
+
392
+ Returns:
393
+ Engine details
394
+ """
395
+ return self.get(f"engines/{engine_id}")
396
+
276
397
 
277
398
  # Tag operations
278
399
  def set_tags(self, catalog_id: str, tags: list) -> None:
279
400
  """Set tags on a catalog object.
280
401
 
281
402
  Args:
282
- catalog_id: Catalog object ID
283
- tags: List of tag strings
403
+ catalog_id: Catalog Entity ID
404
+ tags: List of tags
284
405
  """
285
- return self.post(f"catalog/{catalog_id}/collaboration/tag", data={"tags": tags})
406
+ self.post(f"catalog/{catalog_id}/collaboration/tag", data={"tags": tags})
286
407
 
287
- def get_tags(self, catalog_id: str) -> dict:
288
- """Get tags from a catalog object.
408
+ def get_tags(self, catalog_id: str) -> Dict[str, Any]:
409
+ """Get tags for a catalog object.
289
410
 
290
411
  Args:
291
- catalog_id: Catalog object ID
412
+ catalog_id: Catalog Entity ID
292
413
 
293
414
  Returns:
294
- Tags data
415
+ Dictionary with tags
295
416
  """
296
417
  return self.get(f"catalog/{catalog_id}/collaboration/tag")
297
418
 
419
+ # -------------------------
420
+ # Script Operations
421
+ # -------------------------
422
+
423
+ def list_scripts(self) -> Dict[str, Any]:
424
+ """List scripts.
425
+
426
+ Returns:
427
+ List of scripts
428
+ """
429
+ return self.get("scripts")
430
+
431
+ def get_script(self, script_id: str) -> Dict[str, Any]:
432
+ """Get script by ID.
433
+
434
+ Args:
435
+ script_id: Script ID
436
+
437
+ Returns:
438
+ Script details
439
+ """
440
+ return self.get(f"scripts/{script_id}")
441
+
442
+ def create_script(self, name: str, content: str, context: list = None) -> Dict[str, Any]:
443
+ """Create a script.
444
+
445
+ Args:
446
+ name: Script name
447
+ content: SQL content
448
+ context: Context list (optional)
449
+
450
+ Returns:
451
+ Created script
452
+ """
453
+ payload = {"name": name, "content": content}
454
+ if context:
455
+ payload["context"] = context
456
+ return self.post("scripts", data=payload)
457
+
458
+ def update_script(self, script_id: str, name: str, content: str, context: list = None) -> Dict[str, Any]:
459
+ """Update a script.
460
+
461
+ Args:
462
+ script_id: Script ID
463
+ name: Script name
464
+ content: SQL content
465
+ context: Context list
466
+
467
+ Returns:
468
+ Updated script
469
+ """
470
+ payload = {"name": name, "content": content}
471
+ if context:
472
+ payload["context"] = context
473
+ return self.put(f"scripts/{script_id}", data=payload)
474
+
475
+ def delete_script(self, script_id: str) -> None:
476
+ """Delete a script.
477
+
478
+ Args:
479
+ script_id: Script ID
480
+ """
481
+ self.delete(f"scripts/{script_id}")
482
+
483
+
298
484
  def delete_tags(self, catalog_id: str) -> None:
299
485
  """Delete tags from a catalog object.
300
486