dremio-cli 1.0.0__py3-none-any.whl
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.
- dremio_cli/__init__.py +5 -0
- dremio_cli/__main__.py +6 -0
- dremio_cli/cli.py +191 -0
- dremio_cli/client/__init__.py +1 -0
- dremio_cli/client/auth.py +100 -0
- dremio_cli/client/base.py +190 -0
- dremio_cli/client/cloud.py +305 -0
- dremio_cli/client/factory.py +122 -0
- dremio_cli/client/software.py +561 -0
- dremio_cli/commands/__init__.py +1 -0
- dremio_cli/commands/catalog.py +143 -0
- dremio_cli/commands/favorite.py +162 -0
- dremio_cli/commands/folder.py +290 -0
- dremio_cli/commands/grant.py +202 -0
- dremio_cli/commands/history.py +122 -0
- dremio_cli/commands/job.py +321 -0
- dremio_cli/commands/lineage.py +9 -0
- dremio_cli/commands/profile.py +165 -0
- dremio_cli/commands/role.py +319 -0
- dremio_cli/commands/source.py +375 -0
- dremio_cli/commands/space.py +226 -0
- dremio_cli/commands/sql.py +280 -0
- dremio_cli/commands/table.py +155 -0
- dremio_cli/commands/tag.py +145 -0
- dremio_cli/commands/udf.py +9 -0
- dremio_cli/commands/user.py +250 -0
- dremio_cli/commands/view.py +369 -0
- dremio_cli/commands/wiki.py +163 -0
- dremio_cli/config.py +193 -0
- dremio_cli/env.py +175 -0
- dremio_cli/formatters/__init__.py +1 -0
- dremio_cli/formatters/json.py +19 -0
- dremio_cli/formatters/table.py +45 -0
- dremio_cli/formatters/yaml.py +17 -0
- dremio_cli/history.py +198 -0
- dremio_cli/utils/__init__.py +1 -0
- dremio_cli/utils/exceptions.py +35 -0
- dremio_cli/utils/helpers.py +73 -0
- dremio_cli/utils/validators.py +147 -0
- dremio_cli-1.0.0.dist-info/METADATA +261 -0
- dremio_cli-1.0.0.dist-info/RECORD +45 -0
- dremio_cli-1.0.0.dist-info/WHEEL +5 -0
- dremio_cli-1.0.0.dist-info/entry_points.txt +2 -0
- dremio_cli-1.0.0.dist-info/licenses/LICENSE +21 -0
- dremio_cli-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"""Helper utility functions."""
|
|
2
|
+
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from typing import Any, Dict, Optional
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def format_timestamp(timestamp: Optional[str]) -> str:
|
|
8
|
+
"""Format ISO timestamp to human-readable format.
|
|
9
|
+
|
|
10
|
+
Args:
|
|
11
|
+
timestamp: ISO 8601 timestamp string
|
|
12
|
+
|
|
13
|
+
Returns:
|
|
14
|
+
Formatted timestamp string
|
|
15
|
+
"""
|
|
16
|
+
if not timestamp:
|
|
17
|
+
return "N/A"
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
dt = datetime.fromisoformat(timestamp.replace("Z", "+00:00"))
|
|
21
|
+
return dt.strftime("%Y-%m-%d %H:%M:%S UTC")
|
|
22
|
+
except Exception:
|
|
23
|
+
return timestamp
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def truncate_string(s: str, max_length: int = 50) -> str:
|
|
27
|
+
"""Truncate a string to maximum length.
|
|
28
|
+
|
|
29
|
+
Args:
|
|
30
|
+
s: String to truncate
|
|
31
|
+
max_length: Maximum length
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
Truncated string with ellipsis if needed
|
|
35
|
+
"""
|
|
36
|
+
if len(s) <= max_length:
|
|
37
|
+
return s
|
|
38
|
+
return s[:max_length - 3] + "..."
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def safe_get(data: Dict[str, Any], *keys: str, default: Any = None) -> Any:
|
|
42
|
+
"""Safely get nested dictionary value.
|
|
43
|
+
|
|
44
|
+
Args:
|
|
45
|
+
data: Dictionary to query
|
|
46
|
+
*keys: Nested keys to traverse
|
|
47
|
+
default: Default value if key not found
|
|
48
|
+
|
|
49
|
+
Returns:
|
|
50
|
+
Value at nested key or default
|
|
51
|
+
"""
|
|
52
|
+
current = data
|
|
53
|
+
for key in keys:
|
|
54
|
+
if not isinstance(current, dict) or key not in current:
|
|
55
|
+
return default
|
|
56
|
+
current = current[key]
|
|
57
|
+
return current
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def format_bytes(bytes_value: int) -> str:
|
|
61
|
+
"""Format bytes to human-readable format.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
bytes_value: Number of bytes
|
|
65
|
+
|
|
66
|
+
Returns:
|
|
67
|
+
Formatted string (e.g., "1.5 MB")
|
|
68
|
+
"""
|
|
69
|
+
for unit in ["B", "KB", "MB", "GB", "TB"]:
|
|
70
|
+
if bytes_value < 1024.0:
|
|
71
|
+
return f"{bytes_value:.1f} {unit}"
|
|
72
|
+
bytes_value /= 1024.0
|
|
73
|
+
return f"{bytes_value:.1f} PB"
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"""Input validators for CLI commands."""
|
|
2
|
+
|
|
3
|
+
import re
|
|
4
|
+
from typing import Any, List, Optional
|
|
5
|
+
from urllib.parse import urlparse
|
|
6
|
+
|
|
7
|
+
from dremio_cli.utils.exceptions import ValidationError
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def validate_url(url: str) -> str:
|
|
11
|
+
"""Validate a URL.
|
|
12
|
+
|
|
13
|
+
Args:
|
|
14
|
+
url: URL to validate
|
|
15
|
+
|
|
16
|
+
Returns:
|
|
17
|
+
The validated URL
|
|
18
|
+
|
|
19
|
+
Raises:
|
|
20
|
+
ValidationError: If URL is invalid
|
|
21
|
+
"""
|
|
22
|
+
try:
|
|
23
|
+
result = urlparse(url)
|
|
24
|
+
if not all([result.scheme, result.netloc]):
|
|
25
|
+
raise ValidationError(f"Invalid URL: {url}")
|
|
26
|
+
return url
|
|
27
|
+
except Exception as e:
|
|
28
|
+
raise ValidationError(f"Invalid URL: {url} - {e}")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def validate_uuid(uuid_str: str) -> str:
|
|
32
|
+
"""Validate a UUID string.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
uuid_str: UUID string to validate
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
The validated UUID string
|
|
39
|
+
|
|
40
|
+
Raises:
|
|
41
|
+
ValidationError: If UUID is invalid
|
|
42
|
+
"""
|
|
43
|
+
uuid_pattern = re.compile(
|
|
44
|
+
r'^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$',
|
|
45
|
+
re.IGNORECASE
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
if not uuid_pattern.match(uuid_str):
|
|
49
|
+
raise ValidationError(f"Invalid UUID: {uuid_str}")
|
|
50
|
+
|
|
51
|
+
return uuid_str
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def validate_profile_type(profile_type: str) -> str:
|
|
55
|
+
"""Validate profile type.
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
profile_type: Profile type to validate
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
The validated profile type
|
|
62
|
+
|
|
63
|
+
Raises:
|
|
64
|
+
ValidationError: If profile type is invalid
|
|
65
|
+
"""
|
|
66
|
+
valid_types = ["cloud", "software"]
|
|
67
|
+
|
|
68
|
+
if profile_type not in valid_types:
|
|
69
|
+
raise ValidationError(
|
|
70
|
+
f"Invalid profile type: {profile_type}. Must be one of: {', '.join(valid_types)}"
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
return profile_type
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def validate_auth_type(auth_type: str) -> str:
|
|
77
|
+
"""Validate authentication type.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
auth_type: Authentication type to validate
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
The validated authentication type
|
|
84
|
+
|
|
85
|
+
Raises:
|
|
86
|
+
ValidationError: If authentication type is invalid
|
|
87
|
+
"""
|
|
88
|
+
valid_types = ["pat", "oauth", "username_password"]
|
|
89
|
+
|
|
90
|
+
if auth_type not in valid_types:
|
|
91
|
+
raise ValidationError(
|
|
92
|
+
f"Invalid auth type: {auth_type}. Must be one of: {', '.join(valid_types)}"
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
return auth_type
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def validate_output_format(output_format: str) -> str:
|
|
99
|
+
"""Validate output format.
|
|
100
|
+
|
|
101
|
+
Args:
|
|
102
|
+
output_format: Output format to validate
|
|
103
|
+
|
|
104
|
+
Returns:
|
|
105
|
+
The validated output format
|
|
106
|
+
|
|
107
|
+
Raises:
|
|
108
|
+
ValidationError: If output format is invalid
|
|
109
|
+
"""
|
|
110
|
+
valid_formats = ["table", "json", "yaml", "csv"]
|
|
111
|
+
|
|
112
|
+
if output_format not in valid_formats:
|
|
113
|
+
raise ValidationError(
|
|
114
|
+
f"Invalid output format: {output_format}. Must be one of: {', '.join(valid_formats)}"
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
return output_format
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
def validate_path(path: Any) -> List[str]:
|
|
121
|
+
"""Validate and parse a Dremio path.
|
|
122
|
+
|
|
123
|
+
Args:
|
|
124
|
+
path: Path as string or list
|
|
125
|
+
|
|
126
|
+
Returns:
|
|
127
|
+
Path as list of strings
|
|
128
|
+
|
|
129
|
+
Raises:
|
|
130
|
+
ValidationError: If path is invalid
|
|
131
|
+
"""
|
|
132
|
+
if isinstance(path, str):
|
|
133
|
+
# Try to parse as JSON array
|
|
134
|
+
import json
|
|
135
|
+
try:
|
|
136
|
+
path = json.loads(path)
|
|
137
|
+
except json.JSONDecodeError:
|
|
138
|
+
# Treat as dot-separated path
|
|
139
|
+
path = path.split(".")
|
|
140
|
+
|
|
141
|
+
if not isinstance(path, list):
|
|
142
|
+
raise ValidationError(f"Invalid path format: {path}")
|
|
143
|
+
|
|
144
|
+
if not all(isinstance(p, str) for p in path):
|
|
145
|
+
raise ValidationError("Path must contain only strings")
|
|
146
|
+
|
|
147
|
+
return path
|
|
@@ -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,45 @@
|
|
|
1
|
+
dremio_cli/__init__.py,sha256=AyKWQ-w8sYfw5mES5gFQqbn8_h5eRe2mgtAORtuzmHI,155
|
|
2
|
+
dremio_cli/__main__.py,sha256=ODZ5dTqdgxsPkrALRBI2pZs3TteasbPlMdr88tOgIY0,115
|
|
3
|
+
dremio_cli/cli.py,sha256=HovQ4E7Kq_Ckq9dg6PV8lghGkdYAuUIolQEGfOr7Dh8,5547
|
|
4
|
+
dremio_cli/config.py,sha256=RQa3L7WlHT1Xr2ICKQgF5s0kBrhsQ1Vzvim1msY22Xw,6209
|
|
5
|
+
dremio_cli/env.py,sha256=VMzRUH9x3bDXdIavEzsXjj58an0AWmsHIAC00_0VY84,5378
|
|
6
|
+
dremio_cli/history.py,sha256=i3eXeesLpbIOOqDQ8GwExR6acBN1Meic4ahb6KDjq_k,5845
|
|
7
|
+
dremio_cli/client/__init__.py,sha256=on1vO2QBZ__9ZGMVGAoW1mc23aLR8u923PqZz6xvbok,42
|
|
8
|
+
dremio_cli/client/auth.py,sha256=H3lKlZERQSHbs_hsoyvlU8A7q7GWHnp35wvH_z6RN5s,2664
|
|
9
|
+
dremio_cli/client/base.py,sha256=Q6qxAdIswP_MiO9Lb6hjlmD2q2ATAzmmQAGhY3FItKY,5618
|
|
10
|
+
dremio_cli/client/cloud.py,sha256=hfP_zdAKY6ZlT1NbeSlUXXVZV0NdrW5KM5Ra0rHGx8M,12132
|
|
11
|
+
dremio_cli/client/factory.py,sha256=1ocbnJOdXCN_g-kJBtuF2qSMApFmv7gLsODoy7go_Yo,3844
|
|
12
|
+
dremio_cli/client/software.py,sha256=jgnlzSYJHqoCd1OuukKavE6_kml_J-fZqRRKQsQv8ag,16253
|
|
13
|
+
dremio_cli/commands/__init__.py,sha256=amuUE9Bq_2UnbV26WPAd1AqcuG_TFMrbJu3fucIIrRY,38
|
|
14
|
+
dremio_cli/commands/catalog.py,sha256=fdAMFmbUps9VOBU-Ql4SGSjKiZQ8EjTkBN7FYlkC7BQ,4527
|
|
15
|
+
dremio_cli/commands/favorite.py,sha256=bHVGOIevYeMyULZA03b0yOBwSG6b-tJuad2P3HfEmrk,5065
|
|
16
|
+
dremio_cli/commands/folder.py,sha256=OP8-TYWHAGGyxhhf1Ydz9PaNQY3-AlraGSFOfuVd0bY,9134
|
|
17
|
+
dremio_cli/commands/grant.py,sha256=os2GhXvJ3QUJ1KoVY1giyRwkMv_h0e-0bel1vjDUweA,6777
|
|
18
|
+
dremio_cli/commands/history.py,sha256=J4IA0dcm6wEvIsu-vsfyBC-bq1QQU7vVNHwl4WqoAF8,3861
|
|
19
|
+
dremio_cli/commands/job.py,sha256=v105xgAcq235AtomUgm8hr1k6_fO9RbqGog_kq51HYQ,10713
|
|
20
|
+
dremio_cli/commands/lineage.py,sha256=X0XKOeAXukxDs7keomn7lzHrD8WDPlKGMK2Fh6-8NdM,117
|
|
21
|
+
dremio_cli/commands/profile.py,sha256=EPirZubu5JoaGXSPpgptegY_9w0EYmo5NXdmWi5bnPo,5557
|
|
22
|
+
dremio_cli/commands/role.py,sha256=weYnIyxYRfAVrHGPYdZoeVaSIcTcf4NiSeC2AxMjmhc,9649
|
|
23
|
+
dremio_cli/commands/source.py,sha256=GTYQXSVllMAeZD4LbLbXKkKx6Gu4xUcTA82MUS6zj5Q,11845
|
|
24
|
+
dremio_cli/commands/space.py,sha256=bQ0bueJwc8gxdlOjzrOaPDvM8xC_IbCicTWHbKxbdkg,6865
|
|
25
|
+
dremio_cli/commands/sql.py,sha256=YypPRqID-Hb1yJfOKZvFRH06IAHEZ_54klBbLo6EB94,10682
|
|
26
|
+
dremio_cli/commands/table.py,sha256=AywABBUbdrDyjvNMoxrcX9uBjNJlYEqUp6XTCOOK1bE,4998
|
|
27
|
+
dremio_cli/commands/tag.py,sha256=jHAMd-yIkwFg5v-5WvCAMnXQZjFEeovcaSqT0ptdlH8,4351
|
|
28
|
+
dremio_cli/commands/udf.py,sha256=3ATQ7otJ7r4G6Uh8vPl2d9mZSUyLRDQmS_yU3NmgBng,105
|
|
29
|
+
dremio_cli/commands/user.py,sha256=j-f3aGek8GaUJG57npf48xTjN5ulKi5ZPIdw5H2RAhM,7624
|
|
30
|
+
dremio_cli/commands/view.py,sha256=UAQ62VdQa9NWLIfrzs9fNWAATUgfTsoFa-CAhFg23co,12019
|
|
31
|
+
dremio_cli/commands/wiki.py,sha256=TNrc-kAYF03E12sRUKX7T8TKRUrvGlRiPb3uOPxani0,5229
|
|
32
|
+
dremio_cli/formatters/__init__.py,sha256=Dcvsc9bOjbom66zbyFmXz5uC9El4CEL1UQ6VmoeJebo,33
|
|
33
|
+
dremio_cli/formatters/json.py,sha256=V8Jp-HJzWKo-BSdjPcpUQyQVm803tzHORbTHFsMx5ac,390
|
|
34
|
+
dremio_cli/formatters/table.py,sha256=iGrOCk2_m_WSHgnbnz80sDXd8Sdm7zORr58jKLV7XUI,1316
|
|
35
|
+
dremio_cli/formatters/yaml.py,sha256=hEIFn9Wru3wK_tqYEb12traG4Z1539Z3uTG9LRnqgUE,298
|
|
36
|
+
dremio_cli/utils/__init__.py,sha256=tqyNdgGqZrcISSg2vBtMlVxsOvwaLo3zjqIk5f3QkhM,37
|
|
37
|
+
dremio_cli/utils/exceptions.py,sha256=rWlUlCUGVdy3LGQeWd_Lba5YWoGlbuGxndx-bT0a5p4,817
|
|
38
|
+
dremio_cli/utils/helpers.py,sha256=zZMGHWXuPi5bco_r0KT1MK1GVv6mpxTSGRKMm3drQDk,1825
|
|
39
|
+
dremio_cli/utils/validators.py,sha256=8rzMv9SNzwmFSl6P8guck863STnMVg_dgzXU9pYTA7U,3594
|
|
40
|
+
dremio_cli-1.0.0.dist-info/licenses/LICENSE,sha256=F-4b93u0OVrVwGXgMwBRq6MlGyUT9zmre1oh5Gft5Ts,1066
|
|
41
|
+
dremio_cli-1.0.0.dist-info/METADATA,sha256=DbEISdGQUaOjZmRmkppUfpIdRjhSdmQJDKNaY_R82oA,7361
|
|
42
|
+
dremio_cli-1.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
43
|
+
dremio_cli-1.0.0.dist-info/entry_points.txt,sha256=eJGAZO8FKPGhNKkQC5P7_ReCc8oQ-CwSyYpydkEmxRM,47
|
|
44
|
+
dremio_cli-1.0.0.dist-info/top_level.txt,sha256=ydP6IF2juLvs97VPkBN9i9_fIHqfDR-NTzqbDKu6IDY,11
|
|
45
|
+
dremio_cli-1.0.0.dist-info/RECORD,,
|
|
@@ -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 @@
|
|
|
1
|
+
dremio_cli
|