materialize
Use when the result of a Denodo 9.5 query has to be stored as a table, or a slow federated query should run from data placed next to it — a remote table other tools read ("store this view as a table in our warehouse", "a nightly table for the data science team"), a frozen snapshot ("a frozen copy for the auditors"), a summary that answers aggregate queries without them changing ("the dashboard is slow and we can't change its SQL", "precompute the aggregates"), a data movement ("the join between the file and the database is slow"), a materialized table. Also when "The REFRESH command is only valid for Summaries and Remote Tables", a refreshed table came back empty, a summary answers other numbers than the views, DROP_REMOTE_TABLE fails, or a materialized table refuses an UPDATE. Not for the full cache of a view (/denodo:cache), not for changing rows of an existing table (/denodo:dml).
- License 许可
- MIT
- 最近更新
- 2026-10-29
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- materialize
- description
- Use when the result of a Denodo 9.5 query has to be stored as a table, or a slow federated query should run from data placed next to it — a remote table other tools read ("store this view as a table in our warehouse", "a nightly table for the data science team"), a frozen snapshot ("a frozen copy for the auditors"), a summary that answers aggregate queries without them changing ("the dashboard is slow and we can't change its SQL", "precompute the aggregates"), a data movement ("the join between the file and the database is slow"), a materialized table. Also when "The REFRESH command is only valid for Summaries and Remote Tables", a refreshed table came back empty, a summary answers other numbers than the views, DROP_REMOTE_TABLE fails, or a materialized table refuses an UPDATE. Not for the full cache of a view (/denodo:cache), not for changing rows of an existing table (/denodo:dml).
02 资源文件 3
- 参考文档references/incremental.md8.2 KB
- 参考文档references/remote-tables.md11.6 KB
- 参考文档references/summaries.md9.6 KB
03 SKILL.md 正文
Results stored as tables, and data placed for a query
Four ways to keep the result of a query somewhere, each with its own owner and its own way of going wrong:
- Remote table — a real table in a database of a JDBC data source, created and loaded from
a query, with a base view over it;
REFRESHempties it and loads it again. Other tools read it directly. - Summary — the same kind of table, plus a promise to the optimizer: any query it can answer from the summary is rewritten to read it, silently, for everyone.
- Data movement — the small side of a join copied, per query, into a temporary table in the data source of the big side, so the join runs there; nothing stays.
- Materialized table — a table in the cache database that Denodo owns, filled by
INSERT; it has no source and no lineage.
All four write to a database outside Denodo's catalog — a table appears, is emptied or is replaced in a system other people and programs use. That is what the rule below is about.
This skill covers creating, loading, refreshing and dropping them, and choosing between them.
The full cache of a view is /denodo:cache; inserting, updating or deleting rows of a table
that exists is /denodo:dml; the views they are built from are /denodo:views; a JDBC data
source is /denodo:datasources. Nothing here schedules anything: a nightly REFRESH is a
Denodo Scheduler job (/denodo:scheduler) or the team's own scheduler running a file from this
skill.
Most of what goes wrong here gives no error: read "Silent failures" at the end first.
Which one
First find out why the query is slow, or who reads the table, before choosing:
/denodo:views, references/delegation.md, shows whether rows travel between data sources.
| The human wants | Use | Not |
|---|---|---|
| the result as a table that another tool reads directly — a model's training job, an ETL, a BI extract — refreshed or frozen | remote table | a cache: its table is Denodo's internal copy, renamed and swapped at will |
| a view's own queries answered from a copy, under the same view name | /denodo:cache |
|
| aggregate queries over a model faster without changing them (BI tools generate the SQL), when figures as of the last load are acceptable | summary — the views stay as they are, and any query the summary can answer is sped up | a full cache of each view queried: a 0-row window until its first load, and a change to views others read |
| a federated join faster with current data — a small side (a file, another system) joined to a big table in a database | data movement of the small side into the big side's data source | a summary or a cache, which answer as of their load |
| rows that exist nowhere else — targets, a mapping someone typed — kept in Denodo, with no database of your own to write to | materialized table | |
| rows added to, or corrected in, a table that exists | /denodo:dml |
A temporary table (CREATE TEMPORARY TABLE) lives for one session and is invisible to anyone
else — not for anything another person reads.
The rule: new is yours, existing is the human's
A table that did not exist before this session, created by a statement that cannot overwrite anything, where the human said it should go, is yours to create. Anything that replaces, empties or drops a table that existed before this session, or changes the answers of queries you did not write, waits for the human's yes.
| You do it yourself | Only after the human's yes |
|---|---|
the reads: is the name free, how many rows, what reads the target, the query plan — and vql plan, whose own says which tables you created in this session (/denodo:vql) |
replace_remote_table_if_exist = true, CREATE OR REPLACE REMOTE TABLE — whatever the name holds |
a new remote table: CREATE_REMOTE_TABLE with replace_remote_table_if_exist = false, in the data source and schema the human named, under a name the reads show free, after stating the row count |
a remote table in a data source or schema the human did not name |
REFRESH of a remote table you created in this session, and replace_remote_table_if_exist = true over one — the empty table a failed load left included; an incremental load into one (references/incremental.md) |
REFRESH of any table older than this session — it is emptied first; an incremental load into one — every run writes into it |
a summary created unloaded (DATA_LOAD_IMMEDIATE = FALSE) and its plan checked: unloaded, it writes nothing and the optimizer never uses it — the data source and schema it names become part of the yes for its load. When the human named none, propose the data source the big table already lives in and its data-load schema, and say it is a proposal |
every load of a summary — the first REFRESH, a CREATE that loads, every reload: from that moment it answers queries you did not write |
| data movement in a view you created in this session | data movement added to a view that existed before this session: every query of it then creates a table in the target database |
| a new materialized table in your project's database, and re-declaring or inserting into one you created in this session | CREATE OR REPLACE MATERIALIZED TABLE over one older than this session — it empties it |
| writing every file | a new load query for a remote table older than this session (the base view re-declared, "Refresh it") — it decides what the next refresh writes |
| — | DROP_REMOTE_TABLE, DROP VIEW of any of these — your own included |
The tool flags all of these table or procedure, the new table included: it cannot see
whose a table is, and the flag is not the rule (/denodo:execute).
Report what you did and ask for the rest in this shape:
Created dwh.reporting.household_income (ds_dwh) for the pricing team's models:
7,200 rows (inserted_rows), the same as the query; base view bv_dwh_household_income.
The name was free (GET_JDBC_DATASOURCE_TABLES); the file refuses to overwrite.
Columns land as: household_sk bigint, buy_potential varchar(4000), …
tables/household_income_refresh.vql — REFRESH: empties the table, then loads it.
If the load fails, the table stays EMPTY until the next good run.
Nothing schedules it: it belongs in a Scheduler job after the warehouse load, one that alerts.
Waiting for your yes: none.
When a step needs the yes and you cannot ask — the human is away, the deadline is close — the answer is the files and this message, not the step. Then the message opens with what is not there and what that costs by the deadline, then what you found, then each file and whether it waits for the yes. Name the databases whose readers you could not check.
| Rationalization | Reality |
|---|---|
| "Somebody started it and never finished — I'll just finish it" | The table exists, so replacing it is the yes, however abandoned it looks. A table that looks forgotten is often one another team reads. |
| "They said: do whatever you need on the server" | That is the goal. The yes is to the statements, after the human has seen them. |
| "I'll use another name, then it's new" | The readers read the name they were given. A different name is the human's choice, not a way around the question. (A new period of a snapshot is a new table with its own name — that is the design, not this.) |
"CREATE OR REPLACE keeps the file re-appliable" |
For a table in a database it drops whatever has that name; for a snapshot it refills the frozen copy from today's data. The procedure with replace = false fails instead of overwriting — that is the point. |
| "A summary only makes queries faster; the answers stay the same" | Only until a row or a view under it changes. Then every rewritten query answers the old figures. |
| "If the refresh fails, yesterday's rows stay" | REFRESH empties the table first. A failed load leaves it empty. |
"I'll refresh with a DELETE and an INSERT … SELECT" |
Two writes, the same empty window, and a base view that no longer says where its data comes from. REFRESH is the statement. |
Red flags — stop: replace_remote_table_if_exist = true or OR REPLACE in front of
REMOTE TABLE, SUMMARY VIEW or MATERIALIZED TABLE, on a name you did not create in this
session; a table about to be created or loaded in a schema the human did not name;
a REFRESH of a table you did not create; a summary about to be loaded; SELECT * in a load
query; env.production is true.
Templates
The example database is sales_analytics; ds_dwh is a JDBC data source over the team's
reporting warehouse (/denodo:datasources), with tables going to catalog dwh, schema
reporting. On a database without catalogs the documentation says null for the catalog, and
its own example passes '' — unverified: 9.5 documentation only; the same for a database
without schemas. The blocks build on each other, in this order.
Before you create: is the name free, and what will land
-- verified: 9.5.1 (live, 2026-10-06)
CONNECT DATABASE sales_analytics;
SELECT table_name
FROM GET_JDBC_DATASOURCE_TABLES()
WHERE input_database_name = 'sales_analytics' AND input_datasource_name = 'ds_dwh'
AND input_catalog_name = 'dwh' AND input_schema_name = 'reporting'
AND UPPER(table_name) = UPPER('household_income');
SELECT COUNT(*) AS will_load
FROM iv_household_income;
- No row means the name is free. A row means a table of that name exists — someone's, whatever
its name suggests: stop and ask (the rule above).
UPPERon both sides because Denodo compares the name exactly and SQL Server under its default case-insensitive collation does not:HOUSEHOLD_INCOMEis the same table there. The answer's columns arecatalog_name,schema_name,table_name,type. - Run these reads before the create, as reads: inside a file a
SELECTthat finds a row stops nothing — what stops the create isreplace_remote_table_if_exist = false. - Who reads it: the base views over it.
SELECT database_name, name FROM GET_VIEWS() WHERE view_type = 0, then for each candidateSELECT source_catalog_name, source_schema_name, source_table_name FROM GET_SOURCE_TABLE() WHERE input_database_name = '…' AND input_view_name = '…'; a view in another database is another team's. A database you may not read is a reader you could not check — say so in the message. A table nobody made withCREATE_REMOTE_TABLE(noDATA_LOAD_QUERYin its base view'sDESC VQL) cannot be refreshed at all: "finishing" it means replacing it. will_loadis the numberinserted_rowsmust equal — and the number you tell the human before a big load: every row passes through Denodo unless the query runs entirely in the target data source.- The target the human named is the data source and the schema. A data source's default target
(
DATA_LOAD_CONFIGURATION … TARGET_SCHEMAin itsDESC VQL) is not a name the human gave.
A remote table
-- verified: 9.5.1 (live, 2026-10-06)
CONNECT DATABASE sales_analytics;
SELECT phase, status, error, inserted_rows, "stored procedure result"
FROM CREATE_REMOTE_TABLE()
WHERE remote_table_name = 'household_income'
AND replace_remote_table_if_exist = false
AND query = 'SELECT household_sk, income_band_sk, buy_potential, dependents, vehicles, income_lower_bound, income_upper_bound FROM iv_household_income'
AND datasource_database_name = 'sales_analytics'
AND datasource_name = 'ds_dwh'
AND datasource_catalog = 'dwh'
AND datasource_schema = 'reporting'
AND base_view_database_name = 'sales_analytics'
AND base_view_name = 'bv_dwh_household_income'
AND base_view_folder = '/01 - connectivity'
AND replace_base_view_if_exist = false;
- Three rows,
status = 'OK'in each,inserted_rowson phase 2. A name that exists makes the call fail with nothing but[STORED PROCEDURE] [ERROR]and touches nothing — that bare error is the reason the name check comes first. - Name every column in
query. The load query is stored as written: aSELECT *loads whatever the view has at the nextREFRESH, and a column added to the view then fails the load — after the table was emptied. Quotes inside it are doubled:'… WHERE status = ''open'''. - The base view gets the procedure's name for its wrapper too, and no primary key:
ALTER TABLE bv_dwh_household_income DESCRIPTION = '…'andALTER TABLE … ADD PRIMARY KEY ( 'household_sk' )— several columns:( 'a', 'b' )— keep itsDATA_LOAD_QUERY: your own new object, no yes needed. - A text column that may hold characters beyond Latin (names, addresses, free text): on SQL
Server (measured) a text without a source size lands as
varchar, which turns them into?without an error, andCAST(<col> AS nvarchar(<n>))inquerykeeps them. Other databases map the types their own way: read what landed ("Verify") before a reader relies on it. - A failure after phase 1 (a value the database refuses — on SQL Server, a text over 4000
characters into the
varchar(4000)such a text gets) leaves the table created and empty, without a base view. Fix the cause, then the same call withreplace_remote_table_if_exist = true: that table is the one you just made — check with the name query that nothing else had the name before you. - A frozen snapshot is this call, once: the period in the table name
(
household_income_2025q3), the filter inquery, and a file that says "do not run again, never REFRESH" at the top. A second period is a second table. The procedure still beats the command here — the count, a base view to compare the copy with, a clean drop — but its base view is aREFRESHhandle and writable: put "frozen, never REFRESH" in itsDESCRIPTION, and tell the human that only the database's owner can make the table read-only (aDENYon SQL Server, aREVOKEof the write privileges elsewhere).
Refresh it
-- verified: 9.5.1 (live, 2026-10-06)
CONNECT DATABASE sales_analytics;
SELECT COUNT(*) AS will_load
FROM iv_household_income;
REFRESH bv_dwh_household_income;
SELECT COUNT(*) AS loaded
FROM bv_dwh_household_income;
REFRESHanswers nothing — no rows, no count.loadedmust equalwill_load;0after a failed run means the table is empty for everyone right now.- The first
SELECTproves the sources answer before the table is emptied — it narrows the window, it does not close it. Readers who cannot live with an empty table between a failed load and the next good one need a full cache with a status column (/denodo:cache) instead. - Before a refresh of a table you did not just create, read its load query:
DESC VQL VIEW bv_dwh_household_income ('includeDependencies' = 'no')ends withDATA_LOAD_QUERY = '…'. Run that query'sSELECTand compare its columns with the table's (DESC VIEWof both): any difference, or aSELECT *over a view that has changed, and the refresh empties the table and fails. Comparing the query's rows with the table's also tells whether a refresh would change anything at all. - A wrong load query is changed without touching the table: take the base view's
DESC VQLfromCREATE TABLEon, make itCREATE OR REPLACE TABLEwith the newDATA_LOAD_QUERY, apply it; the nextREFRESHloads by the new query.ALTER TABLE … DATA_LOAD_QUERYis a syntax error. The new query must return the table's columns; on a table older than this session both steps wait for the yes. - Who runs it: a Denodo Scheduler job (
/denodo:scheduler) or the human's own scheduler, after the sources are loaded, with an alert on failure — the file and the time go into the message. A job that refreshes a table older than this session is thatREFRESH, every night: the same yes. A reload grown too slow becomes an incremental load:references/incremental.md.
A summary — created unloaded, proved by the plan, then loaded
-- verified: 9.5.1 (live, 2026-10-06)
CONNECT DATABASE sales_analytics;
CREATE OR REPLACE SUMMARY VIEW s_household_band
INTO ds_dwh
CATALOG = 'dwh'
SCHEMA = 'reporting'
RELATIONNAME = 's_household_band'
IF RELATION EXISTS ERROR
DATA_LOAD_IMMEDIATE = FALSE
FOLDER = '/03 - business entities'
DESCRIPTION = 'Households per income band and buy potential, precomputed for aggregate queries over iv_household_income. As of its last REFRESH.'
AS SELECT income_band_sk, buy_potential,
COUNT(*) AS households, SUM(dependents) AS dependents, SUM(vehicles) AS vehicles
FROM iv_household_income
GROUP BY income_band_sk, buy_potential;
SELECT execution_plan
FROM GET_QUERY_EXECUTION_PLAN()
WHERE input_query = 'SELECT income_band_sk, COUNT(*) AS households FROM iv_household_income GROUP BY income_band_sk CONTEXT (''consider_all_summaries'' = ''on'')';
- Unloaded, it changes no answer: no table yet, and the optimizer ignores it until its first
load. That is what lets you prove it before asking. The plan of each query the human cares
about must show
acceleratedWithSummaries = [sales_analytics.s_household_band]andoptimizationsApplied = [Summary Acceleration]; plan the dashboards' own queries, not one you wrote to match.consider_all_summariesmakes the planner consider the unloaded summary; never run a query with it. - What it can answer: sums and counts at its grain or coarser, filters on its columns,
COUNT(*)from its count — so keepCOUNT(*)in it. ACOUNT(DISTINCT …)only if the summary computes it, and only for a query grouped by exactly the summary's columns — a distinct count does not add up, and the optimizer does not try. NotAVG, even with a sum and a count in it; not a column or a filter it does not hold. Build it over the views the queries name; seereferences/summaries.md. OR REPLACEwithIF RELATION EXISTS ERRORandDATA_LOAD_IMMEDIATE = FALSEis re-appliable while the summary is unloaded and refuses once a table of that name exists — anyone's, the summary's own after its load included. A change to a loaded summary is… IF RELATION EXISTS REPLACEand a load, both for the human's yes.- Summaries are created by a server administrator only; they are not available in the Denodo Professional or Standard bundles (documentation).
Load it — on the human's yes, and check it against the views themselves:
-- verified: 9.5.1 (live, 2026-10-06)
CONNECT DATABASE sales_analytics;
REFRESH s_household_band;
SELECT income_band_sk, COUNT(*) AS households
FROM iv_household_income
GROUP BY income_band_sk
ORDER BY income_band_sk;
SELECT income_band_sk, COUNT(*) AS households
FROM iv_household_income
GROUP BY income_band_sk
ORDER BY income_band_sk
CONTEXT ('summary_rewrite' = 'off');
- The two answers must be equal, row for row. The first comes from the summary, the second from
the sources. Run the same pair after every change upstream: a difference is a stale summary, and
every rewritten query in the meantime returned it. Sums from the summary may come back with more
decimals than through the views (
numeric(38,20)on SQL Server): compare values, not text. - A failed
REFRESHleaves the summary empty and in use: every query sent to it answers 0 rows, a totalNULLand0, while the sources are fine. The job that loads it checks the pair above after each run and, when the load failed, runsALTER SUMMARY VIEW s_household_band QUERY REWRITE ENABLED = FALSEat once — slow and right instead of fast and empty — and alerts. Put that file next to the load file. - Its filters run in the summary's database. On a case-insensitive database a filter that
matched nothing through the views matches through the summary (
'DELHI'foundDelhi). Check that no two values the queries filter on differ only by case or trailing spaces. - A summary needs a scheduled
REFRESHlike a remote table, and the dashboards show figures as of that load: say both in the message. Switching rewrite off for a stale summary is anALTER, for the yes.
Data movement for a federated join
-- verified: 9.5.1 (live, 2026-10-06)
CONNECT DATABASE sales_analytics;
CREATE OR REPLACE VIEW household_band_detail
FOLDER = '/02 - integration'
DESCRIPTION = 'Households from the warehouse with the bounds of their income band from the band file. Each query copies the band file into the warehouse and joins there.'
AS SELECT h.household_sk, h.buy_potential, h.dependents,
ib.ib_lower_bound AS band_lower_bound, ib.ib_upper_bound AS band_upper_bound
FROM bv_dwh_household_income AS h
INNER JOIN bv_income_band AS ib ON h.income_band_sk = ib.ib_income_band_sk
CONTEXT ( DATAMOVEMENTPLAN = bv_income_band : JDBC ds_dwh );
SELECT execution_plan
FROM GET_QUERY_EXECUTION_PLAN()
WHERE input_query = 'SELECT buy_potential, COUNT(*) AS households FROM household_band_detail GROUP BY buy_potential';
- The small side moves to the big side's data source:
bv_income_band(a file) intods_dwh, wherebv_dwh_household_incomelives. Moved anywhere else — the cache data source, a third database — the plan saysData Movementand the join still runs in Denodo. - The plan must show
optimizationsApplied = [Data Movement …]and aJDBC ROUTEonds_dwhwhoseSQLSentencejoins at_bv_income_band_<id>table: that is the copy. It is dropped when the query ends. - Every query of the view creates and drops that table, in the schema the data source's
data-load configuration names (
DATA_LOAD_CONFIGURATION … TARGET_SCHEMAin itsDESC VQL), so its account needsCREATE TABLEthere, and every query pays for moving the small side: a side of millions of rows is not small. Answers stay current — nothing is stored between queries. - The plan goes into the view's own
CONTEXT, whichCREATE OR REPLACE VIEWkeeps; a query can set or switch one off for itself:CONTEXT ( DATAMOVEMENTPLAN = bv_income_band : OFF ).
A materialized table
-- verified: 9.5.1 (live, 2026-10-06)
CONNECT DATABASE sales_analytics;
CREATE MATERIALIZED TABLE income_band_target (
income_band_sk : int,
target_households : int,
set_by : text
)
FOLDER = '/02 - integration'
CONSTRAINT 'pk_income_band_target' PRIMARY KEY ( 'income_band_sk' );
INSERT INTO income_band_target (income_band_sk, target_households, set_by)
VALUES (1, 400, 'planning 2025'), (2, 380, 'planning 2025'), (3, 360, 'planning 2025');
SELECT COUNT(*) AS loaded
FROM income_band_target;
- Its rows exist nowhere else. Never
CREATE OR REPLACEit: over a filled table that empties it, silently. The file runs once; later rows areINSERTs in files of their own. - Only
INSERT:Update on materialized tables is not allowed,Delete on … is not allowed. A correction is a new table, orDROP VIEWand a new one — the human's yes. - The primary key is not enforced: a second
INSERTof the same key is accepted. CheckSELECT key, COUNT(*) … HAVING COUNT(*) > 1after each load. - It lives in the cache database (
C_INCOME_BAND_TARGET<digits>); the cache has to be configured for the database (documentation).SELECT … INTO <new name> FROM …creates one from a query; it refuses a name that exists. - A
decimalkept twenty decimals whatever was declared, with the cache database on SQL Server (measured) —DECIMAL(12,2)in the SQL form of the column list stored10.555as10.55500000000000000000. Round in theINSERT.
Drop — on the human's yes
-- verified: 9.5.1 (live, 2026-10-06)
CONNECT DATABASE sales_analytics;
SELECT used_by_name, depth
FROM USED_BY()
WHERE input_view_database_name = 'sales_analytics' AND input_view_name = 'bv_dwh_household_income';
SELECT "stored procedure result"
FROM DROP_REMOTE_TABLE()
WHERE base_view_database_name = 'sales_analytics' AND base_view_name = 's_household_band'
AND drop_base_view_on_cascade = false;
SELECT "stored procedure result"
FROM DROP_REMOTE_TABLE()
WHERE base_view_database_name = 'sales_analytics' AND base_view_name = 'bv_dwh_household_income'
AND drop_base_view_on_cascade = false;
DROP_REMOTE_TABLEdrops the table in the database and the base view or summary over it. Withdrop_base_view_on_cascade = falseit refuses while anything reads the view — theUSED_BYabove says what — and drops nothing. It refuses a base view the procedure did not create, too: a table made by the command or by someone's DDL is dropped by its owner.DROP VIEWinstead leaves the table in the database, orphaned.
What you need
| Slot | Where it comes from |
|---|---|
| Which of the four | the "Which one" table, after the plan or the readers say why |
| The target data source and schema | the human — a data source in the project or the team's shared one; never a default you found |
| The table name | the human, or the warehouse's conventions; the summary's s_ prefix (/denodo:vql) |
| The query | the view the readers need, every column named |
| How often it is refreshed, and by what | the human; a Scheduler job is /denodo:scheduler; the file is yours |
| The server can do it | env check --env dev → features.data_movement (a remote table, a summary and a data movement need it — documentation) and features.summary_rewrite (a summary answers no query without it); false is the administrator's, null unknown |
| The yes | the human, for everything in the right-hand column of the rule |
Verify
| Check | How | Expect |
|---|---|---|
| The table holds the query | inserted_rows, then COUNT(*) of the base view, against will_load |
equal |
| The types landed as meant | SELECT creation_vql FROM GENERATE_VQL_TO_CREATE_JDBC_BASE_VIEW() WHERE data_source_name = 'ds_dwh' AND catalog_name = 'dwh' AND schema_name = 'reporting' AND table_name = 'household_income' AND base_view_name = 'type_check' — it only generates text and creates nothing; with folder = '/' it fails; read sourcetypename, sourcetypesize |
text widths, nvarchar where text is not Latin, the decimals the readers expect |
| A loaded summary answers like the views | the pair in "Load it", after every load | equal; a failed load → rewrite off at once |
| A refresh worked | COUNT(*) after REFRESH |
the new count, not 0 |
| A summary is used | the plan of the readers' query | acceleratedWithSummaries = [<db>.<summary>] |
| A data movement does its job | the plan | one SQLSentence in the big side's data source joining t_<view>_<id> |
| Nothing old was touched | GET_JDBC_DATASOURCE_TABLES of the target schema before and after |
one new table, nothing gone |
Silent failures
Each runs without an error — verified: 9.5.1 (live, 2026-10-02); rows 12, 13 and 15 with the target database on SQL Server — another database maps types and compares text its own way.
| You did | What happens | Instead |
|---|---|---|
1. REFRESH while a source was down |
the table is emptied and stays empty | check the sources first; the job alerts; readers who cannot see 0 rows need a cache |
2. SELECT * in the load query, then a column was added to the view |
the next REFRESH fails after emptying the table |
name every column |
3. replace_remote_table_if_exist = true / OR REPLACE on a taken name |
another team's table replaced; their views stay OK until a query reads a column that is gone |
check the name; a taken one is the human's |
| 4. changed the view a remote table is loaded from | no warning — USED_BY does not see the table; the next REFRESH fails after emptying it |
search DESC VQL DATABASE <db> for the view's name before changing it |
| 5. loaded a summary, then the sources or the views under it changed | rewritten queries answer the old figures | REFRESH on a schedule; compare with summary_rewrite off |
6. a summary for AVG queries, or for COUNT(DISTINCT) at another grain than its own |
not used; nothing is faster | the plan first; sums and counts in it, a distinct count only at the queried grain |
| 7. data movement into a data source the big side is not in | the plan says Data Movement, the join still runs in Denodo |
the big side's data source |
8. DROP VIEW of a remote table's base view or a summary |
the table stays in the database | DROP_REMOTE_TABLE |
9. CREATE OR REPLACE MATERIALIZED TABLE over one with rows |
0 rows | plain CREATE, once |
10. two INSERTs of the same key into a materialized table |
both kept | check duplicates after each load |
11. the CREATE REMOTE TABLE command |
no base view, no count; later neither REFRESH nor DROP_REMOTE_TABLE works on it |
the procedure |
| 12. a computed or file text into a remote table | it lands as varchar(4000); a longer value fails the load and leaves an empty table |
measure MAX(LEN(…)) first; CAST(… AS varchar(8000)) in the query makes the column that wide |
13. non-Latin text into a varchar column |
? for every character the code page lacks |
CAST(… AS nvarchar(n)) in the query |
14. a summary's REFRESH failed |
the summary is empty and still used: 0 rows, NULL totals for every query sent to it |
rewrite off at once (ALTER SUMMARY VIEW … QUERY REWRITE ENABLED = FALSE), then reload |
| 15. a filter answered through a summary or a remote table | compared in that database's collation — case and trailing spaces may stop counting | check the values; say where the query runs |
Common mistakes
| You wrote | Server says | Fix |
|---|---|---|
CREATE_REMOTE_TABLE on a name that exists |
CREATE_REMOTE_TABLE [STORED PROCEDURE] [ERROR], no reason |
the name check; a taken name is the human's |
| the command on a name that exists | Remote table "dwh"."reporting".household_income already exists |
the same |
REFRESH of a base view the procedure did not create |
The REFRESH command is only valid for Summaries and Remote Tables |
create it with the procedure; a table someone else made is theirs to refresh |
REFRESH after the view gained a column |
Error executing data movement from view _p__… to source ds_dwh — table now empty |
name the columns in the load query; recreate it (the human's yes) |
DROP_REMOTE_TABLE on a hand-made base view, or with readers and cascade = false |
DROP_REMOTE_TABLE [STORED PROCEDURE] [ERROR], no reason; nothing dropped |
USED_BY; the table's owner |
CREATE OR REPLACE SUMMARY VIEW over an existing one with IF RELATION EXISTS ERROR |
Remote table exists. Use clause IF RELATION EXISTS REPLACE to allow its replacement and create the summary. |
a change to a summary is the human's yes, with REPLACE |
UPDATE / DELETE on a materialized table |
Update on materialized tables is not allowed / Delete on materialized tables is not allowed |
a new table, or INSERT only |
SELECT … INTO an existing name |
error creating table: invalid view name: already exists |
a new name |
DROP MATERIALIZED TABLE x |
Syntax error: Exception parsing query near 'MATERIALIZED' |
DROP VIEW x |
CAST(x AS double) / CAST(x AS int) in a load query |
Syntax error … near ')' |
double precision, integer (/denodo:vql, dialect) |
Reference
references/remote-tables.md— the procedure and the command in full, every result and status, types per Denodo type as measured,REFRESH, the readers of a table, materialized tables.references/incremental.md— loading only what is new or changed: the upsert, its checks, a job.references/summaries.md— theCREATEandALTER SUMMARY VIEWgrammar, which queries are rewritten (measured), the plan lines, staleness, incremental loads (documentation), the switches per server, database and query, and data movement in full.
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).