dremio-cli 1.0.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 (84) hide show
  1. dremio_cli-1.0.0/LICENSE +21 -0
  2. dremio_cli-1.0.0/MANIFEST.in +11 -0
  3. dremio_cli-1.0.0/PKG-INFO +261 -0
  4. dremio_cli-1.0.0/README.md +212 -0
  5. dremio_cli-1.0.0/completions/dremio-completion.bash +89 -0
  6. dremio_cli-1.0.0/completions/dremio-completion.zsh +89 -0
  7. dremio_cli-1.0.0/docs/README.md +212 -0
  8. dremio_cli-1.0.0/docs/advanced-features.md +293 -0
  9. dremio_cli-1.0.0/docs/catalog.md +334 -0
  10. dremio_cli-1.0.0/docs/grants.md +476 -0
  11. dremio_cli-1.0.0/docs/installation.md +46 -0
  12. dremio_cli-1.0.0/docs/jobs.md +374 -0
  13. dremio_cli-1.0.0/docs/profiles.md +378 -0
  14. dremio_cli-1.0.0/docs/quickstart.md +88 -0
  15. dremio_cli-1.0.0/docs/roles.md +105 -0
  16. dremio_cli-1.0.0/docs/sources.md +542 -0
  17. dremio_cli-1.0.0/docs/spaces-folders.md +479 -0
  18. dremio_cli-1.0.0/docs/sql.md +484 -0
  19. dremio_cli-1.0.0/docs/tables.md +280 -0
  20. dremio_cli-1.0.0/docs/tags-wiki.md +538 -0
  21. dremio_cli-1.0.0/docs/users.md +73 -0
  22. dremio_cli-1.0.0/docs/views.md +404 -0
  23. dremio_cli-1.0.0/dremio_cli/__init__.py +5 -0
  24. dremio_cli-1.0.0/dremio_cli/__main__.py +6 -0
  25. dremio_cli-1.0.0/dremio_cli/cli.py +191 -0
  26. dremio_cli-1.0.0/dremio_cli/client/__init__.py +1 -0
  27. dremio_cli-1.0.0/dremio_cli/client/auth.py +100 -0
  28. dremio_cli-1.0.0/dremio_cli/client/base.py +190 -0
  29. dremio_cli-1.0.0/dremio_cli/client/cloud.py +305 -0
  30. dremio_cli-1.0.0/dremio_cli/client/factory.py +122 -0
  31. dremio_cli-1.0.0/dremio_cli/client/software.py +561 -0
  32. dremio_cli-1.0.0/dremio_cli/commands/__init__.py +1 -0
  33. dremio_cli-1.0.0/dremio_cli/commands/catalog.py +143 -0
  34. dremio_cli-1.0.0/dremio_cli/commands/favorite.py +162 -0
  35. dremio_cli-1.0.0/dremio_cli/commands/folder.py +290 -0
  36. dremio_cli-1.0.0/dremio_cli/commands/grant.py +202 -0
  37. dremio_cli-1.0.0/dremio_cli/commands/history.py +122 -0
  38. dremio_cli-1.0.0/dremio_cli/commands/job.py +321 -0
  39. dremio_cli-1.0.0/dremio_cli/commands/lineage.py +9 -0
  40. dremio_cli-1.0.0/dremio_cli/commands/profile.py +165 -0
  41. dremio_cli-1.0.0/dremio_cli/commands/role.py +319 -0
  42. dremio_cli-1.0.0/dremio_cli/commands/source.py +375 -0
  43. dremio_cli-1.0.0/dremio_cli/commands/space.py +226 -0
  44. dremio_cli-1.0.0/dremio_cli/commands/sql.py +280 -0
  45. dremio_cli-1.0.0/dremio_cli/commands/table.py +155 -0
  46. dremio_cli-1.0.0/dremio_cli/commands/tag.py +145 -0
  47. dremio_cli-1.0.0/dremio_cli/commands/udf.py +9 -0
  48. dremio_cli-1.0.0/dremio_cli/commands/user.py +250 -0
  49. dremio_cli-1.0.0/dremio_cli/commands/view.py +369 -0
  50. dremio_cli-1.0.0/dremio_cli/commands/wiki.py +163 -0
  51. dremio_cli-1.0.0/dremio_cli/config.py +193 -0
  52. dremio_cli-1.0.0/dremio_cli/env.py +175 -0
  53. dremio_cli-1.0.0/dremio_cli/formatters/__init__.py +1 -0
  54. dremio_cli-1.0.0/dremio_cli/formatters/json.py +19 -0
  55. dremio_cli-1.0.0/dremio_cli/formatters/table.py +45 -0
  56. dremio_cli-1.0.0/dremio_cli/formatters/yaml.py +17 -0
  57. dremio_cli-1.0.0/dremio_cli/history.py +198 -0
  58. dremio_cli-1.0.0/dremio_cli/utils/__init__.py +1 -0
  59. dremio_cli-1.0.0/dremio_cli/utils/exceptions.py +35 -0
  60. dremio_cli-1.0.0/dremio_cli/utils/helpers.py +73 -0
  61. dremio_cli-1.0.0/dremio_cli/utils/validators.py +147 -0
  62. dremio_cli-1.0.0/dremio_cli.egg-info/PKG-INFO +261 -0
  63. dremio_cli-1.0.0/dremio_cli.egg-info/SOURCES.txt +82 -0
  64. dremio_cli-1.0.0/dremio_cli.egg-info/dependency_links.txt +1 -0
  65. dremio_cli-1.0.0/dremio_cli.egg-info/entry_points.txt +2 -0
  66. dremio_cli-1.0.0/dremio_cli.egg-info/requires.txt +12 -0
  67. dremio_cli-1.0.0/dremio_cli.egg-info/top_level.txt +1 -0
  68. dremio_cli-1.0.0/pyproject.toml +109 -0
  69. dremio_cli-1.0.0/setup.cfg +4 -0
  70. dremio_cli-1.0.0/setup.py +52 -0
  71. dremio_cli-1.0.0/tests/__init__.py +1 -0
  72. dremio_cli-1.0.0/tests/test_config.py +111 -0
  73. dremio_cli-1.0.0/tests/test_grant_commands.py +40 -0
  74. dremio_cli-1.0.0/tests/test_history_favorite.py +108 -0
  75. dremio_cli-1.0.0/tests/test_integration.py +144 -0
  76. dremio_cli-1.0.0/tests/test_job_commands.py +52 -0
  77. dremio_cli-1.0.0/tests/test_role_commands.py +58 -0
  78. dremio_cli-1.0.0/tests/test_source_commands.py +58 -0
  79. dremio_cli-1.0.0/tests/test_space_folder_commands.py +74 -0
  80. dremio_cli-1.0.0/tests/test_sql_commands.py +39 -0
  81. dremio_cli-1.0.0/tests/test_table_commands.py +34 -0
  82. dremio_cli-1.0.0/tests/test_tag_wiki_commands.py +56 -0
  83. dremio_cli-1.0.0/tests/test_user_commands.py +46 -0
  84. dremio_cli-1.0.0/tests/test_view_commands.py +57 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Your Name
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,11 @@
1
+ include README.md
2
+ include LICENSE
3
+ include pyproject.toml
4
+ recursive-include dremio_cli *.py
5
+ recursive-include docs *.md
6
+ recursive-include completions *.bash *.zsh
7
+ recursive-include tests *.py
8
+ exclude tests/__pycache__
9
+ exclude dremio_cli/__pycache__
10
+ global-exclude *.pyc
11
+ global-exclude __pycache__
@@ -0,0 +1,261 @@
1
+ Metadata-Version: 2.4
2
+ Name: dremio-cli
3
+ Version: 1.0.0
4
+ Summary: A comprehensive command-line interface for Dremio Cloud and Dremio Software
5
+ Home-page: https://github.com/your-org/dremio-cli
6
+ Author: Your Name
7
+ Author-email: Dremio Developer Advocacy <developer-advocacy@dremio.com>
8
+ Maintainer-email: Dremio Developer Advocacy <developer-advocacy@dremio.com>
9
+ License: Apache-2.0
10
+ Project-URL: Homepage, https://github.com/developer-advocacy-dremio/dremio-python-cli
11
+ Project-URL: Documentation, https://github.com/developer-advocacy-dremio/dremio-python-cli/tree/main/dremio-cli/docs
12
+ Project-URL: Repository, https://github.com/developer-advocacy-dremio/dremio-python-cli
13
+ Project-URL: Issues, https://github.com/developer-advocacy-dremio/dremio-python-cli/issues
14
+ Project-URL: Changelog, https://github.com/developer-advocacy-dremio/dremio-python-cli/releases
15
+ Keywords: dremio,cli,data,lakehouse,sql,analytics,cloud,data-engineering
16
+ Classifier: Development Status :: 5 - Production/Stable
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Intended Audience :: System Administrators
19
+ Classifier: License :: OSI Approved :: Apache Software License
20
+ Classifier: Operating System :: OS Independent
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.8
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Classifier: Topic :: Database
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
+ Classifier: Topic :: System :: Systems Administration
30
+ Classifier: Topic :: Utilities
31
+ Requires-Python: >=3.9
32
+ Description-Content-Type: text/markdown
33
+ License-File: LICENSE
34
+ Requires-Dist: click>=8.0.0
35
+ Requires-Dist: requests>=2.28.0
36
+ Requires-Dist: rich>=13.0.0
37
+ Requires-Dist: python-dotenv>=1.0.0
38
+ Requires-Dist: pyyaml>=6.0.0
39
+ Provides-Extra: dev
40
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
41
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
42
+ Requires-Dist: black>=23.0.0; extra == "dev"
43
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
44
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
45
+ Dynamic: author
46
+ Dynamic: home-page
47
+ Dynamic: license-file
48
+ Dynamic: requires-python
49
+
50
+ # Dremio CLI
51
+
52
+ A comprehensive command-line interface for Dremio Cloud and Dremio Software.
53
+
54
+ ## 🚀 Features
55
+
56
+ - **100% API Coverage** - Complete support for all Dremio APIs
57
+ - **Dual Platform Support** - Works with both Dremio Cloud and Software
58
+ - **Profile Management** - Easily switch between environments
59
+ - **Rich Output** - Table, JSON, and YAML formatting
60
+ - **Comprehensive Documentation** - Detailed guides for every feature
61
+
62
+ ## 📦 Installation
63
+
64
+ ```bash
65
+ pip install dremio-cli
66
+ ```
67
+
68
+ ## ⚡ Quick Start
69
+
70
+ ```bash
71
+ # Configure a profile
72
+ dremio profile create --name myprofile --type software \
73
+ --base-url https://dremio.company.com \
74
+ --username admin --password secret
75
+
76
+ # List catalog
77
+ dremio catalog list
78
+
79
+ # Execute SQL
80
+ dremio sql execute "SELECT * FROM customers LIMIT 10"
81
+
82
+ # Create a view
83
+ dremio view create --path "Analytics.summary" \
84
+ --sql "SELECT * FROM customers WHERE region = 'US'"
85
+ ```
86
+
87
+ ## 📚 Documentation
88
+
89
+ **[Complete Documentation →](docs/README.md)**
90
+
91
+ ### Core Guides
92
+
93
+ - **[Installation](docs/installation.md)** - Setup and configuration
94
+ - **[Profiles](docs/profiles.md)** - Manage connection profiles
95
+ - **[Catalog](docs/catalog.md)** - Browse and navigate data
96
+ - **[SQL](docs/sql.md)** - Execute queries and analyze plans
97
+ - **[Jobs](docs/jobs.md)** - Monitor query execution
98
+
99
+ ### Data Management
100
+
101
+ - **[Sources](docs/sources.md)** - Connect to data systems
102
+ - **[Views](docs/views.md)** - Create virtual datasets
103
+ - **[Tables](docs/tables.md)** - Manage physical datasets
104
+ - **[Spaces & Folders](docs/spaces-folders.md)** - Organize your catalog
105
+
106
+ ### Governance & Security
107
+
108
+ - **[Tags & Wiki](docs/tags-wiki.md)** - Document and categorize
109
+ - **[Grants](docs/grants.md)** - Access control and permissions
110
+ - **[Users](docs/users.md)** - User management
111
+ - **[Roles](docs/roles.md)** - Role-based access control
112
+
113
+ ## 🎯 Key Features
114
+
115
+ ### Catalog Operations
116
+ Browse and navigate your Dremio catalog with ease.
117
+
118
+ ```bash
119
+ dremio catalog list
120
+ dremio catalog get <id>
121
+ dremio catalog get-by-path "MySpace.MyFolder.MyView"
122
+ ```
123
+
124
+ ### SQL Execution
125
+ Execute queries, explain plans, and validate syntax.
126
+
127
+ ```bash
128
+ dremio sql execute "SELECT * FROM table"
129
+ dremio sql execute --file query.sql --async
130
+ dremio sql explain "SELECT * FROM table"
131
+ dremio sql validate "SELECT * FROM table"
132
+ ```
133
+
134
+ ### Source Management
135
+ Connect to and manage data sources.
136
+
137
+ ```bash
138
+ dremio source list
139
+ dremio source create --name MyDB --type POSTGRES --config-file db.json
140
+ dremio source refresh <id>
141
+ ```
142
+
143
+ ### View Management
144
+ Create and manage virtual datasets.
145
+
146
+ ```bash
147
+ dremio view create --path "Analytics.summary" --sql "SELECT * FROM data"
148
+ dremio view update <id> --sql "SELECT * FROM updated_data"
149
+ dremio view list --space Analytics
150
+ ```
151
+
152
+ ### Job Management
153
+ Monitor and manage query jobs.
154
+
155
+ ```bash
156
+ dremio job list
157
+ dremio job get <id>
158
+ dremio job results <id> --output-file results.json
159
+ dremio job profile <id> --download profile.zip
160
+ ```
161
+
162
+ ### Access Control
163
+ Manage permissions and grants.
164
+
165
+ ```bash
166
+ dremio grant list <catalog-id>
167
+ dremio grant add <id> --grantee-type ROLE --grantee-id analyst --privileges SELECT
168
+ dremio user list
169
+ dremio role list
170
+ ```
171
+
172
+ ## 🔧 Configuration
173
+
174
+ ### Profile-Based Configuration
175
+
176
+ ```bash
177
+ # Create profile
178
+ dremio profile create --name prod --type cloud \
179
+ --base-url https://api.dremio.cloud \
180
+ --project-id <project-id> \
181
+ --token <pat-token>
182
+
183
+ # Use profile
184
+ dremio --profile prod catalog list
185
+
186
+ # Set default profile
187
+ dremio profile set-default prod
188
+ ```
189
+
190
+ ### Environment Variables
191
+
192
+ ```bash
193
+ # Set in .env file
194
+ DREMIO_BASE_URL=https://dremio.company.com
195
+ DREMIO_USERNAME=admin
196
+ DREMIO_PASSWORD=secret
197
+ ```
198
+
199
+ ## 📊 Output Formats
200
+
201
+ ```bash
202
+ # Table format (default)
203
+ dremio catalog list
204
+
205
+ # JSON format
206
+ dremio --output json catalog list
207
+
208
+ # YAML format
209
+ dremio --output yaml catalog list
210
+ ```
211
+
212
+ ## 🌐 Platform Support
213
+
214
+ | Feature | Software | Cloud |
215
+ |---------|----------|-------|
216
+ | Catalog Operations | ✅ | ✅ |
217
+ | SQL Execution | ✅ | ⚠️ Limited |
218
+ | Job Management | ✅ | ✅ |
219
+ | View Management | ✅ | ✅ |
220
+ | Source Management | ✅ | ✅ |
221
+ | Grant Management | ✅ | ✅ |
222
+ | User/Role Management | ✅ | ⚠️ Via Console |
223
+
224
+ ## 💻 Development
225
+
226
+ ```bash
227
+ # Clone repository
228
+ git clone https://github.com/developer-advocacy-dremio/dremio-python-cli.git
229
+ cd dremio-python-cli/dremio-cli
230
+
231
+ # Install in development mode
232
+ pip install -e .
233
+
234
+ # Run tests
235
+ pytest
236
+
237
+ # Run live tests
238
+ python scripts/test_sql_operations.py
239
+ ```
240
+
241
+ ## 🤝 Contributing
242
+
243
+ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
244
+
245
+ ## 📄 License
246
+
247
+ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
248
+
249
+ ## 🔗 Links
250
+
251
+ - [Documentation](docs/README.md)
252
+ - [Dremio Documentation](https://docs.dremio.com)
253
+ - [Dremio Cloud](https://www.dremio.com/cloud/)
254
+ - [Dremio Software](https://www.dremio.com/platform/)
255
+
256
+ ## 🆘 Support
257
+
258
+ For issues and questions:
259
+ - GitHub Issues: [Report an issue](https://github.com/developer-advocacy-dremio/dremio-python-cli/issues)
260
+ - Documentation: [Read the docs](docs/README.md)
261
+ - Community: [Dremio Community](https://community.dremio.com)
@@ -0,0 +1,212 @@
1
+ # Dremio CLI
2
+
3
+ A comprehensive command-line interface for Dremio Cloud and Dremio Software.
4
+
5
+ ## 🚀 Features
6
+
7
+ - **100% API Coverage** - Complete support for all Dremio APIs
8
+ - **Dual Platform Support** - Works with both Dremio Cloud and Software
9
+ - **Profile Management** - Easily switch between environments
10
+ - **Rich Output** - Table, JSON, and YAML formatting
11
+ - **Comprehensive Documentation** - Detailed guides for every feature
12
+
13
+ ## 📦 Installation
14
+
15
+ ```bash
16
+ pip install dremio-cli
17
+ ```
18
+
19
+ ## ⚡ Quick Start
20
+
21
+ ```bash
22
+ # Configure a profile
23
+ dremio profile create --name myprofile --type software \
24
+ --base-url https://dremio.company.com \
25
+ --username admin --password secret
26
+
27
+ # List catalog
28
+ dremio catalog list
29
+
30
+ # Execute SQL
31
+ dremio sql execute "SELECT * FROM customers LIMIT 10"
32
+
33
+ # Create a view
34
+ dremio view create --path "Analytics.summary" \
35
+ --sql "SELECT * FROM customers WHERE region = 'US'"
36
+ ```
37
+
38
+ ## 📚 Documentation
39
+
40
+ **[Complete Documentation →](docs/README.md)**
41
+
42
+ ### Core Guides
43
+
44
+ - **[Installation](docs/installation.md)** - Setup and configuration
45
+ - **[Profiles](docs/profiles.md)** - Manage connection profiles
46
+ - **[Catalog](docs/catalog.md)** - Browse and navigate data
47
+ - **[SQL](docs/sql.md)** - Execute queries and analyze plans
48
+ - **[Jobs](docs/jobs.md)** - Monitor query execution
49
+
50
+ ### Data Management
51
+
52
+ - **[Sources](docs/sources.md)** - Connect to data systems
53
+ - **[Views](docs/views.md)** - Create virtual datasets
54
+ - **[Tables](docs/tables.md)** - Manage physical datasets
55
+ - **[Spaces & Folders](docs/spaces-folders.md)** - Organize your catalog
56
+
57
+ ### Governance & Security
58
+
59
+ - **[Tags & Wiki](docs/tags-wiki.md)** - Document and categorize
60
+ - **[Grants](docs/grants.md)** - Access control and permissions
61
+ - **[Users](docs/users.md)** - User management
62
+ - **[Roles](docs/roles.md)** - Role-based access control
63
+
64
+ ## 🎯 Key Features
65
+
66
+ ### Catalog Operations
67
+ Browse and navigate your Dremio catalog with ease.
68
+
69
+ ```bash
70
+ dremio catalog list
71
+ dremio catalog get <id>
72
+ dremio catalog get-by-path "MySpace.MyFolder.MyView"
73
+ ```
74
+
75
+ ### SQL Execution
76
+ Execute queries, explain plans, and validate syntax.
77
+
78
+ ```bash
79
+ dremio sql execute "SELECT * FROM table"
80
+ dremio sql execute --file query.sql --async
81
+ dremio sql explain "SELECT * FROM table"
82
+ dremio sql validate "SELECT * FROM table"
83
+ ```
84
+
85
+ ### Source Management
86
+ Connect to and manage data sources.
87
+
88
+ ```bash
89
+ dremio source list
90
+ dremio source create --name MyDB --type POSTGRES --config-file db.json
91
+ dremio source refresh <id>
92
+ ```
93
+
94
+ ### View Management
95
+ Create and manage virtual datasets.
96
+
97
+ ```bash
98
+ dremio view create --path "Analytics.summary" --sql "SELECT * FROM data"
99
+ dremio view update <id> --sql "SELECT * FROM updated_data"
100
+ dremio view list --space Analytics
101
+ ```
102
+
103
+ ### Job Management
104
+ Monitor and manage query jobs.
105
+
106
+ ```bash
107
+ dremio job list
108
+ dremio job get <id>
109
+ dremio job results <id> --output-file results.json
110
+ dremio job profile <id> --download profile.zip
111
+ ```
112
+
113
+ ### Access Control
114
+ Manage permissions and grants.
115
+
116
+ ```bash
117
+ dremio grant list <catalog-id>
118
+ dremio grant add <id> --grantee-type ROLE --grantee-id analyst --privileges SELECT
119
+ dremio user list
120
+ dremio role list
121
+ ```
122
+
123
+ ## 🔧 Configuration
124
+
125
+ ### Profile-Based Configuration
126
+
127
+ ```bash
128
+ # Create profile
129
+ dremio profile create --name prod --type cloud \
130
+ --base-url https://api.dremio.cloud \
131
+ --project-id <project-id> \
132
+ --token <pat-token>
133
+
134
+ # Use profile
135
+ dremio --profile prod catalog list
136
+
137
+ # Set default profile
138
+ dremio profile set-default prod
139
+ ```
140
+
141
+ ### Environment Variables
142
+
143
+ ```bash
144
+ # Set in .env file
145
+ DREMIO_BASE_URL=https://dremio.company.com
146
+ DREMIO_USERNAME=admin
147
+ DREMIO_PASSWORD=secret
148
+ ```
149
+
150
+ ## 📊 Output Formats
151
+
152
+ ```bash
153
+ # Table format (default)
154
+ dremio catalog list
155
+
156
+ # JSON format
157
+ dremio --output json catalog list
158
+
159
+ # YAML format
160
+ dremio --output yaml catalog list
161
+ ```
162
+
163
+ ## 🌐 Platform Support
164
+
165
+ | Feature | Software | Cloud |
166
+ |---------|----------|-------|
167
+ | Catalog Operations | ✅ | ✅ |
168
+ | SQL Execution | ✅ | ⚠️ Limited |
169
+ | Job Management | ✅ | ✅ |
170
+ | View Management | ✅ | ✅ |
171
+ | Source Management | ✅ | ✅ |
172
+ | Grant Management | ✅ | ✅ |
173
+ | User/Role Management | ✅ | ⚠️ Via Console |
174
+
175
+ ## 💻 Development
176
+
177
+ ```bash
178
+ # Clone repository
179
+ git clone https://github.com/developer-advocacy-dremio/dremio-python-cli.git
180
+ cd dremio-python-cli/dremio-cli
181
+
182
+ # Install in development mode
183
+ pip install -e .
184
+
185
+ # Run tests
186
+ pytest
187
+
188
+ # Run live tests
189
+ python scripts/test_sql_operations.py
190
+ ```
191
+
192
+ ## 🤝 Contributing
193
+
194
+ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
195
+
196
+ ## 📄 License
197
+
198
+ This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
199
+
200
+ ## 🔗 Links
201
+
202
+ - [Documentation](docs/README.md)
203
+ - [Dremio Documentation](https://docs.dremio.com)
204
+ - [Dremio Cloud](https://www.dremio.com/cloud/)
205
+ - [Dremio Software](https://www.dremio.com/platform/)
206
+
207
+ ## 🆘 Support
208
+
209
+ For issues and questions:
210
+ - GitHub Issues: [Report an issue](https://github.com/developer-advocacy-dremio/dremio-python-cli/issues)
211
+ - Documentation: [Read the docs](docs/README.md)
212
+ - Community: [Dremio Community](https://community.dremio.com)
@@ -0,0 +1,89 @@
1
+ # Bash completion for dremio CLI
2
+
3
+ _dremio_completion() {
4
+ local cur prev opts base
5
+ COMPREPLY=()
6
+ cur="${COMP_WORDS[COMP_CWORD]}"
7
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
8
+
9
+ # Main commands
10
+ local commands="catalog profile source space folder table view sql job user role tag wiki grant history favorite --help --version"
11
+
12
+ # If we're completing the first argument
13
+ if [ $COMP_CWORD -eq 1 ]; then
14
+ COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) )
15
+ return 0
16
+ fi
17
+
18
+ # Get the main command
19
+ local cmd="${COMP_WORDS[1]}"
20
+
21
+ case "${cmd}" in
22
+ catalog)
23
+ local subcommands="list get get-by-path"
24
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
25
+ ;;
26
+ profile)
27
+ local subcommands="create list get set-default delete"
28
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
29
+ ;;
30
+ source)
31
+ local subcommands="list get create update refresh delete test-connection"
32
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
33
+ ;;
34
+ space)
35
+ local subcommands="create list get delete"
36
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
37
+ ;;
38
+ folder)
39
+ local subcommands="create list get get-by-path delete"
40
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
41
+ ;;
42
+ table)
43
+ local subcommands="promote format update"
44
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
45
+ ;;
46
+ view)
47
+ local subcommands="create list get get-by-path update delete"
48
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
49
+ ;;
50
+ sql)
51
+ local subcommands="execute explain validate"
52
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
53
+ ;;
54
+ job)
55
+ local subcommands="list get results cancel profile reflections"
56
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
57
+ ;;
58
+ user)
59
+ local subcommands="list get create update delete"
60
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
61
+ ;;
62
+ role)
63
+ local subcommands="list get create update delete add-member remove-member"
64
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
65
+ ;;
66
+ tag)
67
+ local subcommands="set get delete"
68
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
69
+ ;;
70
+ wiki)
71
+ local subcommands="set get delete"
72
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
73
+ ;;
74
+ grant)
75
+ local subcommands="list add remove set"
76
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
77
+ ;;
78
+ history)
79
+ local subcommands="list run clear"
80
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
81
+ ;;
82
+ favorite)
83
+ local subcommands="add list run delete"
84
+ COMPREPLY=( $(compgen -W "${subcommands}" -- ${cur}) )
85
+ ;;
86
+ esac
87
+ }
88
+
89
+ complete -F _dremio_completion dremio
@@ -0,0 +1,89 @@
1
+ #compdef dremio
2
+
3
+ _dremio() {
4
+ local -a commands
5
+ commands=(
6
+ 'catalog:Catalog operations'
7
+ 'profile:Profile management'
8
+ 'source:Source management'
9
+ 'space:Space management'
10
+ 'folder:Folder management'
11
+ 'table:Table operations'
12
+ 'view:View management'
13
+ 'sql:SQL operations'
14
+ 'job:Job management'
15
+ 'user:User management'
16
+ 'role:Role management'
17
+ 'tag:Tag management'
18
+ 'wiki:Wiki management'
19
+ 'grant:Grant management'
20
+ 'history:Query history'
21
+ 'favorite:Favorite queries'
22
+ )
23
+
24
+ local -a catalog_commands
25
+ catalog_commands=(
26
+ 'list:List catalog items'
27
+ 'get:Get catalog item'
28
+ 'get-by-path:Get item by path'
29
+ )
30
+
31
+ local -a profile_commands
32
+ profile_commands=(
33
+ 'create:Create profile'
34
+ 'list:List profiles'
35
+ 'get:Get profile'
36
+ 'set-default:Set default profile'
37
+ 'delete:Delete profile'
38
+ )
39
+
40
+ local -a source_commands
41
+ source_commands=(
42
+ 'list:List sources'
43
+ 'get:Get source'
44
+ 'create:Create source'
45
+ 'update:Update source'
46
+ 'refresh:Refresh source'
47
+ 'delete:Delete source'
48
+ 'test-connection:Test connection'
49
+ )
50
+
51
+ local -a history_commands
52
+ history_commands=(
53
+ 'list:List history'
54
+ 'run:Run from history'
55
+ 'clear:Clear history'
56
+ )
57
+
58
+ local -a favorite_commands
59
+ favorite_commands=(
60
+ 'add:Add favorite'
61
+ 'list:List favorites'
62
+ 'run:Run favorite'
63
+ 'delete:Delete favorite'
64
+ )
65
+
66
+ if (( CURRENT == 2 )); then
67
+ _describe 'command' commands
68
+ elif (( CURRENT == 3 )); then
69
+ case "$words[2]" in
70
+ catalog)
71
+ _describe 'subcommand' catalog_commands
72
+ ;;
73
+ profile)
74
+ _describe 'subcommand' profile_commands
75
+ ;;
76
+ source)
77
+ _describe 'subcommand' source_commands
78
+ ;;
79
+ history)
80
+ _describe 'subcommand' history_commands
81
+ ;;
82
+ favorite)
83
+ _describe 'subcommand' favorite_commands
84
+ ;;
85
+ esac
86
+ fi
87
+ }
88
+
89
+ _dremio "$@"