execute
Use when VQL or a Data Marketplace or Scheduler REST call has to run against a live Denodo 9.5 server — applying a .vql file, running DESC or a test SELECT, checking a connection — or when `scripts/denodo` returned JSON with `ok:false` that needs interpreting. Not for writing VQL — that is /denodo:vql and the domain skills.
- License 许可
- MIT
- 最近更新
- 2026-10-29
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- execute
- description
- Use when VQL or a Data Marketplace or Scheduler REST call has to run against a live Denodo 9.5 server — applying a .vql file, running DESC or a test SELECT, checking a connection — or when `scripts/denodo` returned JSON with `ok:false` that needs interpreting. Not for writing VQL — that is /denodo:vql and the domain skills.
- allowed-tools
- Bash(${CLAUDE_PLUGIN_ROOT}/scripts/denodo *)
02 资源文件 1
- 参考文档references/errors.md17.2 KB
03 SKILL.md 正文
Executing against Denodo
One tool, ${CLAUDE_PLUGIN_ROOT}/scripts/denodo, does every live call. Every invocation
prints exactly one JSON document on stdout; read ok, error.kind and the exit code
before doing anything else. The tool sets up its own Python environment on first run
(uv or a venv under the plugin data directory) — never install drivers by hand.
Violating the letter of the rules below is violating their spirit. They exist because this plugin is installed on production servers.
Commands
Every command takes --env <profile> (or DENODO_ENV). The profile is a name; the
tool reads host, user and password from ~/.denodo/profiles.toml itself.
| Task | Command |
|---|---|
| Apply a file | vql run --env dev model/sales/views.vql — after vql plan of the same file, and again after every change to it (/denodo:vql): a file of new objects and a cache load included |
| Apply inline VQL | vql run --env dev -e "SELECT COUNT(*) FROM bv_orders" — reads only: every CREATE, ALTER and DROP goes through a file (/denodo:vql) |
| Read stdin | vql run --env dev - |
| Another database | add --database <db> (or put CONNECT DATABASE <db>; first in the file) |
| What a file would do, before applying it | vql plan --env dev model/sales/views.vql (also -e, -, --database) — reads the server and the session's ledger, executes nothing; per statement action, object, exists, own, needs_yes, why, conditions, dependents (an existing view's readers), and yes — what the yes is — when anything waits. The rule it applies is /denodo:vql's safety table |
| What this session created | vql ledger --env dev — every object a vql run of this session created on the profile's server, each with its state, re-checked against the server: present, missing (gone without a DROP this session ran), replaced (the name now has another object), dropped; states counts them |
| Schema of an object | vql desc --env dev bv_orders (--type view is the default and covers base views too — there is no DESC TABLE) |
| Server-generated VQL | vql desc --env dev bv_orders --vql — read it, do not apply it: it opens with DROP … CASCADE and rebuilds the object together with what it depends on in its own database — dependencies in another database are left out, except under a metric view of another database: the metric view is left out and its source views come back unqualified, as if they were in yours — never with what depends on it. A name can be qualified — vql desc --env dev "other_db.bv_orders" --vql reads another database without switching yours — verified: 9.5.1 (live, 2026-09-12). The object alone, without the data source its dependencies bring (and that source's encrypted password): vql run --env dev -e "DESC VQL VIEW bv_orders ('includeDependencies' = 'no', 'dropElements' = 'no')" — verified: 9.5.1 (live, 2026-10-02) |
| Other types | --type database, --type "datasource df", --type "wrapper df", --type tag, --type association, --type "interface view", --type role, --type global_security_policy (with --vql, as above); folders take a quoted path: vql desc --env dev "'/sales'" --type folder --vql |
| Marketplace call | api get --env dev /public/api/tags |
| … planned, not sent | add --plan to any api call: needs_yes, why, conditions, sent: false; for element-management/{DATABASES,VIEWS}/synchronize it reads both …/changes and marks every entry against the session's ledger (radius.own, radius.not_own) |
| … with a body | api post --env dev /public/api/tags --json '{"name":"pii","description":"…","descriptionType":"TEXT"}' |
| … with the body in a file | api put --env dev /public/api/views --json-file body.json — for HTML, quotes, or a body you want to keep |
| … query params / multipart | --param k=v (repeatable), --part field=@file / field=json:{…} |
| Scheduler call | api --server scheduler get --env dev /public/api/projects — the same command against the Scheduler administration tool: the profile's account, and its Scheduler server as the uri parameter, are added. The profile may name both (scheduler_url, scheduler_uri); by default the web container of marketplace_url (or http://<host>:9090) and //<host>:8000. A path with a .. segment is refused on either server. What to call is /denodo:scheduler |
| Encrypt a source password | secret encrypt --env dev — the password is typed into a hidden prompt (in a terminal) or piped in on stdin, never passed as an argument; the answer carries encrypted and nothing else; the human runs it in their own terminal, and the procedure is /denodo:datasources, Passwords |
Run .denodotest tests |
testing run --env dev --database <db> --tool <dir> --java-home <Java 17+> <tests folder>, or testing config for a human who runs the tool — /denodo:testing, Running it |
| Which profiles exist | env list (never shows passwords) |
| Is the server reachable, and who am I on it | env check --env dev (VDP, the marketplace if configured, and the Scheduler where the profile names a web container — scheduler.server_version, mode, roles; a missing Scheduler does not fail the check); vdp.admin — the profile's user is an administrator, so security policies do not apply to its own queries; vdp.impersonation — it may run a query as another user (/denodo:security); vdp.server_version — another release than 9.5: tell the human the templates are written for 9.5 before you apply one (null: unknown); features — what this installation has: enterprise_plus (tags, policies, the AI functions), cache.on, llm.on, embedding.on, summary_rewrite, data_movement — a skill that needs one says where; false is the administrator's, not a statement to rewrite; null is unknown (a setting the profile's user may not read) |
| Verify the skills' own templates | verify --env dev runs verification/chain.toml and removes what it made: its own test database, and the server-wide verify_ tags, user, role and global security policy — its security checks impersonate that user, so they need vdp.impersonation: true. The --with-… tails reach further: --with-marketplace synchronises the shared marketplace catalog (skipped while anything but the run's own database is pending there), --with-writes creates a table in a source database and writes its rows, --with-scheduler creates and runs jobs on the shared Scheduler, --with-ai sends about 50 paid LLM requests. A production profile needs --allow-destructive. Everything else: verify --help |
Prefix every command with ${CLAUDE_PLUGIN_ROOT}/scripts/denodo. Keep results
readable: --max-rows N (default 100) caps every result set; row_count is the
true count and truncated says whether rows were cut. It caps the printout, not the
work: the tool reads every row the query returns, so the server computes all of them —
only a LIMIT in the query bounds that, which matters when a column calls the server's LLM
(/denodo:ai).
-e repeats. Every -e runs, in order — in vql plan too — and one -e may hold several
statements separated by ;.
Reading the result
Common envelope: ok, command, env {name, production, transport, database},
and on failure error {kind, message}. Look at env.production on every
response — it tells you where you are connected. env.database is the profile's database
or --database; a CONNECT DATABASE inside the file moves the session but not this field,
so GET_ELEMENTS() is where to see what landed where.
error.kind |
Exit | Cause | Action |
|---|---|---|---|
| — | 0 |
success | verify the object (DESC / SELECT), report |
| (none) | 1 |
the server rejected a statement or call | references/errors.md, fix the VQL/call, re-apply |
connection |
1 |
host/port unreachable, wrong password, marketplace down | env check --env <name>; report the message; do not retry blindly |
usage |
2 |
wrong arguments (no --env, no input, both file and -e) |
fix the command; --help on the subcommand |
config |
2 |
profile missing, incomplete or unreadable; no marketplace_url for api |
No profile below |
refused |
2 |
destructive operation on a production profile | Destructive operations below |
environment |
3 |
driver stack could not be set up | show the human error.hint verbatim and stop; do not pip install yourself |
vql run returns statements[] (one entry per statement: index, statement
head, destructive, ok, error, columns, rows, row_count, affected), failed_at,
executed, total. affected is the only trace of a write: an INSERT, UPDATE or
DELETE returns no rows, and affected is the number of rows the source reports it changed —
0 when nothing matched. It is null for a read, a CREATE or ALTER, a failed statement, and
a write whose RETURNING returned rows — those rows are its trace (/denodo:dml). The file is split into statements client-side and executed one by
one in one session. On the first failure execution stops: statements before
failed_at are applied, statements after it are not, and nothing is rolled back.
The server message you match against the error reference is
statements[failed_at].error.message.
api returns server (marketplace or scheduler) and status separately from body; body is often null (200,
403, 404, 409 all come with an empty body). ok is true only for 2xx. Some
marketplace calls report failure inside a 200: POST /tags/{id}/views answers
with the list of ids it could not assign — success is an empty list.
vql run keeps the session's ledger. The session is this conversation, subagents
included: CLAUDE_CODE_SESSION_ID, or DENODO_SESSION where a harness sets it. Before the
first statement the tool reads whether the objects the file creates exist; after the last it
records those that did not, with the server's id, and follows the drops and renames of objects
it recorded — the ledger part of the answer says what. A CREATE OR REPLACE over an object
that existed records nothing: replacing an object does not make it yours. The file lives beside
the profiles, never in the project.
vql plan answers ok with exit 0 whenever it could read the server, whatever it found;
needs_yes at the top lists the statements that wait for the human, not_recognised those the
table decides, actions counts the statements by what they do, and duplicates lists the
statements that declare one object twice, differently — the later replaces the earlier (without
OR REPLACE, fails), and the entry of each later one names the first in duplicate_of. session: null (no session id) means only an object an earlier statement of the
same input creates counts as yours. project.base is the commit the plan read declarations
from — the last one before this session started; project: null means the input is not in a
git work tree, so no file of it vouches for an object that already exists, however old the
file — re-declaring such an object waits for the yes, and the summary says the project is not
versioned. As for vql run, env.database is the connection's database; where each statement
lands is its object.database, which follows the file's CONNECT DATABASE.
vql desc returns the DESC rows as columns/rows at the top level of the
envelope — statements[] belongs to vql run alone, and a parser that expects it
here fails on a call that succeeded. DESC VQL puts the whole script in one cell.
A decimal value arrives as a JSON string ("12.34"), while int, long and
double arrive as JSON numbers. That is the transport, not the column: it says
nothing about the type in Denodo. To check a type, read it — vql desc --env dev <view> — or do arithmetic on the server (SELECT SUM(price * 2) …); a text column
would fail there.
No profile
config with "profiles file not found" or "profile 'x' not found" means the human
has to create one. Ask them to run in their own terminal input:
! ${CLAUDE_PLUGIN_ROOT}/scripts/denodo env init
It is interactive and hides the password. Then re-run your command.
- Do not ask for host, user or password in the chat, even if offered.
- Do not write or edit
profiles.tomlyourself. - Do not pass a password through an argument, an environment variable,
-e, or a heredoc — anything that goes through Bash is kept in the session transcript. - If the human already pasted a password into the chat, say so and suggest rotating it.
Destructive operations
A statement is destructive when it destroys or overwrites something that exists, or changes
state outside your own project: server settings, data in sources, objects of other databases,
global objects. CREATE of a new object is not. The tool cannot tell whose object a DROP
or ALTER hits, so it flags every one. The flag is not the rule: an ALTER of an object you
created in this session, which nothing else reads yet, is yours to apply, and so is a
marketplace catalog synchronize whose radius, read right before it, holds only what you
created in this session (/denodo:vql) — vql plan and api … --plan say which, from the
session's ledger; on a production profile every flagged statement and call still needs the
human's yes and the flag.
Not refused is not allowed. The tool refuses only on a profile marked production; on
every other profile it runs whatever it is given. Whether a flagged statement may run is
/denodo:vql's safety table, on every profile — the few that are yours are named there, and a
DROP is never one of them, whatever it hits. The yes answers the statements after you have
shown them; the request that asked for them is not it, however plainly it names them — unless
that table makes the request itself the yes, as it does for the tag of a view named to be made
visible to an agent. When the human cannot answer — away, a deadline — the statements go into a
file and into your message, not into vql run. So when your own permission settings refuse a
vql run after the yes: stop there — the files, what ran and what did not are your message.
The tool flags DROP, ALTER, DELETE, TRUNCATE and writes; server settings; the
predefined procedures that change state; cache loads and invalidations; users, roles and
global security policies; tables created, replaced or refreshed in a database; a web service
deployed, undeployed or exported; and the HTTP
calls that delete or replace a set, on the marketplace and the Scheduler. The full list, with
the kind of each, is references/errors.md, What the tool flags. Every result carries a
destructive field: the kind (drop, alter, delete, write, setting, procedure,
cache, security, table, publish, replace, job) when it is one of these, and null — not
false — when it is not. Session settings come back null and pass on any profile: SET QUERYTIMEOUT TO … (property name unquoted) and ALTER SESSION SET 'querytimeout' = … last
until the connection closes; a quoted property after a bare SET is the server. The procedure
check goes by name and catches only the names /denodo:procedures lists: a VQL procedure of
your own that runs DROP through EXECUTE inside its body comes back null, and reading what
a procedure does before calling it stays your job. On a profile with production: true the
tool refuses them with error.kind = "refused" and executes nothing.
--allow-destructive is set only after the human has read the list of destructive
statements from error.destructive and confirmed, in this conversation, after the
refusal. The rule that requires the confirmation is the core skill (/denodo:vql);
this skill enforces its half: the flag is never yours to add.
When refused:
- Show the human
env.name, and eacherror.destructive[].statement. - Ask: "Apply these on production profile
<name>?" - Only after an explicit yes, re-run the same command with
--allow-destructive.
| Rationalization | Reality |
|---|---|
| "The user named this file and this profile — that is the confirmation" | Naming a file is not reading a DROP. The confirmation comes after the refusal, on the listed statements. |
| "The user said they can't answer right now / just make it work" | Then the answer is "waiting for your confirmation", not the flag. A missed deadline is cheaper than a dropped object. |
"It's DROP … IF EXISTS on the object the next line recreates" |
IF EXISTS silences the error, not the data loss; and the recreate may fail after the drop succeeded. |
| "The object doesn't even exist, the drop is a no-op" | Your read of the catalog is a snapshot. The refusal is on the statement, not on its effect. |
| "It's only a test database on the production server" | The profile says production. Database names are not the rule. |
| "I'll disclose it afterwards" | Disclosure after the fact is not consent. |
| "The plan says it waits for the human's yes — their request is that yes" | The request names the outcome. The yes answers the statements you showed, in this conversation; with nobody to answer, the file and the message are the result. |
| "The profile is not production and nothing depends on it" | Not production only means the tool will not stop you. A DROP waits for the yes on every profile, and an object nothing reads is still someone's. |
Red flags — stop and ask the human: you are typing --allow-destructive; the
previous result had error.kind: "refused"; env.production is true and the input
changes anything.
Error in the middle of a file
Do not reach for --continue-on-error to get past a failure. Read
statements[failed_at].error.message, fix the statement in the file, vql plan it again and
re-apply the file whole (/denodo:vql). Statements before the failed one stay applied: a
CREATE OR REPLACE of a view re-applies safely, but a write, a cache or AI load, or OR REPLACE over a table that holds rows runs again (/denodo:dml, /denodo:materialize).
--continue-on-error is for two cases: the human's explicit request on a
file whose statements are independent, and a file of reads that checks many objects, one
statement per object — there each entry of statements[] is one object's answer, and a
failed read is that object's failure, not the end of the check (/denodo:vql, Many objects
at once).
Verify before reporting
Success of CREATE is not success of the object. After applying:
vql desc --env dev <name>for the schema, orSELECT * FROM <name>with--max-rows 5for a base or derived view;- for a marketplace object,
GETit back by name (all marketplace operations use numeric ids that only exist after creation).
A DF wrapper listing only part of the file's columns creates fine and returns zero rows — the SELECT is what catches it.
Not this skill
Writing the VQL or choosing where an object lives: /denodo:vql and the domain skills it routes to.
04 同仓库更多 Skills
vql
Use when doing anything with Denodo — creating or changing a database, folder, tag, data source, wrapper, base, derived, interface or metric view, association, cache, role or security policy, remote table or summary, a Data Marketplace object, a regression test or a Scheduler job; writing or fixing VQL, or an expression in a SELECT — text, dates, casts; deciding where an object lives and what to name it; "where do I start", "build a mart", "connect a source", "vibe-code on Denodo". Start here when the request is ambiguous or names no single object.
views
Use when building on top of views that already exist in Denodo 9.5 — a derived view (a join, an aggregate, a mart, a filtered or parameterised view, a UNION ALL of views of one entity, FLATTEN of a JSON array into rows, NEST of rows into an array), an interface view, or an association between two views. Also before changing a view others depend on — "what uses this view", "can I drop this column", "where does this field come from" — for whether a mart over a database runs there or pulls every row into Denodo, for "combine these sources into one view", "expose this as a data product", and for a view created without an error that fails on SELECT or turns up INVALID. Not for sources and base views — /denodo:datasources; databases, folders, VDP tags — /denodo:catalog; a view's cache — /denodo:cache; a copy stored as a table — /denodo:materialize; a metric view — /denodo:metrics.
testing
Use when a Denodo 9.5 project needs regression tests, or its tests need running or fixing — .denodotest files that the Denodo Testing Tool runs in CI (%EXECUTION, %RESULTS[data|query|csv|exception], configuration.properties, denodo-test.sh) — "add tests for this mart", "a safety net before I rewrite these views", "make sure the dashboards see no difference", "what should CI check on our data products", "prove the mart is right", "CI is red on the Denodo tests", a test that fails on row order, on a column it did not ask for or on a value padded with spaces. Not for checking a new view once, right after creating it — /denodo:views.
semantics
Use when the views of an existing Denodo 9.5 database have to be understood by people and by AI consumers — the Denodo MCP Server, Assisted Query in the Data Marketplace, the AI SDK. Auditing a database for views and fields without descriptions, primary keys that are missing or not unique, missing associations and the VDP tag the MCP Server shows views by; writing view, field, association and tag descriptions from the data, and primary keys. Also for "describe / document these views", "prepare this database for AI, MCP or Assisted Query", "why does the agent not see this view through MCP", a description that says the wrong thing. Not for building or changing what a view computes — /denodo:views; not for marketplace-only metadata (logical names, property groups, marketplace tags) — /denodo:marketplace.
security
Use when deciding who may read what in Denodo 9.5 — masking or hiding columns (PII, contact details, salaries, bank accounts) from some users or roles, letting a role see only some rows (a country, a tenant) or each person only their own, taking someone's access away (ALTER USER … REVOKE), denying a view to a group, a global security policy (CREATE GLOBAL_SECURITY_POLICY) and the VDP tags it reads, giving a user a role or giving a role access to a database or views (CREATE ROLE … GRANT EXECUTE, ALTER USER … GRANT ROLE), checking what a given user really gets back, or a user who sees data a restriction should hide ("he still gets every row", "the masking stopped working"). Not for a tag as a label without a policy (/denodo:catalog) or for descriptions and the MCP visibility tag (/denodo:semantics).
scheduler
Use when something in Denodo 9.5 has to happen on a schedule, or a scheduled run misbehaves — refreshing the cache of a view every night or every hour, running REFRESH of a remote table or a procedure at a set time, exporting a view to a CSV file every week or month, running a Denodo Scheduler job now, stopping, pausing, enabling or deleting it, reading what last night's run did or why it failed, "the cache doubles after every refresh", "the job fires at the wrong hour", "the export file is missing or has no header". Denodo Scheduler projects, jobs, cron triggers and reports, through the REST API of the Scheduler administration tool. Not for switching a cache on or loading it once (/denodo:cache), not for creating the remote table or summary itself (/denodo:materialize).