feat: cz-cli task param system, JDBC datasource binding, execute improvements - #8
Merged
Merged
Conversation
- 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>
hellozepp
pushed a commit
that referenced
this pull request
Jun 3, 2026
…er, #9 rerun -y Co-Authored-By: cz-cli <noreply@clickzetta.com>
hellozepp
pushed a commit
that referenced
this pull request
Jul 23, 2026
…, one-step upload (#60) * feat(analytics-agent): smoother table add, join notes, answer-builder --sql, one-step knowledge upload Address v1.17.18 hands-on findings: - domain table add: accept a fully-qualified `--table workspace.schema.table` and auto-split it, so lakehouse datasources no longer force trial-and-error --workspace/--schema. Surface the assigned dataset ID via ai_message and flag the soft-failure case where the backend returns success but did not attach the table (#1, #2, #6). - domain join create/update: when the backend normalizes the relation by cardinality (e.g. n:1 -> 1:n), note it in ai_message so the direction change isn't mistaken for an error (#7). - answer-builder create/update/validate: add `--sql` that injects into the content DSL's top-level sql field, so SQL quotes don't collide with the --content JSON escaping. Require at least one of --content/--sql (#9). - knowledge file upload: document (examples + epilogue) that --target-path auto-creates the folder path and --domain-id binds at upload, collapsing the old create -> folder -> move -> bind sequence into one command (#3). Not addressed (backend/doc): targetCounts.knowledge counting (#4), physical vs v_gpt view column names (#5), bulk create APIs (#8). Specs and tests updated alongside the code. Co-Authored-By: cz-cli <noreply@clickzetta.com> * fix(analytics-agent): set a display name when adding a table to a domain A dataset created via `domain table add` had no display name, so it rendered blank in the UI and broke page-level operations. Default displayName to the fully-qualified physical table name (view name with the `v_gpt_` prefix stripped), matching the UI convention, and add `--display-name` to override. Verified live: adding a fresh dataset (createdDataset=true) now persists the display name; when the backend reuses an existing dataset it keeps the prior name, which is the intended backend behavior. Co-Authored-By: cz-cli <noreply@clickzetta.com> * feat(analytics-agent): add `table set-display-name` to rename an existing table `domain table add --display-name` only sets the display name when the dataset is newly created; the backend ignores it for an existing dataset. There was no way to fix a blank/wrong display name on a table already in a domain. Add `table set-display-name <dataset-id> --name`, using the dataset endpoints the UI uses: read-modify-write against `GET /api/v1/dataset/detail` + `POST /api/v1/dataset/update`, which require the full dataset object — fetch it, change only displayName, post it back. Verified live (reversibly) against Shanghai: renamed dataset 82's display name and restored it; the other fields (description, schema, joins) are preserved. Co-Authored-By: cz-cli <noreply@clickzetta.com> * feat(analytics-agent): generalize table rename into `table update` (name + description) The dataset/update endpoint sets both displayName and description in one call, so replace the single-purpose `set-display-name` with `table update <dataset-id> --name --description` (at least one required). Same read-modify-write against dataset detail + update, now patching whichever fields the caller supplies. Verified live (reversibly): updated dataset 82's display name and description together, then restored both; other fields preserved. Co-Authored-By: cz-cli <noreply@clickzetta.com> * fix(analytics-agent): read table update source via dataset/list, not the broken dataset/detail `dataset/detail?datasetId=<id>` returns CZD-20009 "dataset not found" for datasets in some domains (the list endpoint sees them, detail does not — a backend inconsistency the UI hits too). Switch `table update`'s read-modify- write read step to `POST /api/v1/dataset/list {domainIds:[<id>]}`, locating the full object by datasetId. Adds a required --domain-id. Verified live: `table update 97 --domain-id 29` (a domain whose datasets fail via dataset/detail) now renames successfully and restores; full object fields preserved. Co-Authored-By: cz-cli <noreply@clickzetta.com> --------- Co-authored-by: cz-cli <noreply@clickzetta.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR merges the
feat/cz-cli-ts-rewritebranch intomain, 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 --paramsnow auto-detectsparamType=systemfor 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 contentnow returnsparams,input_params,output_paramsfields from the raw API responsetask executeauto-loads savedmanualparams as defaults;--param KEY=VALoverrides; warns to stderr when unresolved${placeholders}remain after merge (SQL tasks will fail; Python/Shell silently keep literal strings)JDBC Task Datasource Binding
task contentparsesadhocConfigsand returnsdatasource_id,session_schema_name,ds_typefieldstask executeauto-resolves JDBC datasource config from savedadhocConfigs; new--datasource <name|id>and--database <db>flags for override or new tasks--datasourceaccepts name or numeric ID;dsTypeis auto-resolved via datasource API (fixesdsType is nullerror on new JDBC tasks)Runs Refill
runs refill --from/--todescribe updated to clarifyYYYY-MM-DD(day boundary) vsYYYY-MM-DDTHH:MM:SS(exact datetime for hourly/minutely task backfills)SKILL / Documentation
runs refillrouting hintcz-cli-inner/SKILL.mdwith newexecute,refill,save-contentbehaviorlocale.tstask_contentmessage updated to describeparamsfield andparamTypesemanticsTesting
All changes verified against live ClickZetta Lakehouse environment:
--datasource aliyun_mysql --database clickzetta_authority(new task, name lookup)task contentreturning datasource fieldsruns refilldatetime format behavior