Skip to content

feat: cz-cli task param system, JDBC datasource binding, execute improvements#8

Merged
yunqiqiliang merged 3 commits into
mainfrom
feat/cz-cli-ts-rewrite
May 15, 2026
Merged

feat: cz-cli task param system, JDBC datasource binding, execute improvements#8
yunqiqiliang merged 3 commits into
mainfrom
feat/cz-cli-ts-rewrite

Conversation

@yunqiqiliang
Copy link
Copy Markdown
Contributor

Summary

This PR merges the feat/cz-cli-ts-rewrite branch into main, including 143 commits of feature work and bug fixes. The changes most relevant to this session are highlighted below.

Task Parameter System

  • task save-content --params now auto-detects paramType=system for built-in 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 $[
  • task content now returns params, input_params, output_params fields from the raw API response
  • task execute auto-loads saved manual params as defaults; --param KEY=VAL overrides; warns to stderr when unresolved ${placeholders} remain after merge (SQL tasks will fail; Python/Shell silently keep literal strings)

JDBC Task Datasource Binding

  • task content parses adhocConfigs and returns datasource_id, session_schema_name, ds_type fields
  • task execute auto-resolves JDBC datasource config from saved adhocConfigs; new --datasource <name|id> and --database <db> flags for override or new tasks
  • --datasource accepts name or numeric ID; dsType is auto-resolved via datasource API (fixes dsType is null error on new JDBC tasks)
  • Added missing JDBC-supported datasource types: Aurora MySQL (39), Aurora PostgreSQL (40), PolarDB PostgreSQL (48); fixed PolarDB (19) display name

Runs Refill

  • runs refill --from/--to describe updated to clarify YYYY-MM-DD (day boundary) vs YYYY-MM-DDTHH:MM:SS (exact datetime for hourly/minutely task backfills)

SKILL / Documentation

  • Added Rule 3.1 to SKILL.template.md: 补数/回填 → runs refill routing hint
  • Updated cz-cli-inner/SKILL.md with new execute, refill, save-content behavior
  • locale.ts task_content message updated to describe params field and paramType semantics

Testing

All changes verified against live ClickZetta Lakehouse environment:

  • SQL/Python/Shell task param injection (manual + system types)
  • JDBC task execute with saved adhocConfigs (auto-resolve)
  • JDBC task execute with --datasource aliyun_mysql --database clickzetta_authority (new task, name lookup)
  • task content returning datasource fields
  • runs refill datetime format behavior

yunqiqiliang and others added 3 commits May 15, 2026 19:06
- task content now parses adhocConfigs JSON and returns datasource_id,
  session_schema_name, ds_type fields for JDBC tasks
- task execute auto-resolves datasourceId/sessionSchemaName/dsType from
  saved adhocConfigs; --datasource and --database flags allow override
- SDK ExecuteAdhocParams extended with optional datasourceId,
  sessionSchemaName, dsType fields passed to /adhoc/execute endpoint
- fixes "获取数据源配置异常" error when executing JDBC tasks via CLI

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…or id

- --datasource now accepts datasource name or numeric ID (string type)
- dsType is auto-resolved via resolveDatasource() when --datasource is
  provided, fixing "dsType is null" error on new JDBC tasks
- export resolveDatasource and ResolvedDatasource from datasource.ts
- adhocConfigs parsing moved into execute command scope (was missing)
- new JDBC tasks (no saved adhocConfigs) now work with:
  cz-cli task execute <task> --datasource <name|id> --database <db>

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Add Aurora MySQL (39), Aurora PostgreSQL (40), PolarDB PostgreSQL (48)
which are supported by JDBC tasks but were missing from the type map.
Also fix PolarDB (19) display name to "PolarDB MySQL" for clarity.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@yunqiqiliang yunqiqiliang merged commit 7b9df25 into main May 15, 2026
4 of 9 checks passed
hellozepp pushed a commit that referenced this pull request Jun 3, 2026
…er, #9 rerun -y

Co-Authored-By: cz-cli <noreply@clickzetta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant