dremio-cli 1.4.0__tar.gz → 1.5.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 (110) hide show
  1. {dremio_cli-1.4.0/dremio_cli.egg-info → dremio_cli-1.5.0}/PKG-INFO +10 -1
  2. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/README.md +7 -0
  3. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/README.md +18 -46
  4. dremio_cli-1.5.0/docs/completion.md +37 -0
  5. dremio_cli-1.5.0/docs/favorites.md +63 -0
  6. dremio_cli-1.5.0/docs/history.md +48 -0
  7. dremio_cli-1.5.0/docs/init.md +34 -0
  8. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/jobs.md +1 -3
  9. dremio_cli-1.5.0/docs/monitor.md +20 -0
  10. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/profiles.md +0 -17
  11. dremio_cli-1.5.0/docs/reflections.md +90 -0
  12. dremio_cli-1.5.0/docs/repl.md +30 -0
  13. dremio_cli-1.5.0/docs/scripts.md +86 -0
  14. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/sql.md +8 -1
  15. dremio_cli-1.5.0/dremio_cli/cli.py +121 -0
  16. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/client/auth.py +1 -10
  17. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/client/base.py +22 -13
  18. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/client/cloud.py +43 -138
  19. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/client/factory.py +2 -10
  20. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/client/software.py +69 -252
  21. dremio_cli-1.5.0/dremio_cli/commands/completion.py +22 -0
  22. dremio_cli-1.5.0/dremio_cli/commands/init.py +98 -0
  23. dremio_cli-1.5.0/dremio_cli/commands/lineage.py +9 -0
  24. dremio_cli-1.5.0/dremio_cli/commands/monitor.py +103 -0
  25. dremio_cli-1.5.0/dremio_cli/commands/reflection.py +273 -0
  26. dremio_cli-1.5.0/dremio_cli/commands/repl.py +112 -0
  27. dremio_cli-1.5.0/dremio_cli/commands/script.py +277 -0
  28. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/sql.py +138 -80
  29. dremio_cli-1.5.0/dremio_cli/commands/udf.py +9 -0
  30. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/env.py +1 -7
  31. {dremio_cli-1.4.0 → dremio_cli-1.5.0/dremio_cli.egg-info}/PKG-INFO +10 -1
  32. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli.egg-info/SOURCES.txt +16 -3
  33. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli.egg-info/requires.txt +2 -0
  34. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/pyproject.toml +3 -1
  35. dremio_cli-1.5.0/tests/conftest.py +27 -0
  36. dremio_cli-1.5.0/tests/test_multi_sql_execution.py +142 -0
  37. dremio_cli-1.5.0/tests/test_reflection_commands.py +74 -0
  38. dremio_cli-1.5.0/tests/test_script_commands.py +99 -0
  39. dremio_cli-1.4.0/docs/admin.md +0 -48
  40. dremio_cli-1.4.0/docs/reflections.md +0 -71
  41. dremio_cli-1.4.0/docs/scripts.md +0 -49
  42. dremio_cli-1.4.0/dremio_cli/cli.py +0 -204
  43. dremio_cli-1.4.0/dremio_cli/commands/engine.py +0 -118
  44. dremio_cli-1.4.0/dremio_cli/commands/reflection.py +0 -167
  45. dremio_cli-1.4.0/dremio_cli/commands/script.py +0 -139
  46. dremio_cli-1.4.0/dremio_cli/commands/wlm.py +0 -119
  47. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/LICENSE +0 -0
  48. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/MANIFEST.in +0 -0
  49. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/completions/dremio-completion.bash +0 -0
  50. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/completions/dremio-completion.zsh +0 -0
  51. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/advanced-features.md +0 -0
  52. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/catalog.md +0 -0
  53. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/grants.md +0 -0
  54. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/installation.md +0 -0
  55. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/quickstart.md +0 -0
  56. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/roles.md +0 -0
  57. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/sources.md +0 -0
  58. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/spaces-folders.md +0 -0
  59. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/tables.md +0 -0
  60. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/tags-wiki.md +0 -0
  61. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/users.md +0 -0
  62. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/docs/views.md +0 -0
  63. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/__init__.py +0 -0
  64. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/__main__.py +0 -0
  65. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/client/__init__.py +0 -0
  66. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/__init__.py +0 -0
  67. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/catalog.py +0 -0
  68. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/favorite.py +0 -0
  69. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/folder.py +0 -0
  70. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/grant.py +0 -0
  71. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/history.py +0 -0
  72. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/job.py +0 -0
  73. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/profile.py +0 -0
  74. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/role.py +0 -0
  75. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/source.py +0 -0
  76. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/space.py +0 -0
  77. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/table.py +0 -0
  78. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/tag.py +0 -0
  79. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/user.py +0 -0
  80. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/view.py +0 -0
  81. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/commands/wiki.py +0 -0
  82. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/config.py +0 -0
  83. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/formatters/__init__.py +0 -0
  84. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/formatters/json.py +0 -0
  85. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/formatters/table.py +0 -0
  86. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/formatters/yaml.py +0 -0
  87. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/history.py +0 -0
  88. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/utils/__init__.py +0 -0
  89. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/utils/exceptions.py +0 -0
  90. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/utils/helpers.py +0 -0
  91. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli/utils/validators.py +0 -0
  92. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli.egg-info/dependency_links.txt +0 -0
  93. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli.egg-info/entry_points.txt +0 -0
  94. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/dremio_cli.egg-info/top_level.txt +0 -0
  95. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/setup.cfg +0 -0
  96. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/setup.py +0 -0
  97. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/__init__.py +0 -0
  98. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_config.py +0 -0
  99. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_grant_commands.py +0 -0
  100. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_history_favorite.py +0 -0
  101. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_integration.py +0 -0
  102. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_job_commands.py +0 -0
  103. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_role_commands.py +0 -0
  104. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_source_commands.py +0 -0
  105. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_space_folder_commands.py +0 -0
  106. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_sql_commands.py +0 -0
  107. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_table_commands.py +0 -0
  108. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_tag_wiki_commands.py +0 -0
  109. {dremio_cli-1.4.0 → dremio_cli-1.5.0}/tests/test_user_commands.py +0 -0
  110. {dremio_cli-1.4.0 → dremio_cli-1.5.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.4.0
3
+ Version: 1.5.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
@@ -36,6 +36,8 @@ Requires-Dist: requests>=2.28.0
36
36
  Requires-Dist: rich>=13.0.0
37
37
  Requires-Dist: python-dotenv>=1.0.0
38
38
  Requires-Dist: pyyaml>=6.0.0
39
+ Requires-Dist: prompt_toolkit>=3.0.0
40
+ Requires-Dist: textual>=0.40.0
39
41
  Provides-Extra: dev
40
42
  Requires-Dist: pytest>=7.0.0; extra == "dev"
41
43
  Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
@@ -109,6 +111,13 @@ dremio view create --path "Analytics.summary" \
109
111
  - **[Grants](docs/grants.md)** - Access control and permissions
110
112
  - **[Users](docs/users.md)** - User management
111
113
  - **[Roles](docs/roles.md)** - Role-based access control
114
+ - **[Reflections](docs/reflections.md)** - Manage reflections
115
+ - **[Scripts](docs/scripts.md)** - Manage scripts (Cloud only)
116
+
117
+ ### Productivity
118
+
119
+ - **[Favorites](docs/favorites.md)** - Save frequently used queries
120
+ - **[History](docs/history.md)** - View and re-run commands
112
121
 
113
122
  ## 🎯 Key Features
114
123
 
@@ -60,6 +60,13 @@ dremio view create --path "Analytics.summary" \
60
60
  - **[Grants](docs/grants.md)** - Access control and permissions
61
61
  - **[Users](docs/users.md)** - User management
62
62
  - **[Roles](docs/roles.md)** - Role-based access control
63
+ - **[Reflections](docs/reflections.md)** - Manage reflections
64
+ - **[Scripts](docs/scripts.md)** - Manage scripts (Cloud only)
65
+
66
+ ### Productivity
67
+
68
+ - **[Favorites](docs/favorites.md)** - Save frequently used queries
69
+ - **[History](docs/history.md)** - View and re-run commands
63
70
 
64
71
  ## 🎯 Key Features
65
72
 
@@ -17,22 +17,21 @@ Complete documentation for the Dremio Command Line Interface.
17
17
  - **[Sources](sources.md)** - Manage data source connections
18
18
  - **[Views](views.md)** - Create and manage virtual datasets
19
19
  - **[Tables](tables.md)** - Promote and configure physical datasets
20
+ - **[Reflections](reflections.md)** - Manage reflections for acceleration
21
+ - **[Scripts](scripts.md)** - Manage scripts (Cloud only)
20
22
  - **[Spaces & Folders](spaces-folders.md)** - Organize your data catalog
21
23
 
22
24
  ### Collaboration & Governance
23
25
  - **[Tags & Wiki](tags-wiki.md)** - Document and categorize datasets
24
26
  - **[Grants](grants.md)** - Manage access control and permissions
25
27
 
26
- ### Acceleration
27
- - **[Reflections](reflections.md)** - Manage data reflections
28
+ ### Productivity
29
+ - **[Favorites](favorites.md)** - Save frequently used queries
30
+ - **[History](history.md)** - View and re-run commands
28
31
 
29
32
  ### Administration
30
33
  - **[Users](users.md)** - User account management
31
34
  - **[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
36
35
 
37
36
  ## 🚀 Quick Start
38
37
 
@@ -129,50 +128,23 @@ dremio grant list <id> # List grants
129
128
  dremio grant add <id> # Add grant
130
129
  dremio user list # List users
131
130
  dremio role list # List roles
132
- dremio wlm queue list # List WLM queues
133
- dremio engine list # List engines
134
131
  ```
135
132
 
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
146
- ```
147
-
148
- ## 🌐 Platform Support
149
-
150
133
  ## 🌐 Platform Support
151
134
 
152
- The CLI is designed to work across Dremio Cloud and Dremio Software (versions 24+). It automatically handles API version differences (v2/v3) and authentication methods.
153
-
154
- | Feature | Software (v26) | Software (v25) | Cloud | Notes |
155
- |---------|:--------------:|:--------------:|:-----:|-------|
156
- | **Connect / Auth** | ✅ | ✅ | ✅ | Supports PAT (Cloud/Soft) & User/Pass (Software v25/v26) |
157
- | **Catalog Operations** | ✅ | ✅ | ✅ | Browse items, get details, lookup by path |
158
- | **SQL Execution** | ✅ | ✅ | ✅ | Execute, wait, poll, and fetch results |
159
- | **Source Management** | ✅ | ✅ | ✅ | List, get, create, delete sources |
160
- | **Job Management** | ✅ | ✅ | ⚠️ | Cloud job **listing** is limited via API; SQL execution status/results work fully. |
161
- | **User Management** | ✅ | ✅ | N/A | Managed via Console/SCIM on Cloud. v25/v26 use Legacy API fallback. |
162
- | **Role Management** | ✅ | ✅ | N/A | Managed via Console/SCIM on Cloud. v25/v26 use Legacy API fallback. |
163
- | **View/Space/Folder** | ✅ | ✅ | ✅ | Full CRUD support |
164
- | **Tags & Wiki** | ✅ | ✅ | ✅ | |
165
- | **Grants** | ✅ | ✅ | ✅ | |
166
- | **Reflections** | ✅ | ✅ | ✅ | |
167
- | **WLM (Queues)** | ✅ | ✅ | N/A | Software Only |
168
- | **Engines** | ✅ | ✅ | ✅ | Replicas on Cloud |
169
- | **Scripts** | ✅ | ✅ | ✅ | |
170
-
171
- ### Compatibility Notes
172
-
173
- - **Cloud**: `job list` is currently not supported via the public API. Use the Dremio Console for job history or `sql execute` for running specific queries.
174
- - **Software v25/Legacy**: The CLI supports legacy username/password authentication (via HTTP/HTTPS) and automatically falls back to the `apiv2` endpoints for listing jobs, users, and roles where `apiv3` is unavailable.
175
- - **SSL**: For local development or instances with self-signed certificates, use `DREMIO_{PROFILE}_SSL=false` in your environment or `.env` file.
135
+ | Feature | Software | Cloud |
136
+ |---------|----------|-------|
137
+ | Catalog Operations | ✅ | ✅ |
138
+ | SQL Execution | ✅ | ⚠️ Limited |
139
+ | Job Management | ✅ | ✅ |
140
+ | View Management | ✅ | ✅ |
141
+ | Source Management | ✅ | ✅ |
142
+ | Space/Folder Management | ✅ | ✅ |
143
+ | Tags & Wiki | ✅ | ✅ |
144
+ | Grant Management | ✅ | ✅ |
145
+ | User Management | ✅ | ⚠️ Via Console |
146
+ | Role Management | ✅ | ⚠️ Via Console |
147
+ | Table Operations | ✅ | ✅ |
176
148
 
177
149
  ## 💡 Tips & Best Practices
178
150
 
@@ -0,0 +1,37 @@
1
+ # Shell Completion
2
+
3
+ Generate shell completion scripts for Bash, Zsh, and Fish.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ dremio completion [bash|zsh|fish]
9
+ ```
10
+
11
+ ## Installation
12
+
13
+ ### Bash
14
+
15
+ Add this to your `~/.bashrc`:
16
+
17
+ ```bash
18
+ eval "$(_DREMIO_COMPLETE=bash_source dremio)"
19
+ ```
20
+
21
+ ### Zsh
22
+
23
+ Add this to your `~/.zshrc`:
24
+
25
+ ```bash
26
+ eval "$(_DREMIO_COMPLETE=zsh_source dremio)"
27
+ ```
28
+
29
+ ### Fish
30
+
31
+ Add this to your `~/.config/fish/config.fish`:
32
+
33
+ ```fish
34
+ eval (env _DREMIO_COMPLETE=fish_source dremio)
35
+ ```
36
+
37
+ After adding the line, restart your shell or source the config file to enable tab completion.
@@ -0,0 +1,63 @@
1
+ # Favorite Queries
2
+
3
+ Manage and re-run your favorite SQL queries.
4
+
5
+ ## Commands
6
+
7
+ ### Add Favorite
8
+
9
+ Save a query as a favorite.
10
+
11
+ ```bash
12
+ dremio favorite add <NAME> [OPTIONS]
13
+ ```
14
+
15
+ **Options:**
16
+ - `--sql TEXT` - The SQL query to save (Required)
17
+ - `--description TEXT` - A brief description of the query
18
+
19
+ **Examples:**
20
+ ```bash
21
+ dremio favorite add daily_sales --sql "SELECT * FROM sales WHERE date = CURRENT_DATE"
22
+ dremio favorite add top_users --sql "SELECT * FROM users ORDER BY score DESC LIMIT 10" --description "Top 10 users by score"
23
+ ```
24
+
25
+ ### List Favorites
26
+
27
+ List all saved favorite queries.
28
+
29
+ ```bash
30
+ dremio favorite list [OPTIONS]
31
+ ```
32
+
33
+ **Examples:**
34
+ ```bash
35
+ dremio favorite list
36
+ dremio --output json favorite list
37
+ ```
38
+
39
+ ### Run Favorite
40
+
41
+ Execute a saved favorite query.
42
+
43
+ ```bash
44
+ dremio favorite run <NAME>
45
+ ```
46
+
47
+ **Examples:**
48
+ ```bash
49
+ dremio favorite run daily_sales
50
+ ```
51
+
52
+ ### Delete Favorite
53
+
54
+ Remove a query from favorites.
55
+
56
+ ```bash
57
+ dremio favorite delete <NAME>
58
+ ```
59
+
60
+ **Examples:**
61
+ ```bash
62
+ dremio favorite delete daily_sales
63
+ ```
@@ -0,0 +1,48 @@
1
+ # Query History
2
+
3
+ View and manage your local query execution history.
4
+
5
+ ## Commands
6
+
7
+ ### List History
8
+
9
+ List recent query history.
10
+
11
+ ```bash
12
+ dremio history list [OPTIONS]
13
+ ```
14
+
15
+ **Options:**
16
+ - `--limit INT` - Maximum number of entries to show (Default: 50)
17
+
18
+ **Examples:**
19
+ ```bash
20
+ dremio history list
21
+ dremio history list --limit 10
22
+ ```
23
+
24
+ ### Run History
25
+
26
+ Re-run a command from history.
27
+
28
+ ```bash
29
+ dremio history run <HISTORY_ID>
30
+ ```
31
+
32
+ **Examples:**
33
+ ```bash
34
+ dremio history run 5
35
+ ```
36
+
37
+ ### Clear History
38
+
39
+ Clear all query history.
40
+
41
+ ```bash
42
+ dremio history clear
43
+ ```
44
+
45
+ **Examples:**
46
+ ```bash
47
+ dremio history clear
48
+ ```
@@ -0,0 +1,34 @@
1
+ # Interactive Initialization
2
+
3
+ Quickly set up your Dremio CLI configuration using an interactive wizard.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ dremio init
9
+ ```
10
+
11
+ The wizard will guide you through:
12
+ 1. Creating a new profile
13
+ 2. Selecting platform (Cloud/Software)
14
+ 3. Entering base URL and credentials
15
+ 4. Verifying the connection immediately
16
+ 5. Saving the profile and setting it as default
17
+
18
+ ## Example Interaction
19
+
20
+ ```text
21
+ Dremio CLI Setup
22
+ ───────────────
23
+ Profile Name [default]: prod
24
+ Platform (software/cloud) [software]: cloud
25
+ Base URL [https://api.dremio.cloud]:
26
+ Project ID: b49...
27
+ Personal Access Token (PAT): ********
28
+
29
+ Verifying connection...
30
+ ✓ Connection Successful!
31
+
32
+ Configuration saved to: /Users/user/.dremio/profiles.yaml
33
+ Run 'dremio catalog list' to get started!
34
+ ```
@@ -8,12 +8,10 @@ This guide covers job management operations including listing, monitoring, and m
8
8
 
9
9
  List recent jobs.
10
10
 
11
- ```
11
+ ```bash
12
12
  dremio job list [OPTIONS]
13
13
  ```
14
14
 
15
- > **Note (Cloud)**: Job listing via the CLI is currently limited or unavailable on Dremio Cloud due to API restrictions. Use the Dremio Console to view full job history. SQL execution and result retrieval for specific jobs work normally.
16
-
17
15
  **Options:**
18
16
  - `--max-results INTEGER` - Maximum number of results to return
19
17
  - `--filter TEXT` - Filter expression (e.g., `state=COMPLETED`)
@@ -0,0 +1,20 @@
1
+ # Real-time Monitor (TUI)
2
+
3
+ A terminal-based user interface (TUI) for monitoring Dremio jobs and system status in real-time.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ dremio monitor
9
+ ```
10
+
11
+ ## Features
12
+
13
+ - **Live Job Feed**: Auto-refreshes every 5 seconds.
14
+ - **Job Details**: Shows Job ID, Status, User, Query Type, and Start Time.
15
+ - **Interactive Table**: Scroll through the list of recent jobs.
16
+
17
+ ## Navigation
18
+
19
+ - `q`: Quit the monitor
20
+ - `r`: Force refresh
@@ -106,23 +106,6 @@ DREMIO_CLOUD_PROJECTID=788baab4-3c3b-42da-9f1d-5cc6dc03147d
106
106
  DREMIO_CLOUD_TOKEN=s3JcLOqFTR6qnurWp09epkXfy0+06N9i5oSwG0KbRthqmgiL1DvMgd2+LSNgUA==
107
107
  DREMIO_CLOUD_TESTING_FOLDER=testing
108
108
 
109
- ### Software (PAT Auth)
110
- ```bash
111
- DREMIO_SOFTWARE_TYPE=software
112
- DREMIO_SOFTWARE_BASE_URL=https://dremio.example.com/api/v3
113
- DREMIO_SOFTWARE_AUTH_TYPE=pat
114
- DREMIO_SOFTWARE_TOKEN=my-secret-pat
115
- ```
116
-
117
- ### Software v25 / Legacy (Username/Password)
118
- ```bash
119
- DREMIO_V25_TYPE=software
120
- DREMIO_V25_BASE_URL=https://localhost:9047
121
- # Note: /api/v3 is automatically appended for API calls, stripped for login
122
- DREMIO_V25_AUTH_TYPE=username_password
123
- DREMIO_V25_USERNAME=alex
124
- DREMIO_V25_PASSWORD=password123
125
- ```
126
109
  # Software Profile
127
110
  DREMIO_SOFTWARE_TYPE=software
128
111
  DREMIO_SOFTWARE_BASE_URL=https://v26.dremio.org/api/v3
@@ -0,0 +1,90 @@
1
+ # Reflection Management
2
+
3
+ Manage Dremio reflections (Software and Cloud).
4
+
5
+ ## Commands
6
+
7
+ ### List Reflections
8
+
9
+ List all reflections.
10
+
11
+ ```bash
12
+ dremio reflection list [OPTIONS]
13
+ ```
14
+
15
+ **Options:**
16
+ - `--summary` - Show summary only
17
+
18
+ **Examples:**
19
+ ```bash
20
+ dremio reflection list
21
+ dremio --output json reflection list
22
+ ```
23
+
24
+ ### Get Reflection
25
+
26
+ Get details of a specific reflection.
27
+
28
+ ```bash
29
+ dremio reflection get <REFLECTION_ID>
30
+ ```
31
+
32
+ **Examples:**
33
+ ```bash
34
+ dremio reflection get abc-123-def-456
35
+ dremio reflection get abc-123-def-456 --output yaml
36
+ ```
37
+
38
+ ### Create Reflection
39
+
40
+ Create a reflection using a JSON definition.
41
+
42
+ ```bash
43
+ dremio reflection create [OPTIONS]
44
+ ```
45
+
46
+ **Options:**
47
+ - `--file PATH` - Path to JSON file containing reflection definition
48
+ - `--json STRING` - JSON string containing reflection definition
49
+
50
+ **Examples:**
51
+ ```bash
52
+ # From file
53
+ dremio reflection create --file reflection_def.json
54
+
55
+ # From JSON string
56
+ dremio reflection create --json '{"name": "my_reflection", "datasetId": "...", "type": "RAW", ...}'
57
+ ```
58
+
59
+ **Reflection Definition Format:**
60
+ Refer to Dremio API documentation for the full reflection object structure.
61
+
62
+ ### Update Reflection
63
+
64
+ Update an existing reflection.
65
+
66
+ ```bash
67
+ dremio reflection update <REFLECTION_ID> [OPTIONS]
68
+ ```
69
+
70
+ **Options:**
71
+ - `--file PATH` - Path to JSON file containing updated reflection definition
72
+ - `--json STRING` - JSON string containing updated reflection definition
73
+
74
+ **Examples:**
75
+ ```bash
76
+ dremio reflection update abc-123 --file update.json
77
+ ```
78
+
79
+ ### Delete Reflection
80
+
81
+ Delete a reflection.
82
+
83
+ ```bash
84
+ dremio reflection delete <REFLECTION_ID>
85
+ ```
86
+
87
+ **Examples:**
88
+ ```bash
89
+ dremio reflection delete abc-123
90
+ ```
@@ -0,0 +1,30 @@
1
+ # Interactive SQL Shell (REPL)
2
+
3
+ An enhanced interactive shell for executing SQL queries against Dremio.
4
+
5
+ ## Features
6
+
7
+ - **Syntax Highlighting**: SQL keywords are highlighted as you type.
8
+ - **Persistent History**: Command history is saved across sessions (up arrow to recall).
9
+ - **Auto-completion**: Basic completion for SQL keywords.
10
+ - **Rich Output**: Results formatted in pretty tables.
11
+
12
+ ## Usage
13
+
14
+ ```bash
15
+ dremio repl
16
+ ```
17
+
18
+ To exit, type `exit` or `quit`. To clear the screen, type `clear`.
19
+
20
+ ## Commands
21
+
22
+ Inside the REPL, you can type any SQL query. Semicolons are optional.
23
+
24
+ ```sql
25
+ dremio> SELECT * FROM "Space"."MyTable" LIMIT 5
26
+ ```
27
+
28
+ You can also run other Dremio CLI commands by prefixing them with `dremio` (optional within REPL context logic depending on implementation, but standard SQL is primary).
29
+
30
+ *Note: The current implementation primarily focuses on SQL execution.*
@@ -0,0 +1,86 @@
1
+ # Script Management
2
+
3
+ Manage Dremio scripts (Cloud Only).
4
+
5
+ ## Commands
6
+
7
+ ### List Scripts
8
+
9
+ List scripts.
10
+
11
+ ```bash
12
+ dremio script list [OPTIONS]
13
+ ```
14
+
15
+ **Options:**
16
+ - `--limit INT` - Number of results to return (default: 25)
17
+ - `--offset INT` - Offset for pagination (default: 0)
18
+
19
+ **Examples:**
20
+ ```bash
21
+ dremio script list
22
+ dremio script list --limit 10
23
+ ```
24
+
25
+ ### Get Script
26
+
27
+ Get details and content of a specific script.
28
+
29
+ ```bash
30
+ dremio script get <SCRIPT_ID>
31
+ ```
32
+
33
+ **Examples:**
34
+ ```bash
35
+ dremio script get abc-123-def-456
36
+ ```
37
+
38
+ ### Create Script
39
+
40
+ Create a new script.
41
+
42
+ ```bash
43
+ dremio script create [OPTIONS]
44
+ ```
45
+
46
+ **Options:**
47
+ - `--name TEXT` - Name of the script (Required)
48
+ - `--content TEXT` - SQL content of the script (Required)
49
+ - `--context TEXT` - Context for the script (e.g., "Space.Folder")
50
+
51
+ **Examples:**
52
+ ```bash
53
+ dremio script create --name "Monthly Report" --content "SELECT * FROM sales"
54
+ dremio script create --name "Analysis" --content "SELECT 1" --context "Marketing"
55
+ ```
56
+
57
+ ### Update Script
58
+
59
+ Update an existing script.
60
+
61
+ ```bash
62
+ dremio script update <SCRIPT_ID> [OPTIONS]
63
+ ```
64
+
65
+ **Options:**
66
+ - `--name TEXT` - Name of the script (Required)
67
+ - `--content TEXT` - SQL content of the script (Required)
68
+ - `--context TEXT` - Context for the script
69
+
70
+ **Examples:**
71
+ ```bash
72
+ dremio script update abc-123 --name "Updated Report" --content "SELECT * FROM new_sales"
73
+ ```
74
+
75
+ ### Delete Script
76
+
77
+ Delete a script.
78
+
79
+ ```bash
80
+ dremio script delete <SCRIPT_ID>
81
+ ```
82
+
83
+ **Examples:**
84
+ ```bash
85
+ dremio script delete abc-123
86
+ ```
@@ -29,9 +29,11 @@ dremio sql execute --file <FILE> [OPTIONS]
29
29
  dremio sql execute "SELECT * FROM customers LIMIT 10"
30
30
 
31
31
  # Execute from file (Waits for results)
32
+ # Can contain multiple statements separated by semicolons (;)
32
33
  dremio sql execute --file query.sql
33
34
 
34
35
  # Execute asynchronously (Returns Job ID immediately)
36
+ # Note: --async is ignored for multi-statement files (runs sequentially)
35
37
  dremio sql execute "SELECT * FROM large_table" --async
36
38
 
37
39
  # Save results to file
@@ -246,6 +248,8 @@ echo "Daily reports generated" | mail -s "Dremio Reports" admin@company.com
246
248
 
247
249
  ### Basic Query File
248
250
 
251
+ You can execute single or multiple statements in a file. Statements must be separated by semicolons (`;`). execution stops if any query fails.
252
+
249
253
  ```sql
250
254
  -- monthly_sales.sql
251
255
  SELECT
@@ -253,7 +257,10 @@ SELECT
253
257
  SUM(amount) as total_sales
254
258
  FROM orders
255
259
  GROUP BY 1
256
- ORDER BY 1 DESC
260
+ ORDER BY 1 DESC;
261
+
262
+ -- Second statement
263
+ SELECT COUNT(*) FROM orders;
257
264
  ```
258
265
 
259
266
  ### Complex Query File