@clickzetta/cz-cli-darwin-arm64 0.3.73 → 0.3.75
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.
- package/bin/cz-cli +0 -0
- package/bin/skills/cz-cli/SKILL.md +137 -224
- package/package.json +1 -1
package/bin/cz-cli
CHANGED
|
Binary file
|
|
@@ -1,274 +1,187 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cz-cli
|
|
3
|
-
description: "
|
|
4
|
-
generated_cli_version: "0.0.0-dev+202605250308"
|
|
5
|
-
generated_with: "cz-cli-skill-generator/1.0.0"
|
|
6
|
-
command_inventory_source: "click-command-tree"
|
|
7
|
-
command_count: 51
|
|
3
|
+
description: "Route ALL ClickZetta Lakehouse operations to cz-cli: SQL, Studio tasks, tables, pipelines, profiles. Use when user mentions ClickZetta, Lakehouse, cz-cli, or needs profile/connection configuration."
|
|
8
4
|
---
|
|
9
5
|
|
|
10
|
-
# cz-cli
|
|
6
|
+
# cz-cli — ClickZetta Lakehouse Subagent
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
> **Fallback**: If `cz-cli` command not present, check for a bundled binary at `scripts/<platform>/cz-cli` (e.g. `scripts/macos-arm64/cz-cli`, `scripts/linux-x86_64/cz-cli`, `scripts/windows-x86_64/cz-cli.exe`). If found, use its absolute path directly. Otherwise run `pip3 install cz-cli -U` then use `cz-cli` from PATH.
|
|
8
|
+
You have no direct Lakehouse access. Always delegate via cz-cli.
|
|
14
9
|
|
|
15
|
-
##
|
|
10
|
+
## Capabilities
|
|
16
11
|
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
### SQL & Data Operations
|
|
13
|
+
- Execute any SQL against Lakehouse: SELECT, DDL (CREATE/ALTER/DROP TABLE, SCHEMA, VIEW), DML (INSERT, UPDATE, DELETE, MERGE INTO)
|
|
14
|
+
- Run async jobs and fetch results
|
|
15
|
+
- Preview table data and row counts
|
|
19
16
|
|
|
20
|
-
###
|
|
17
|
+
### Table & Schema Management
|
|
18
|
+
- List, describe, create, and drop tables and schemas
|
|
19
|
+
- View table history, indexes, partitions, and statistics
|
|
20
|
+
- Add or update column/table comments
|
|
21
|
+
- Create Dynamic Tables for auto-incremental ETL (ODS→DWD→DWS pipelines)
|
|
22
|
+
- Create Materialized Views for pre-computed aggregations
|
|
23
|
+
- Create Table Streams to capture INSERT/UPDATE/DELETE changes for CDC UPSERT
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
### Studio Task Management
|
|
26
|
+
- Create, configure, deploy, and delete Studio tasks (SQL, Shell, Python, integration, flow)
|
|
27
|
+
- Save task content and cron schedule
|
|
28
|
+
- Deploy, undeploy, and execute tasks ad-hoc
|
|
29
|
+
- Monitor run instances: list, detail, wait, logs, stop, rerun, backfill
|
|
30
|
+
- View run statistics and dependencies
|
|
23
31
|
|
|
24
|
-
###
|
|
32
|
+
### Data Sync Pipelines
|
|
33
|
+
- Create single-table realtime CDC sync tasks (MySQL/PostgreSQL/SQL Server → Lakehouse, task_type=28)
|
|
34
|
+
- Create multi-table or whole-database CDC sync tasks — mirror, merge, or sharded-table consolidation (task_type=281)
|
|
35
|
+
- Create offline batch sync tasks with Cron scheduling — single-table (task_type=10) or multi-table (task_type=291)
|
|
36
|
+
- Manage sync task lifecycle: start, stop, offline, backfill, add tables, re-sync individual tables
|
|
25
37
|
|
|
26
|
-
|
|
38
|
+
### Data Ingestion Pipelines
|
|
39
|
+
- Create continuous OSS/S3/COS ingest PIPE (LIST_PURGE scan mode or EVENT_NOTIFICATION mode)
|
|
40
|
+
- Create continuous Kafka ingest PIPE using READ_KAFKA function
|
|
41
|
+
- One-shot file import from URL, local path, or Volume (COPY INTO)
|
|
42
|
+
- Manage PIPE lifecycle: pause, resume, adjust batch interval, view load history
|
|
27
43
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
44
|
+
### Data Recovery
|
|
45
|
+
- Query data at a historical point in time (Time Travel: TIMESTAMP AS OF)
|
|
46
|
+
- Roll back a table to a previous version (RESTORE TABLE)
|
|
47
|
+
- Recover accidentally dropped tables, dynamic tables, or materialized views (UNDROP TABLE)
|
|
48
|
+
- Inspect change history (DESC HISTORY) and deleted objects (SHOW TABLES HISTORY)
|
|
49
|
+
- Configure retention: data_retention_days, data_lifecycle
|
|
32
50
|
|
|
33
|
-
|
|
51
|
+
### Connection & Environment Management
|
|
52
|
+
- Create, update, delete, and switch connection profiles (multi-cloud, multi-region)
|
|
53
|
+
- Check connection status and switch workspace
|
|
54
|
+
- List and test external data sources, browse catalogs and objects
|
|
55
|
+
- Generate Python SDK / ZettaPark / SQLAlchemy / JDBC connection code from profile parameters
|
|
34
56
|
|
|
35
|
-
|
|
57
|
+
## Route to cz-cli
|
|
36
58
|
|
|
59
|
+
- Any mention of cz-cli, ClickZetta, or Lakehouse
|
|
60
|
+
- SQL against Lakehouse (SELECT, DDL, DML)
|
|
61
|
+
- Studio task development, scheduling, monitoring
|
|
62
|
+
- Data pipelines (sync, import, CDC, streaming)
|
|
63
|
+
- Profile and connection configuration
|
|
64
|
+
- Performance analysis and optimization
|
|
37
65
|
|
|
38
|
-
|
|
66
|
+
## Keep in host agent
|
|
39
67
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
68
|
+
- General programming unrelated to ClickZetta
|
|
69
|
+
- Local file operations, git
|
|
70
|
+
- Non-ClickZetta databases (PostgreSQL, MySQL standalone)
|
|
43
71
|
|
|
44
|
-
|
|
72
|
+
## Execution strategy
|
|
45
73
|
|
|
46
|
-
|
|
47
|
-
- **lakehouse-doc** — ClickZetta Lakehouse official documentation. Covers SQL syntax, data types, functions, DDL/DML commands, dynamic tables, materialized views, access control, VCluster, data lake, AI functions, etc. When the user writes or asks about SQL syntax or Lakehouse dialect specifics, **MUST** consult lakehouse-doc skill references first to ensure accuracy.
|
|
74
|
+
**MANDATORY: Follow this order every time. No exceptions.**
|
|
48
75
|
|
|
49
|
-
**
|
|
76
|
+
**Step 1 — MUST check LLM first:**
|
|
50
77
|
|
|
51
|
-
|
|
78
|
+
```bash
|
|
79
|
+
cz-cli agent llm show
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Step 2 — If active LLM is configured (kind != "none"), you MUST use agent run:**
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
cz-cli agent run "<request>" --format a2a --dangerously-skip-permissions
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Do NOT use direct cz-cli subcommands when an active LLM is available. Always delegate the full request to `cz-cli agent run`.
|
|
89
|
+
|
|
90
|
+
**Step 3 — ONLY if no active LLM (kind: "none" or empty list), fall back to direct commands:**
|
|
52
91
|
|
|
53
|
-
|
|
92
|
+
Decompose the request into concrete `cz-cli` subcommands (`sql`, `schema`, `table`, `task`, `runs`, `job`, `datasource`, `profile`, etc.), execute them, and synthesize the result.
|
|
54
93
|
|
|
55
|
-
-
|
|
56
|
-
- Asking about ClickZetta Lakehouse SQL dialect syntax, keywords, or function usage
|
|
57
|
-
- Using data types, type casting, or datetime formats
|
|
58
|
-
- Creating or altering tables, views, materialized views, dynamic tables, external tables
|
|
59
|
-
- Data import/export (COPY INTO, PUT/GET, BulkLoad, Pipe)
|
|
60
|
-
- Access control (GRANT / REVOKE), roles, permissions
|
|
61
|
-
- VCluster configuration and management
|
|
62
|
-
- Index creation and usage (inverted index, BloomFilter, vector index)
|
|
63
|
-
- AI functions, vector search, semantic views
|
|
64
|
-
- Information Schema system view queries
|
|
94
|
+
Use direct commands for local setup and diagnostics even when agent path is available: `cz-cli profile ...`, `cz-cli -p <profile> status`, `cz-cli agent llm ...`, `cz-cli --help`.
|
|
65
95
|
|
|
66
|
-
|
|
96
|
+
With session continuity:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
cz-cli agent run "<request>" --format a2a --dangerously-skip-permissions --session <session_id>
|
|
100
|
+
```
|
|
67
101
|
|
|
68
|
-
|
|
102
|
+
Reuse `session_id` for follow-ups on the same topic. Omit `--session` to start fresh.
|
|
69
103
|
|
|
70
|
-
|
|
71
|
-
After saving, tell the user: "The task has been saved as a draft. Scheduling is not yet active. Let me know explicitly if you want to publish or execute it."
|
|
104
|
+
## Multi-environment (profiles)
|
|
72
105
|
|
|
73
|
-
|
|
106
|
+
When the user specifies an environment or profile (e.g. "use uat_test", "on the test instance"):
|
|
74
107
|
|
|
75
|
-
|
|
108
|
+
```bash
|
|
109
|
+
cz-cli agent run "<request>" --profile uat_test --format a2a --dangerously-skip-permissions
|
|
110
|
+
```
|
|
76
111
|
|
|
77
|
-
|
|
112
|
+
Available profiles: read `~/.clickzetta/profiles.toml` or run `cz-cli profile list`.
|
|
78
113
|
|
|
79
|
-
|
|
80
|
-
- **MUST** use `cz-cli runs refill <task> --from YYYY-MM-DD --to YYYY-MM-DD [-y]`
|
|
81
|
-
- This command is under `runs`, **NOT** under `task` — do not look for it in task subcommands
|
|
82
|
-
- Requires the task to already be published (online); draft tasks cannot be backfilled
|
|
114
|
+
## Adding a new profile
|
|
83
115
|
|
|
84
|
-
|
|
116
|
+
**Trigger conditions:** User says "configure new environment", "add profile", "can't connect", mentions an unknown profile name, or provides connection credentials.
|
|
85
117
|
|
|
86
|
-
|
|
118
|
+
### Step 1 — Collect information (guided Q&A)
|
|
87
119
|
|
|
88
|
-
|
|
89
|
-
- If the user only needs "latest / recent N items": stop after page 1, do not paginate.
|
|
90
|
-
- If the user needs the full dataset: paginate until `ai_message` no longer contains a next-page hint.
|
|
91
|
-
- **Safety limit**: auto-paginate at most **3 pages** (≈ 30 items). If more exist, surface the next-page command to the user and ask whether to continue.
|
|
120
|
+
If all required fields are already provided, skip directly to Step 2.
|
|
92
121
|
|
|
93
|
-
|
|
122
|
+
Otherwise, ask for missing ones. Accept all at once or prompt one by one.
|
|
94
123
|
|
|
95
|
-
|
|
96
|
-
The Python SDK(connector/igs/bulkload) is using from clickzetta import connect instead of Zettapark's session.
|
|
124
|
+
**Required fields:**
|
|
97
125
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
126
|
+
| Field | Question to ask | Example |
|
|
127
|
+
|-------|----------------|---------|
|
|
128
|
+
| `service` | Which cloud region? (see table below, or provide the service endpoint directly) | `cn-shanghai-alicloud.api.clickzetta.com` |
|
|
129
|
+
| `instance` | What is the instance name? | `billingsh` |
|
|
130
|
+
| `workspace` | What is the workspace name? | `meter_n_bill` |
|
|
131
|
+
| `username` | What is the username? | `billing_admin` |
|
|
132
|
+
| `password` | What is the password? | — |
|
|
133
|
+
| `name` | What should this profile be named? (suggested format below) | `billingsh` |
|
|
101
134
|
|
|
102
|
-
|
|
135
|
+
**Common service endpoints (offer as options):**
|
|
103
136
|
|
|
104
|
-
|
|
137
|
+
| Region | service | Suggested profile prefix |
|
|
138
|
+
|--------|---------|--------------------------|
|
|
139
|
+
| Alibaba Cloud East China 2 (Shanghai) | `cn-shanghai-alicloud.api.clickzetta.com` | `cn-shanghai` |
|
|
140
|
+
| Tencent Cloud East China (Shanghai) | `ap-shanghai-tencentcloud.api.clickzetta.com` | `ap-shanghai` |
|
|
141
|
+
| Tencent Cloud North China (Beijing) | `ap-beijing-tencentcloud.api.clickzetta.com` | `ap-beijing` |
|
|
142
|
+
| Tencent Cloud South China (Guangzhou) | `ap-guangzhou-tencentcloud.api.clickzetta.com` | `ap-guangzhou` |
|
|
143
|
+
| AWS China (Beijing) | `cn-north-1-aws.api.clickzetta.com` | `cn-north-1` |
|
|
105
144
|
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
145
|
+
**Inference rules (reduce unnecessary questions):**
|
|
146
|
+
- If the user describes a cloud region in natural language (e.g. "Alibaba Cloud Shanghai", "Tencent Cloud Beijing", "阿里云上海", "腾讯云北京"), look up the service endpoint from the table above — do NOT ask the user to provide it again.
|
|
147
|
+
- If the user hasn't provided a profile name, suggest `<prefix>-<instance>` using the prefix from the table (e.g. `cn-shanghai-billingsh`). Confirm with the user or proceed if they don't object.
|
|
109
148
|
|
|
110
|
-
###
|
|
149
|
+
### Step 2 — Create profile
|
|
111
150
|
|
|
112
|
-
|
|
151
|
+
Run `cz-cli profile create` with all collected fields:
|
|
113
152
|
|
|
114
|
-
|
|
153
|
+
```bash
|
|
154
|
+
cz-cli profile create <name> \
|
|
155
|
+
--username <username> \
|
|
156
|
+
--password <password> \
|
|
157
|
+
--instance <instance> \
|
|
158
|
+
--workspace <workspace> \
|
|
159
|
+
--service <service> \
|
|
160
|
+
--schema public \
|
|
161
|
+
--vcluster default
|
|
162
|
+
```
|
|
115
163
|
|
|
116
|
-
###
|
|
164
|
+
### Step 3 — Verify connection
|
|
117
165
|
|
|
118
|
-
|
|
166
|
+
After creating, run:
|
|
119
167
|
|
|
120
168
|
```bash
|
|
121
|
-
|
|
122
|
-
|
|
169
|
+
cz-cli status --profile <name>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
A successful response looks like:
|
|
173
|
+
```json
|
|
174
|
+
{"data": {"connected": true, "workspace": "...", "time_ms": ...}}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
If it fails, report the error and ask the user to double-check credentials or service endpoint.
|
|
178
|
+
|
|
179
|
+
## Error handling
|
|
123
180
|
|
|
124
|
-
|
|
125
|
-
cz-cli task content my_task --format toon & cz-cli runs list --task my_task --format toon & wait
|
|
181
|
+
All errors in non-TTY mode output JSON to stdout:
|
|
126
182
|
|
|
127
|
-
|
|
128
|
-
|
|
183
|
+
```json
|
|
184
|
+
{"ok": false, "error": "NO_PROFILE", "next_steps": ["cz-cli setup --credential <base64>"]}
|
|
129
185
|
```
|
|
130
186
|
|
|
131
|
-
|
|
132
|
-
- `--field <name>` — extract one value as raw text: `cz-cli sql "..." --field job_id` → `2026042818122957849079780`
|
|
133
|
-
- `--format toon` — line-per-field output, works with `grep`/`head`
|
|
134
|
-
- `--format json` — single-line JSON, parse in code only (do NOT pipe to grep/head)
|
|
135
|
-
|
|
136
|
-
**Shortcut**: Use `cz-cli sql --sync "..." > /tmp/res.json` to force synchronous execution (waits for results inline). Prefer `--sync` for simple/fast queries.
|
|
137
|
-
|
|
138
|
-
## Command Quick Reference
|
|
139
|
-
|
|
140
|
-
### Connection & Profile
|
|
141
|
-
- `cz-cli profile create <name> --username U --password P --instance I --workspace W` — Create profile
|
|
142
|
-
- `cz-cli profile create <name> --pat TOKEN --instance I --workspace W` — Create profile with PAT
|
|
143
|
-
- `cz-cli profile list` — List all profiles
|
|
144
|
-
- `cz-cli profile status` — Test connection, show workspace/schema
|
|
145
|
-
- `cz-cli profile use <name>` — Set default profile
|
|
146
|
-
- `cz-cli profile delete <name>` — Delete a profile
|
|
147
|
-
- `cz-cli profile discover --studio-url URL --username U --password P` — Discover regions/instances
|
|
148
|
-
|
|
149
|
-
### SQL Execution
|
|
150
|
-
- `cz-cli sql "SELECT * FROM t LIMIT 10"` — Execute SQL query
|
|
151
|
-
- `cz-cli sql -f query.sql` — Execute SQL from file
|
|
152
|
-
- `cz-cli sql --write "INSERT INTO t VALUES (...)"` — Write operation (requires --write)
|
|
153
|
-
- `cz-cli sql --async "SELECT count(*) FROM big_table"` — Async execution, returns job_id
|
|
154
|
-
- `cz-cli sql --sync "SELECT 1"` — Force synchronous execution
|
|
155
|
-
- `cz-cli sql -e "SELECT * FROM t WHERE id = %(id)s" --variable id=123` — Variable substitution
|
|
156
|
-
|
|
157
|
-
### Job Management (async SQL results)
|
|
158
|
-
- `cz-cli job status <job_id>` — Check job status
|
|
159
|
-
- `cz-cli job result <job_id>` — Fetch result set (waits if running, limited to 100 rows)
|
|
160
|
-
- `cz-cli job result --no-limit <job_id>` — Fetch full result set
|
|
161
|
-
|
|
162
|
-
### Schema & Table
|
|
163
|
-
- `cz-cli schema list` / `cz-cli schema describe <name>` / `cz-cli schema create <name>` / `cz-cli schema drop <name>`
|
|
164
|
-
- `cz-cli table list [--schema S] [--like 'pattern%']` / `cz-cli table describe <name>` / `cz-cli table preview <name> [--limit N]`
|
|
165
|
-
- `cz-cli table stats <name>` / `cz-cli table history [name]` / `cz-cli table create "DDL"` / `cz-cli table drop <name>`
|
|
166
|
-
|
|
167
|
-
### Workspace
|
|
168
|
-
- `cz-cli workspace current` — Show current workspace
|
|
169
|
-
- `cz-cli workspace use <name> [--persist]` — Switch workspace
|
|
170
|
-
|
|
171
|
-
### Task Scheduling (Studio)
|
|
172
|
-
- `cz-cli task list [--page N --page-size N]` — List tasks
|
|
173
|
-
- `cz-cli task create <name> --type SQL|PYTHON|SHELL|SPARK|FLOW --folder F` — Create task
|
|
174
|
-
- `cz-cli task content <name_or_id>` — Get task script, config and params (draft); response includes `params` array with `paramType=system` (built-in params / time expressions) or `paramType=manual` (constants)
|
|
175
|
-
- `cz-cli task save-content <name_or_id> --file script.sql [--params '{"key":"val","dt":"bizdate","yd":"$[yyyy-MM-dd,-1d]"}']` — Save script and optionally set params; system params (bizdate, sys_biz_day, sys_biz_datetime, sys_plan_day, sys_plan_datetime, sys_plan_timestamp, sys_task_id, sys_task_name, sys_task_owner) and time expressions starting with `$[` are auto-detected as `paramType=system`
|
|
176
|
-
- `cz-cli task save-config <name_or_id> --cron "0 0 8 * * ? *"` — Save schedule (sec min hour day month week year)
|
|
177
|
-
- `cz-cli task online <name_or_id> -y` — Publish task
|
|
178
|
-
- `cz-cli task offline <name_or_id> -y` — Take offline (IRREVERSIBLE)
|
|
179
|
-
- `cz-cli task execute <name_or_id> [--param KEY=VAL ...]` — Ad-hoc execution; auto-loads saved `manual` params as defaults (system params like `bizdate` are NOT auto-injected in adhoc mode — pass them explicitly via `--param`); warns if unresolved `${placeholders}` remain after merge (SQL tasks will fail, Python/Shell silently keep literal strings)
|
|
180
|
-
- `cz-cli task flow dag <flow>` / `task flow create-node` / `task flow bind` / `task flow submit` — Flow operations
|
|
181
|
-
|
|
182
|
-
### Runs & Attempts
|
|
183
|
-
- `cz-cli runs list [--task T --status S --run-type SCHEDULE|REFILL --from D --to D]`
|
|
184
|
-
- `cz-cli runs detail <run_id_or_task>` / `cz-cli runs logs <run_id_or_task>` / `cz-cli runs wait <id> --timeout N`
|
|
185
|
-
- `cz-cli runs refill <task> --from D --to D [-y]` — **补数/回填**: re-run scheduled instances for a historical date range (task must be online). `D` accepts `YYYY-MM-DD` (day boundary: `--from` = start of day, `--to` = 23:59:59) or `YYYY-MM-DDTHH:MM:SS` for exact datetime — **use ISO datetime for hourly/minutely tasks** to avoid missing instances
|
|
186
|
-
- `cz-cli attempts list <run_id_or_task>` / `cz-cli attempts log <run_id_or_task> [--attempt-id N]`
|
|
187
|
-
|
|
188
|
-
### Agent (AI Agent)
|
|
189
|
-
- `cz-cli agent run "<prompt>" [--session ID]` — Run AI agent with a natural-language prompt
|
|
190
|
-
- `cz-cli agent llm` — Manage LLM providers
|
|
191
|
-
|
|
192
|
-
## Command Inventory (Generated)
|
|
193
|
-
|
|
194
|
-
### `ai-guide`
|
|
195
|
-
- `ai-guide` - Generate AI-friendly command reference
|
|
196
|
-
|
|
197
|
-
### `attempts`
|
|
198
|
-
- `attempts` - Manage attempt records
|
|
199
|
-
- `attempts list` - List attempts for a run
|
|
200
|
-
- `attempts log` - Get attempt log
|
|
201
|
-
|
|
202
|
-
### `job`
|
|
203
|
-
- `job` - Job performance tools
|
|
204
|
-
- `job result` - Fetch result set of a SQL job
|
|
205
|
-
- `job status` - Check status/summary of a SQL job
|
|
206
|
-
|
|
207
|
-
### `profile`
|
|
208
|
-
- `profile` - Manage connection profiles
|
|
209
|
-
- `profile create` - Create a profile
|
|
210
|
-
- `profile delete` - Delete a profile
|
|
211
|
-
- `profile detail` - Show profile details
|
|
212
|
-
- `profile list` - List profiles
|
|
213
|
-
- `profile update` - Update a profile
|
|
214
|
-
- `profile use` - Set default profile
|
|
215
|
-
|
|
216
|
-
### `runs`
|
|
217
|
-
- `runs` - Manage task run instances
|
|
218
|
-
- `runs deps` - View run dependencies
|
|
219
|
-
- `runs detail` - Get run detail
|
|
220
|
-
- `runs list` - List run instances
|
|
221
|
-
- `runs logs` - Get run logs
|
|
222
|
-
- `runs refill` - Submit backfill job
|
|
223
|
-
- `runs rerun` - Rerun a failed instance
|
|
224
|
-
- `runs stats` - Get run statistics summary
|
|
225
|
-
- `runs stop` - Stop a running instance
|
|
226
|
-
- `runs wait` - Poll until run completes
|
|
227
|
-
|
|
228
|
-
### `schema`
|
|
229
|
-
- `schema` - Manage schemas
|
|
230
|
-
- `schema create` - Create a schema
|
|
231
|
-
- `schema describe` - Describe a schema
|
|
232
|
-
- `schema drop` - Drop a schema
|
|
233
|
-
- `schema list` - List schemas
|
|
234
|
-
|
|
235
|
-
### `sql`
|
|
236
|
-
- `sql` - Execute SQL against ClickZetta
|
|
237
|
-
- `cz-cli sql "SELECT 1"` — Run a simple query
|
|
238
|
-
- `cz-cli sql -e "SELECT * FROM t LIMIT 10" --sync` — Synchronous query
|
|
239
|
-
- `cz-cli sql -f query.sql --write` — Execute write SQL from file
|
|
240
|
-
|
|
241
|
-
### `table`
|
|
242
|
-
- `table` - Manage tables
|
|
243
|
-
- `table create` - Create a table from DDL
|
|
244
|
-
- `table describe` - Describe a table
|
|
245
|
-
- `table drop` - Drop a table
|
|
246
|
-
- `table history` - Show table history
|
|
247
|
-
- `table list` - List tables
|
|
248
|
-
- `table preview` - Preview table data
|
|
249
|
-
- `table stats` - Get table row count
|
|
250
|
-
|
|
251
|
-
### `task`
|
|
252
|
-
- `task` - Manage Studio tasks
|
|
253
|
-
- `task content` - Get task content
|
|
254
|
-
- `task create` - Create a new task
|
|
255
|
-
- `task deps` - Show task dependencies
|
|
256
|
-
- `task execute` - Execute a task ad-hoc
|
|
257
|
-
- `task list` - List tasks
|
|
258
|
-
- `task offline` - Take a task offline
|
|
259
|
-
- `task online` - Publish a task
|
|
260
|
-
- `task save-config` - Save task schedule config
|
|
261
|
-
- `task save-content` - Save task script
|
|
262
|
-
|
|
263
|
-
### `workspace`
|
|
264
|
-
- `workspace` - Manage workspaces
|
|
265
|
-
- `workspace current` - Show current workspace
|
|
266
|
-
- `workspace list` - List workspaces
|
|
267
|
-
|
|
268
|
-
## Command Risk Reference
|
|
269
|
-
|
|
270
|
-
| Risk Level | Commands | Key Concern |
|
|
271
|
-
|-----------------|--------------------------------------------------|-----------------------------------------------------------------|
|
|
272
|
-
| 🔴 Irreversible | `task offline`, `schema drop`, `table drop` | Cannot be undone; clears history or deletes objects permanently |
|
|
273
|
-
| 🟠 High Impact | `task online`, `runs refill`, `task flow submit` | Affects live schedule or re-runs historical data |
|
|
274
|
-
| 🟢 Safe | All others | No side effects |
|
|
187
|
+
On `NO_PROFILE` error: check if a profile can be configured via username/password (see "Adding a new profile" above). If the user has a base64 credential instead, guide them to run `cz-cli setup --credential <base64>`. See `references/profile-setup.md`.
|