@malloy-publisher/sdk 0.18.5 → 0.18.6
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/dist/client/api.d.ts +5 -5
- package/package.json +1 -1
package/dist/client/api.d.ts
CHANGED
|
@@ -535,7 +535,7 @@ export interface CompileRequest {
|
|
|
535
535
|
*/
|
|
536
536
|
'source'?: string;
|
|
537
537
|
/**
|
|
538
|
-
* What the source means, and how far the check reaches. \"append\" (default) appends the source to the model in the URL and compiles it in that namespace — right for NEW definitions; an edit to an existing definition collides (\"Cannot redefine\"), and diagnostic positions land in the concatenated virtual file. \"file\" compiles the source AS that model, replacing its on-disk content for the check — validates an edit before saving, at true file coordinates. \"package\" runs the same worker compiler and file selection as reload over every .malloy and .malloynb file, without swapping the result into the served package; with a source, importers compile against the replacement. It also reports the render-tag findings (code \"render-tag\"), the dashboard, given and drill findings (code \"dashboard-lint\") and each .malloynb code cell the query route would refuse (code \"malloynb-cell-refused\", at most 10 per notebook and 50 per package, with the rest named in \"malloynb-cells-unlisted\" summaries, one per notebook that lists some and one for the notebooks past the package limit, and \"malloynb-cell-check-failed\" for a notebook that could not be checked) a reload would put on the package\'s warnings, at their own severity and with no position, and the load\'s verdict on the materialization annotations: each line a load fails with as an error with its code, each annotation the load leaves unbuilt as a warning (\"file\" reports the same verdict when the file names a materialization route or the package plans a table). The package\'s other warnings (storage, bound tables, explores, surface and discovery warnings, among others) are not reported. Package diagnostics can name files hidden from discovery. No rows or SQL are returned, and caller-provided source remains subject to authorize gates. includeSql is not available at \"package\". \"append\" text is checked against the model\'s PUBLISHED surface, so it may not declare its own data roots: import, connection.table(…), connection.sql(…), given:, ##! compiler flags and the raw-SQL function forms (name!type(…), sql_number, sql_string and the rest of that family) are refused with a 400. Those belong in a model file, so validate text declaring them at \"file\" or \"package\", which are not restricted. \"append\" text must also stand alone as top-level Malloy: a bare view:, dimension: or measure:, and anything that only parses as a continuation of the model\'s last statement, is refused with a 400, because the check reads the submitted text by itself. Wrap a view body in a top-level query:, or a field in a throwaway source: check is <source> extend { … }. Compiling at \"append\" also requires the model named in the URL to load: a model that does not compile is a 400 carrying that model\'s own problems, and a model that does not exist is a 400 that deliberately says only that it could not be loaded. An invalid scope value is rejected with a 400 naming the valid set. \"append\" text that carries a model-level `## artifact` tag is a document, which other viewers run, and is also refused with a 400 for `# image`, `# link`, markup in a `# label`, `@env.` in an annotation, an annotation the tag parser rejects or that exceeds 8,192 characters, `except:` or `rename:` followed by a declaration of the same name in the same extend chain, and more than 1,000 annotations or 64 KB of them. Plain \"append\" text without that tag keeps those tags; a model file defines them itself, and its edit is checked at \"file\".
|
|
538
|
+
* What the source means, and how far the check reaches. \"append\" (default) appends the source to the model in the URL and compiles it in that namespace — right for NEW definitions; an edit to an existing definition collides (\"Cannot redefine\"), and diagnostic positions land in the concatenated virtual file. \"file\" compiles the source AS that model, replacing its on-disk content for the check — validates an edit before saving, at true file coordinates. \"package\" runs the same worker compiler and file selection as reload over every .malloy and .malloynb file, without swapping the result into the served package; with a source, importers compile against the replacement. It also reports the render-tag findings (code \"render-tag\", or \"render-tag-check-failed\" for a model whose check did not finish), the dashboard, given and drill findings (code \"dashboard-lint\") and each .malloynb code cell the query route would refuse (code \"malloynb-cell-refused\", at most 10 per notebook and 50 per package, with the rest named in \"malloynb-cells-unlisted\" summaries, one per notebook that lists some and one for the notebooks past the package limit, and \"malloynb-cell-check-failed\" for a notebook that could not be checked) a reload would put on the package\'s warnings, at their own severity and with no position, and the load\'s verdict on the materialization annotations: each line a load fails with as an error with its code, each annotation the load leaves unbuilt as a warning (\"file\" reports the same verdict when the file names a materialization route or the package plans a table). The package\'s other warnings (storage, bound tables, explores, surface and discovery warnings, among others) are not reported. Package diagnostics can name files hidden from discovery. No rows or SQL are returned, and caller-provided source remains subject to authorize gates. includeSql is not available at \"package\". \"append\" text is checked against the model\'s PUBLISHED surface, so it may not declare its own data roots: import, connection.table(…), connection.sql(…), given:, ##! compiler flags and the raw-SQL function forms (name!type(…), sql_number, sql_string and the rest of that family) are refused with a 400. Those belong in a model file, so validate text declaring them at \"file\" or \"package\", which are not restricted. \"append\" text must also stand alone as top-level Malloy: a bare view:, dimension: or measure:, and anything that only parses as a continuation of the model\'s last statement, is refused with a 400, because the check reads the submitted text by itself. Wrap a view body in a top-level query:, or a field in a throwaway source: check is <source> extend { … }. Compiling at \"append\" also requires the model named in the URL to load: a model that does not compile is a 400 carrying that model\'s own problems, and a model that does not exist is a 400 that deliberately says only that it could not be loaded. An invalid scope value is rejected with a 400 naming the valid set. \"append\" text that carries a model-level `## artifact` tag is a document, which other viewers run, and is also refused with a 400 for `# image`, `# link`, markup in a `# label`, `@env.` in an annotation, an annotation the tag parser rejects or that exceeds 8,192 characters, `except:` or `rename:` followed by a declaration of the same name in the same extend chain, and more than 1,000 annotations or 64 KB of them. Plain \"append\" text without that tag keeps those tags; a model file defines them itself, and its edit is checked at \"file\".
|
|
539
539
|
*/
|
|
540
540
|
'scope'?: CompileRequestScopeEnum;
|
|
541
541
|
/**
|
|
@@ -2002,7 +2002,7 @@ export interface NotServedIn {
|
|
|
2002
2002
|
*/
|
|
2003
2003
|
'model': string;
|
|
2004
2004
|
/**
|
|
2005
|
-
* Every reason the served copy gives for not reading the source\'s table in this model: the `reason` of each `served-copy-not-served` package warning on that model that names the source or the model\'s whole copy, the codes `publisher_served_copy_bind_total` counts, most actionable first (for example `cross_connection_join` before `fields_not_carried`): `cross_connection_join`, `cross_connection_unbuilt`, `inline_join_kept`, `read_terms_not_kept`, `fields_not_carried`, `column_types`, `classification_not_kept`, `pair_join_not_found`, `pair_not_compiled`, `definition_not_parsed`, `compile_failed`, `no_declaration`, `reroot_not_compiled`. `not_rerooted` alone when no warning names one (also `servePathReason`\'s value for that case). Never empty. An open set: treat an unknown value as `not_rerooted`.
|
|
2005
|
+
* Every reason the served copy gives for not reading the source\'s table in this model: the `reason` of each `served-copy-not-served` package warning on that model that names the source or the model\'s whole copy, the codes `publisher_served_copy_bind_total` counts, most actionable first (for example `cross_connection_join` before `fields_not_carried`): `cross_connection_join`, `cross_connection_unbuilt`, `sql_embed_cross_connection` (a `.sql()` source reads it through `%{}` on another connection than its table is read on: a storage destination, or a managed catalog read through one), `sql_embed_bare` (a `.sql()` source embeds it bare, `%{ x }`, which its stored table cannot be embedded as), `inline_join_kept`, `read_terms_not_kept`, `fields_not_carried`, `column_types`, `classification_not_kept`, `pair_join_not_found`, `pair_not_compiled`, `definition_not_parsed`, `compile_failed`, `no_declaration`, `reroot_not_compiled`. `not_rerooted` alone when no warning names one (also `servePathReason`\'s value for that case). Never empty. An open set: treat an unknown value as `not_rerooted`.
|
|
2006
2006
|
*/
|
|
2007
2007
|
'reasons': Array<string>;
|
|
2008
2008
|
}
|
|
@@ -2797,7 +2797,7 @@ export interface PackageWarningsInner {
|
|
|
2797
2797
|
*/
|
|
2798
2798
|
'message'?: string;
|
|
2799
2799
|
/**
|
|
2800
|
-
* A stable identifier for the finding\'s family, for a client that acts on it rather than only showing it; absent for a family that has none yet. `deprecated-malloynb-notebook`: a `.malloynb` notebook, the deprecated cell format (one per file, `model` naming it). `malloynb-cell-refused`: a `.malloynb` code cell whose `run:` statement the query route refuses for every reader in the Console, which sends no privilege and no `filterParams`, so the cell never runs there. One per cell, up to the bound below, `model` naming the notebook, severity `warn`. The message names the cell by its 1-based position among the notebook\'s cells, markdown cells included, and the fix. `reason` names the rule: `off_surface` is the 404 for a source the package surface does not publish, which a source the notebook declares never is on a package with a curated surface, an `index.malloy` or the deprecated `explores`; a caller with `includeHiddenFilesAndSources` still runs such a cell. `caller_annotation` is the 400 for text carrying an annotation only the model author may write, such as `#(authorize)`, comments included. `required_filter` is the 400 for a source with a required `#(filter)`. `restricted_mode` is the 400 for a `sql_*` call or a direct table read. `compile_error` is the 400 for any other failure of the statement to compile on its own. A cell that only a reader\'s givens refuse, by `#(authorize)` or a row-level gate, is not reported. Markdown cells are not read, as the Console does not run them. A notebook lists at most 10 refused cells one by one, and the package at most 50. The rest of a notebook that lists some are named by number and reason in one `malloynb-cells-unlisted` warning (`model` the notebook; `warn`). The notebooks after the package limit share one `malloynb-cells-unlisted` warning with no `model`, which counts their cells by reason and names the first 10 of them. The report lint metric still counts each refused cell under `malloynb-cell-refused`. `malloynb-cell-check-failed`: a notebook whose cell check could not run, so a refused cell of it may have no warning; the cause is in the server log (one per notebook, `warn`). `deprecated-filter-annotation`: a source declaring deprecated `#(filter)` annotations (one per declaring source, `model` naming its file and `subject` the source). `deprecated-preaggregate-annotation`: a measure declaring `#@ preaggregate` or the deprecated alias `#(preaggregate)`, whose v2 spelling is `#(rollup)`; the message names the spelling it found (one per measure, `model` its file, `subject` the source and the message the measure; `warn`; only while `PUBLISHER_MATERIALIZE` is on). `deprecated-rollup-namespace`: a rollup line placed with `namespace=`, the deprecated spelling of its `name=` container; still read, in that container under the readable name (one per measure and container, `subject` `<base>.<measure>`; `warn`). `classification-coverage`: a published source with a dimension or measure that carries no `#(classification)` while some field in the package does (one per source, `model` naming its file and `subject` the source; `warn`; see docs/classification.md). `classification-malformed`: a `#(classification)` annotation that names no single class (one per field, `subject` the source; `warn`). `classification-downgrade`: a field that declares a lower class than the fields its expression reads, which Publisher cannot tell from a real de-identification, so a review has to (one per field, `subject` the source; `warn`; a plain copy under `#(carries)` refuses the load instead). Materialization codes follow one rule: the suffix tells the outcome. An INVALID annotation (or invalid code it covers) fails the publish and the load, on every path, so its code appears only in the load failure\'s message (the publish 4xx and `loadErrors`), never as a warning here: `persist-invalid`, `materialize-invalid`, `rollup-invalid`, `persist-view-invalid` and `persist-query-invalid` (a bad value or contradictory combination: a `storage=` that names nothing, an `@env.` reference, an unusable, unsafe, unquoted or reserved `name=`, an `inline=` that names no join, an incremental key or `refresh=\"incremental\"` on a view or query); `persist-unknown-key`, `materialize-unknown-key` and `rollup-unknown-key` (every route\'s key set is closed, a `freshness.` group\'s included); `persist-retired-key` and `materialize-retired-key` (`sharing=`, `schedule=`, `partition=`, and on `#@ persist` `realization=`); `persist-unparseable`, `materialize-unparseable`, `rollup-unparseable`, `persist-view-unparseable` and `persist-query-unparseable`; `persist-not-materializable` (a `#@ persist` on a shape Malloy does not plan); `rollup-not-a-measure`, `rollup-unknown-grain` and `rollup-not-mergeable` (a rollup line on a field that is not a measure, a grain naming no dimension, a measure no rollup can merge); `materialization-table-collision` (two sources whose `name=` puts them on one table; under `PERSIST_COLLISION_ENFORCE=false` a refusal instead); and `materialization-near-miss` (a misspelled materialization route or directive, such as `#(materialise)` or `#@ persits`). `preaggregate-malformed` is retained and no longer produced: it is `rollup-invalid` or `rollup-unparseable` now. Retained, no longer produced: `preaggregate-invalid`, `preaggregate-unknown-key`, `preaggregate-unparseable`, `preaggregate-not-a-measure`, `preaggregate-unknown-grain` and `preaggregate-not-mergeable`, now `rollup-invalid`, `rollup-unknown-key`, `rollup-unparseable`, `rollup-not-a-measure`, `rollup-unknown-grain` and `rollup-not-mergeable`. A measure or source that carries both `#(rollup)` and `#(preaggregate)` is `rollup-invalid`. A VALID annotation Publisher cannot build here is refused alone, answered live, while the package loads, and is severity `warn`, never `error`. Every one is a `BuildPlan.refusedSources` entry with a bounded `reason`, and its warning\'s code names the mechanism: `persist-not-built` (a `#@ persist` source; `subject` the source), `materialize-not-built` (a `#(materialize)` source; `subject` the source), `persist-view-not-built` and `persist-query-not-built` (a persisted view or named query; `subject` the view or query), and `rollup-not-built` (a `#(rollup)` or `#@ preaggregate` rollup; `subject` the base, or `<base>.<measure>` for one measure). The message says why, and `reason` is the refusal record\'s bounded reason. `preaggregate-not-built` is `rollup-not-built`\'s former name, retained, no longer produced: 0.15.0 and 0.16 repeated each `rollup-not-built` warning under it. `persist-source-refused`, the former name of `persist-not-built` repeated beside it in 0.14.0, is no longer produced. Retained, no longer produced: the rollup sub-family `preaggregate-hidden-field`, `-access-filter`, `-time-zone`, `-current-time`, `-reads-given`, `-unreadable-measure`, `-join-level` and `-name-clash`, now each `rollup-not-built` with the reasons `hidden_field`, `access_filter` (or `authorize`), `time_zone`, `current_time`, `reads_given`, `inherited_where_with_given` or `given_where_over_unstored_field`, `unreadable_measure`, `join_not_in_grain` and `partial_name_collision`. `materialization-storage-mode`: a `storage=` source the deployment\'s `PERSIST_STORAGE_MODE` (`off` or `write-only`) does not serve from storage (`subject` the source, or a rollup\'s base; `reason` `storage_mode`; `warn`). `materialization-unreachable`, `materialization-destination-missing` and `materialization-connection-cannot-hold-table`: a source whose serve verdict is `live` for the reason each names (no published source reaches it; its `storage=` destination is not configured; its connection creates no tables), with the verdict\'s `message` and `fixes` (`subject` the source; `reason` the verdict\'s; `warn`). `materialize-pair-full-refresh`: a `#(materialize)` pair table (an inlined `join_many`) whose `refresh=\"incremental\"` is not honoured: it is rebuilt in full on every refresh, and served (`subject` the source; `warn`). `materialize-extension-full-refresh`: an incremental `#(materialize)` extension whose watermark is not the same stored column as its incremental parent\'s: it is rebuilt in full over the parent\'s table whenever that table changes, and served (`subject` the extension; `warn`; the message names both watermarks). `materialize-extension-generation-unproven`: the newest run rebuilt an incremental extension in full because it could not prove which build of its parent\'s table it last read (neither the run\'s ledger entry nor the bound manifest records it; step reason `upstream_generation_skipped`) (`subject` the extension; `warn`). `rollup-join-one-key-repeated`: a rollup\'s last build found a `join_one` key repeated in the data, so queries that read that join beside other aggregates are answered live (`subject` the rollup\'s base; `warn`). Its former name, `preaggregate-join-one-key-repeated`, is retained, no longer produced. `served-copy-not-served`: the served copy (the author\'s own files, each stored source re-rooted on its table) leaves a source as written, so it answers live, or serves it with a join read as written or left out; `reason` names why (`compile_failed`, `cross_connection_unbuilt`, `column_types`, `no_declaration`, `definition_not_parsed`, `pair_join_not_found`, `pair_not_compiled`, `fields_not_carried`, `read_terms_not_kept`, `cross_connection_join`, `inline_join_kept`, `reroot_not_compiled`, `classification_not_kept`; an open set) (`subject` the source; `warn`). `model-recompile-failed`: a model file that compiled before did not compile when the package bound new tables, although neither its text nor that of any file it imports changed since (most often because a table it reads directly was dropped), so the file keeps serving the model it last compiled rather than answering every query on its sources with the compile error, and the package reads `stale: true` in `/status` `loadErrors`. A file an author edited that fails to compile is never kept: it answers with its compile error. The message carries the compile error and names the file\'s sources, and which of them stopped serving their stored tables because an upstream table they were built from changed (those answer live, and read `incompatible`, `upstream_altered`) (`model` the file; `reason` `compile_failed`; `warn`). Cleared by the next bind or reload that compiles the file. `row-level-gate-unexpressible`: a row-level gate an entry point inherits, whose field it no longer carries, so that entry point denies every request; `row-level-gate-reads-no-given`: a source-line gate that reads no given, a fixed predicate rather than an access rule keyed on the caller; `row-level-gate-negated-membership`: a source-line gate that negates a membership test, which an empty given turns into match-all, or that is too deep to check for one (its message then says it is too deep to check, not that it negates one) (`model` the entry point\'s file, `subject` the entry point; `warn`; the model still loads). `annotation-near-miss` and `annotation-malformed-route`: an annotation whose route or directive looks like a misspelled one Publisher reads (`warn`); `annotation-gate-near-miss`: a misspelled gate annotation (`#(authorise)`), which `compile_model` refuses. `persist-incremental-no-merge-key`: an incremental source with no `merge_key=`, so each refresh replaces its watermark range (`subject` the source; `warn`). `persist-reads-current-time`: a `#@ persist` source, persisted view or persisted named query whose stored relation reads the current time (`now`, or a relative time filter string such as `f\'last 7 days\'`), so its answers are as of its last build and it is rebuilt on every run; the message names where it reads the clock and how to answer as of each query instead (one per table, `subject` the source, the view as `<source> -> <view>`, or the query; `warn`). `persist-incremental-shared-address`: sources that compile to the same SQL on one connection, so they share one table and one boundary, where at least one is incremental (one per source; `warn`). `persist-incremental-late-rows`: an incremental source whose bound table a delta\'s late-row check found missing rows stamped just below where a delta started reading, which no later delta reads (its manifest entry\'s `lateRows`); it is carried until the source is rebuilt in full (one per source; `warn`). `rollup-join-one-key-repeated`: a bound rollup whose last build found the key of a `join_one` it reads repeated, so a query reading that join beside other aggregates is answered live; it clears once a build finds the key unique (one per rollup; `warn`). `preaggregate-join-one-key-repeated` is retained, no longer produced: it is `rollup-join-one-key-repeated` now. `join-bypass`: an author join from a published source to one with a stricter gate, which the join does not carry (one per join, or one for a walk cut short at the join bound; always a `warn`, never a load refusal; see docs/authorize.md). `storage-column-type-mismatch`: a `storage=` table of any kind (`#@ persist`, `#(materialize)`, a rollup, a persisted view or query) stores a column as a type other than the one its build declares, as its build wrote it (a change after the build is `materialization-table-incompatible`). It is read through a cast to the declared type where that is faithful, and otherwise answered live, never read as its stored type (one per source and column, `model` the model declaring it, `subject` the source, a rollup\'s base, or a view\'s or query\'s build source, the message naming the column, both types and which applies; `warn`; see docs/materialization.md). `database-column-type-mismatch` is retained, no longer produced: a bound table altered outside a build is now `materialization-table-incompatible`, answered live whole until it is rebuilt, never read through a cast. `materialization-table-incompatible`: a bound table, on either tier, that no longer matches the column contract its build recorded (a column gone, retyped or recollated since, or its source now declaring another type than it was built for); it is answered live until a build rebuilds it (one per source, `subject` the source; `warn`; the serve verdict\'s `incompatible` names the table and what changed). `materialization-contract-missing`: a bound table whose entry carries no column contract (built before contracts were recorded); it is answered live until a build rebuilds it in full (one per source, `subject` the source; `warn`). `materialization-types-unrecorded` is retained, no longer produced: a table with no recorded types is `materialization-contract-missing` now. `table-kept`: a table an auto-run replaced when its source\'s table was renamed or moved, which Publisher keeps rather than drops: one at an author\'s exact `name=` (never dropped), one in a storage destination that is no longer configured (which, when the destination was renamed rather than removed, may be the table served under the new name), or one a `storage=` or tier move left under the name the source is served under now (which may be the very table served, so it is never dropped). Listed on the newest run\'s `metadata.keptTables` until no committed run names it in its place (its runs deleted; a delete is record-only), a run finds it dropped by hand (never on Snowflake or MySQL, whose catalogs hide tables), or its name is used again in its own place (one per table, `model` the model declaring the source, `subject` the source or a rollup\'s base, the message naming the table and where it is, `reason` the kept table\'s `author_name`, `destination_missing` or `may_be_served`; `warn`; see docs/materialization.md). `database-table-unread`: a bound table in a source\'s own database whose columns could not be read when it was bound (missing, unreadable, slower than the read\'s bound, or named in more than one schema), so its queries are answered live until a read succeeds; the message names the table or rollup, one fixed reason (its connection could not be opened, the catalog read timed out, the catalog query failed, not found, a name matching more than one table, a name the catalog cannot read; never the driver\'s text) and whether a retry is pending, and the warning clears once the table is read (only for a table a source of the package reads; one per table, `model` the model declaring its source, `subject` the source, or a rollup\'s base, when the plan knows the table; `reason` one of `connection_failed`, `timed_out`, `catalog_query_failed`, `not_found`, `ambiguous`, `unparseable`, `not_read`; `warn`; see docs/materialization.md). `storage-table-unread`: the same, for a bound `storage=` table whose columns its destination session could not read when it was bound, or that a query\'s failed read left unread until the package reads it again; the message names the table or rollup and its destination; same fields and reasons. `database-native-type-missing`: a database table is bound with no captured warehouse type (its manifest entry\'s `nativeSchema`) for a column whose field Malloy types as a big integer. On BigQuery the column is read as `INT64`, its only integer type, and still serves; on any other dialect it is left out, so a query that reads it is answered live. The next full rebuild captures the types (one per source, `model` the first model binding it, `subject` the source, the message naming the columns and which applies; `warn`; see docs/materialization.md). Its former name, `stored-native-schema-missing`, is retained, no longer produced. `entities-…` (`entities-not-a-dimension`, `entities-parameterized-source`, `entities-multiple-required-filters`, `entities-sharing-not-allowed-on-dimension`, `entities-schedule-not-allowed-on-dimension`, `entities-required-filter-missing-dimension`, `entities-required-filter-non-public-dimension`): an `#(index)` or required `#(filter)` an index cannot honor, left out of `GET …/entities` (`model` its file; `warn`). The per-file report findings (`notebook-…`, `report-…`) and the report curation findings (`report-on-surface`, `index-is-not-a-report`). The message wording may change; the code does not.
|
|
2800
|
+
* A stable identifier for the finding\'s family, for a client that acts on it rather than only showing it; absent for a family that has none yet. `render-tag`: a render annotation the renderer cannot apply as written, malformed for its field (`error`) or inert where it sits (`warn`); one per finding, `model` its file and `subject` the query or view it sits on. `render-tag-check-failed`: a model whose render-tag check did not finish (it could not be read, `error`, or the validator failed, `warn`), so its render-tag findings are unknown rather than clean; reported by a package-scope compile, one per model. `deprecated-malloynb-notebook`: a `.malloynb` notebook, the deprecated cell format (one per file, `model` naming it). `malloynb-cell-refused`: a `.malloynb` code cell whose `run:` statement the query route refuses for every reader in the Console, which sends no privilege and no `filterParams`, so the cell never runs there. One per cell, up to the bound below, `model` naming the notebook, severity `warn`. The message names the cell by its 1-based position among the notebook\'s cells, markdown cells included, and the fix. `reason` names the rule: `off_surface` is the 404 for a source the package surface does not publish, which a source the notebook declares never is on a package with a curated surface, an `index.malloy` or the deprecated `explores`; a caller with `includeHiddenFilesAndSources` still runs such a cell. `caller_annotation` is the 400 for text carrying an annotation only the model author may write, such as `#(authorize)`, comments included. `required_filter` is the 400 for a source with a required `#(filter)`. `restricted_mode` is the 400 for a `sql_*` call or a direct table read. `compile_error` is the 400 for any other failure of the statement to compile on its own. A cell that only a reader\'s givens refuse, by `#(authorize)` or a row-level gate, is not reported. Markdown cells are not read, as the Console does not run them. A notebook lists at most 10 refused cells one by one, and the package at most 50. The rest of a notebook that lists some are named by number and reason in one `malloynb-cells-unlisted` warning (`model` the notebook; `warn`). The notebooks after the package limit share one `malloynb-cells-unlisted` warning with no `model`, which counts their cells by reason and names the first 10 of them. The report lint metric still counts each refused cell under `malloynb-cell-refused`. `malloynb-cell-check-failed`: a notebook whose cell check could not run, so a refused cell of it may have no warning; the cause is in the server log (one per notebook, `warn`). `deprecated-filter-annotation`: a source declaring deprecated `#(filter)` annotations (one per declaring source, `model` naming its file and `subject` the source). `deprecated-preaggregate-annotation`: a measure declaring `#@ preaggregate` or the deprecated alias `#(preaggregate)`, whose v2 spelling is `#(rollup)`; the message names the spelling it found (one per measure, `model` its file, `subject` the source and the message the measure; `warn`; only while `PUBLISHER_MATERIALIZE` is on). `deprecated-rollup-namespace`: a rollup line placed with `namespace=`, the deprecated spelling of its `name=` container; still read, in that container under the readable name (one per measure and container, `subject` `<base>.<measure>`; `warn`). `classification-coverage`: a published source with a dimension or measure that carries no `#(classification)` while some field in the package does (one per source, `model` naming its file and `subject` the source; `warn`; see docs/classification.md). `classification-malformed`: a `#(classification)` annotation that names no single class (one per field, `subject` the source; `warn`). `classification-downgrade`: a field that declares a lower class than the fields its expression reads, which Publisher cannot tell from a real de-identification, so a review has to (one per field, `subject` the source; `warn`; a plain copy under `#(carries)` refuses the load instead). Materialization codes follow one rule: the suffix tells the outcome. An INVALID annotation (or invalid code it covers) fails the publish and the load, on every path, so its code appears only in the load failure\'s message (the publish 4xx and `loadErrors`), never as a warning here: `persist-invalid`, `materialize-invalid`, `rollup-invalid`, `persist-view-invalid` and `persist-query-invalid` (a bad value or contradictory combination: a `storage=` that names nothing, an `@env.` reference, an unusable, unsafe, unquoted or reserved `name=`, an `inline=` that names no join, an incremental key or `refresh=\"incremental\"` on a view or query); `persist-unknown-key`, `materialize-unknown-key` and `rollup-unknown-key` (every route\'s key set is closed, a `freshness.` group\'s included); `persist-retired-key` and `materialize-retired-key` (`sharing=`, `schedule=`, `partition=`, and on `#@ persist` `realization=`); `persist-unparseable`, `materialize-unparseable`, `rollup-unparseable`, `persist-view-unparseable` and `persist-query-unparseable`; `persist-not-materializable` (a `#@ persist` on a shape Malloy does not plan); `rollup-not-a-measure`, `rollup-unknown-grain` and `rollup-not-mergeable` (a rollup line on a field that is not a measure, a grain naming no dimension, a measure no rollup can merge); `materialization-table-collision` (two sources whose `name=` puts them on one table; under `PERSIST_COLLISION_ENFORCE=false` a refusal instead); and `materialization-near-miss` (a misspelled materialization route or directive, such as `#(materialise)` or `#@ persits`). `preaggregate-malformed` is retained and no longer produced: it is `rollup-invalid` or `rollup-unparseable` now. Retained, no longer produced: `preaggregate-invalid`, `preaggregate-unknown-key`, `preaggregate-unparseable`, `preaggregate-not-a-measure`, `preaggregate-unknown-grain` and `preaggregate-not-mergeable`, now `rollup-invalid`, `rollup-unknown-key`, `rollup-unparseable`, `rollup-not-a-measure`, `rollup-unknown-grain` and `rollup-not-mergeable`. A measure or source that carries both `#(rollup)` and `#(preaggregate)` is `rollup-invalid`. A VALID annotation Publisher cannot build here is refused alone, answered live, while the package loads, and is severity `warn`, never `error`. Every one is a `BuildPlan.refusedSources` entry with a bounded `reason`, and its warning\'s code names the mechanism: `persist-not-built` (a `#@ persist` source; `subject` the source), `materialize-not-built` (a `#(materialize)` source; `subject` the source), `persist-view-not-built` and `persist-query-not-built` (a persisted view or named query; `subject` the view or query), and `rollup-not-built` (a `#(rollup)` or `#@ preaggregate` rollup; `subject` the base, or `<base>.<measure>` for one measure). The message says why, and `reason` is the refusal record\'s bounded reason. `preaggregate-not-built` is `rollup-not-built`\'s former name, retained, no longer produced: 0.15.0 and 0.16 repeated each `rollup-not-built` warning under it. `persist-source-refused`, the former name of `persist-not-built` repeated beside it in 0.14.0, is no longer produced. Retained, no longer produced: the rollup sub-family `preaggregate-hidden-field`, `-access-filter`, `-time-zone`, `-current-time`, `-reads-given`, `-unreadable-measure`, `-join-level` and `-name-clash`, now each `rollup-not-built` with the reasons `hidden_field`, `access_filter` (or `authorize`), `time_zone`, `current_time`, `reads_given`, `inherited_where_with_given` or `given_where_over_unstored_field`, `unreadable_measure`, `join_not_in_grain` and `partial_name_collision`. `materialization-storage-mode`: a `storage=` source the deployment\'s `PERSIST_STORAGE_MODE` (`off` or `write-only`) does not serve from storage (`subject` the source, or a rollup\'s base; `reason` `storage_mode`; `warn`). `materialization-unreachable`, `materialization-destination-missing` and `materialization-connection-cannot-hold-table`: a source whose serve verdict is `live` for the reason each names (no published source reaches it; its `storage=` destination is not configured; its connection creates no tables), with the verdict\'s `message` and `fixes` (`subject` the source; `reason` the verdict\'s; `warn`). `materialize-pair-full-refresh`: a `#(materialize)` pair table (an inlined `join_many`) whose `refresh=\"incremental\"` is not honoured: it is rebuilt in full on every refresh, and served (`subject` the source; `warn`). `materialize-extension-full-refresh`: an incremental `#(materialize)` extension whose watermark is not the same stored column as its incremental parent\'s: it is rebuilt in full over the parent\'s table whenever that table changes, and served (`subject` the extension; `warn`; the message names both watermarks). `materialize-extension-generation-unproven`: the newest run rebuilt an incremental extension in full because it could not prove which build of its parent\'s table it last read (neither the run\'s ledger entry nor the bound manifest records it; step reason `upstream_generation_skipped`) (`subject` the extension; `warn`). `rollup-join-one-key-repeated`: a rollup\'s last build found a `join_one` key repeated in the data, so queries that read that join beside other aggregates, or, for a `join_one` the rollup\'s grain reads, queries that read nothing through it, are answered live (`subject` the rollup\'s base; `warn`). Its former name, `preaggregate-join-one-key-repeated`, is retained, no longer produced. `served-copy-not-served`: the served copy (the author\'s own files, each stored source re-rooted on its table) leaves a source as written, so it answers live, or serves it with a join read as written or left out; `reason` names why (`compile_failed`, `cross_connection_unbuilt`, `column_types`, `no_declaration`, `definition_not_parsed`, `pair_join_not_found`, `pair_not_compiled`, `fields_not_carried`, `read_terms_not_kept`, `cross_connection_join`, `inline_join_kept`, `reroot_not_compiled`, `classification_not_kept`, `sql_embed_cross_connection`, `sql_embed_bare`; an open set) (`subject` the source; `warn`). `model-recompile-failed`: a model file that compiled before did not compile when the package bound new tables, although neither its text nor that of any file it imports changed since (most often because a table it reads directly was dropped), so the file keeps serving the model it last compiled rather than answering every query on its sources with the compile error, and the package reads `stale: true` in `/status` `loadErrors`. A file an author edited that fails to compile is never kept: it answers with its compile error. The message carries the compile error and names the file\'s sources, and which of them stopped serving their stored tables because an upstream table they were built from changed (those answer live, and read `incompatible`, `upstream_altered`) (`model` the file; `reason` `compile_failed`; `warn`). Cleared by the next bind or reload that compiles the file. `row-level-gate-unexpressible`: a row-level gate an entry point inherits, whose field it no longer carries, so that entry point denies every request; `row-level-gate-reads-no-given`: a source-line gate that reads no given, a fixed predicate rather than an access rule keyed on the caller; `row-level-gate-negated-membership`: a source-line gate that negates a membership test, which an empty given turns into match-all, or that is too deep to check for one (its message then says it is too deep to check, not that it negates one) (`model` the entry point\'s file, `subject` the entry point; `warn`; the model still loads). `annotation-near-miss` and `annotation-malformed-route`: an annotation whose route or directive looks like a misspelled one Publisher reads (`warn`); `annotation-gate-near-miss`: a misspelled gate annotation (`#(authorise)`), which `compile_model` refuses. `persist-incremental-no-merge-key`: an incremental source with no `merge_key=`, so each refresh replaces its watermark range (`subject` the source; `warn`). `persist-reads-current-time`: a `#@ persist` source, persisted view or persisted named query whose stored relation reads the current time (`now`, or a relative time filter string such as `f\'last 7 days\'`), so its answers are as of its last build and it is rebuilt on every run; the message names where it reads the clock and how to answer as of each query instead (one per table, `subject` the source, the view as `<source> -> <view>`, or the query; `warn`). `persist-incremental-shared-address`: sources that compile to the same SQL on one connection, so they share one table and one boundary, where at least one is incremental (one per source; `warn`). `persist-incremental-late-rows`: an incremental source whose bound table a delta\'s late-row check found missing rows stamped just below where a delta started reading, which no later delta reads (its manifest entry\'s `lateRows`); it is carried until the source is rebuilt in full (one per source; `warn`). `rollup-join-one-key-repeated`: a bound rollup whose last build found the key of a `join_one` it reads repeated, so a query reading that join beside other aggregates is answered live, or, for a `join_one` its grain reads, a query reading nothing through it; it clears once a build finds the key unique (one per rollup and key; `warn`). `preaggregate-join-one-key-repeated` is retained, no longer produced: it is `rollup-join-one-key-repeated` now. `join-bypass`: an author join from a published source to one with a stricter gate, which the join does not carry (one per join, or one for a walk cut short at the join bound; always a `warn`, never a load refusal; see docs/authorize.md). `storage-column-type-mismatch`: a `storage=` table of any kind (`#@ persist`, `#(materialize)`, a rollup, a persisted view or query) stores a column as a type other than the one its build declares, as its build wrote it (a change after the build is `materialization-table-incompatible`). It is read through a cast to the declared type where that is faithful, and otherwise answered live, never read as its stored type (one per source and column, `model` the model declaring it, `subject` the source, a rollup\'s base, or a view\'s or query\'s build source, the message naming the column, both types and which applies; `warn`; see docs/materialization.md). `database-column-type-mismatch` is retained, no longer produced: a bound table altered outside a build is now `materialization-table-incompatible`, answered live whole until it is rebuilt, never read through a cast. `materialization-table-incompatible`: a bound table, on either tier, that no longer matches the column contract its build recorded (a column gone, retyped or recollated since, or its source now declaring another type than it was built for); it is answered live until a build rebuilds it (one per source, `subject` the source; `warn`; the serve verdict\'s `incompatible` names the table and what changed). `materialization-contract-missing`: a bound table whose entry carries no column contract (built before contracts were recorded); it is answered live until a build rebuilds it in full (one per source, `subject` the source; `warn`). `materialization-types-unrecorded` is retained, no longer produced: a table with no recorded types is `materialization-contract-missing` now. `table-kept`: a table an auto-run replaced when its source\'s table was renamed or moved, which Publisher keeps rather than drops: one at an author\'s exact `name=` (never dropped), one in a storage destination that is no longer configured (which, when the destination was renamed rather than removed, may be the table served under the new name), or one a `storage=` or tier move left under the name the source is served under now (which may be the very table served, so it is never dropped). Listed on the newest run\'s `metadata.keptTables` until no committed run names it in its place (its runs deleted; a delete is record-only), a run finds it dropped by hand (never on Snowflake or MySQL, whose catalogs hide tables), or its name is used again in its own place (one per table, `model` the model declaring the source, `subject` the source or a rollup\'s base, the message naming the table and where it is, `reason` the kept table\'s `author_name`, `destination_missing` or `may_be_served`; `warn`; see docs/materialization.md). `database-table-unread`: a bound table in a source\'s own database whose columns could not be read when it was bound (missing, unreadable, slower than the read\'s bound, or named in more than one schema), so its queries are answered live until a read succeeds; the message names the table or rollup, one fixed reason (its connection could not be opened, the catalog read timed out, the catalog query failed, not found, a name matching more than one table, a name the catalog cannot read; never the driver\'s text) and whether a retry is pending, and the warning clears once the table is read (only for a table a source of the package reads; one per table, `model` the model declaring its source, `subject` the source, or a rollup\'s base, when the plan knows the table; `reason` one of `connection_failed`, `timed_out`, `catalog_query_failed`, `not_found`, `ambiguous`, `unparseable`, `not_read`; `warn`; see docs/materialization.md). `storage-table-unread`: the same, for a bound `storage=` table whose columns its destination session could not read when it was bound, or that a query\'s failed read left unread until the package reads it again; the message names the table or rollup and its destination; same fields and reasons. `database-native-type-missing`: a database table is bound with no captured warehouse type (its manifest entry\'s `nativeSchema`) for a column whose field Malloy types as a big integer. On BigQuery the column is read as `INT64`, its only integer type, and still serves; on any other dialect it is left out, so a query that reads it is answered live. The next full rebuild captures the types (one per source, `model` the first model binding it, `subject` the source, the message naming the columns and which applies; `warn`; see docs/materialization.md). Its former name, `stored-native-schema-missing`, is retained, no longer produced. `entities-…` (`entities-not-a-dimension`, `entities-parameterized-source`, `entities-multiple-required-filters`, `entities-sharing-not-allowed-on-dimension`, `entities-schedule-not-allowed-on-dimension`, `entities-required-filter-missing-dimension`, `entities-required-filter-non-public-dimension`): an `#(index)` or required `#(filter)` an index cannot honor, left out of `GET …/entities` (`model` its file; `warn`). The per-file report findings (`notebook-…`, `report-…`) and the report curation findings (`report-on-surface`, `index-is-not-a-report`). The message wording may change; the code does not.
|
|
2801
2801
|
*/
|
|
2802
2802
|
'code'?: string;
|
|
2803
2803
|
/**
|
|
@@ -3816,7 +3816,7 @@ export interface ServeVerdict {
|
|
|
3816
3816
|
*/
|
|
3817
3817
|
'verdict': string;
|
|
3818
3818
|
/**
|
|
3819
|
-
* For a `live` verdict, why: `refused` (the plan refused to build it), `storage_mode` (`storage=` while `PERSIST_STORAGE_MODE` is not `on`), `unreachable` (no source on the package\'s published surface reads it), `row_level_gate` (every query through it carries an `#(authorize)` or `#(access_filter)` gate its table cannot keep yet, on either tier), `stale` (its table is past its freshness window, and its fallback does not serve stale), `shadowed` (its storage table is bound, but every model\'s source of that name is another source), `destination_missing` (`storage=` names a destination the environment does not configure), `connection_cannot_hold_table` (database, on a connection whose type creates no tables), `types_unrecorded` (retained, no longer produced: an entry with no recorded types reads `contract_missing` now), `materialization_off` (a `#(materialize)` source, which only the served copy reads, and the served copy is off: `PUBLISHER_MATERIALIZE`, and for `storage=` `PERSIST_STORAGE_MODE`), `served_copy` (a source the served copy reads, `#(materialize)` or `#@ persist`, whose table is bound and built, but no model\'s served copy re-roots it, so its queries are answered live; `notServedIn` says where and why), `contract_missing` (bound, but its manifest entry carries no column contract, `ManifestEntry.contract`: built before contracts were recorded, or by an older worker), `incompatible` (bound, but the table no longer matches the contract its build recorded: a column gone, retyped or recollated since, or the source of a substituted table now declaring another type; `incompatibility` says what). Both judge the table itself, never anything local to one worker: a catalog read that failed or timed out leaves the table unread (answered live, read again), never `incompatible`. Both are non-terminal and never a plan-time refusal: a rebuild fixes them, and a source with either counts as stale, so the next build rebuilds it in full. Each names the generation it judged in `table`, so a consumer drops a verdict about a table it has since replaced. An open set.
|
|
3819
|
+
* For a `live` verdict, why: `refused` (the plan refused to build it), `storage_mode` (`storage=` while `PERSIST_STORAGE_MODE` is not `on`), `unreachable` (no source on the package\'s published surface reads it), `row_level_gate` (every query through it carries an `#(authorize)` or `#(access_filter)` gate its table cannot keep yet, on either tier), `stale` (its table is past its freshness window, and its fallback does not serve stale), `shadowed` (its storage table is bound, but every model\'s source of that name is another source), `destination_missing` (`storage=` names a destination the environment does not configure), `connection_cannot_hold_table` (database, on a connection whose type creates no tables), `types_unrecorded` (retained, no longer produced: an entry with no recorded types reads `contract_missing` now), `materialization_off` (a `#(materialize)` source, which only the served copy reads, and the served copy is off: `PUBLISHER_MATERIALIZE`, and for `storage=` `PERSIST_STORAGE_MODE`), `served_copy` (a source the served copy reads, `#(materialize)` or `#@ persist`, whose table is bound and built, but no model\'s served copy re-roots it, so its queries are answered live; `notServedIn` says where and why), `contract_missing` (bound, but its manifest entry carries no column contract, `ManifestEntry.contract`: built before contracts were recorded, or by an older worker), `incompatible` (bound, but the table no longer matches the contract its build recorded: a column gone, retyped or recollated since, or the source of a substituted table now declaring another type; `incompatibility` says what). Both judge the table itself, never anything local to one worker: a catalog read that failed or timed out leaves the table unread (answered live, read again), never `incompatible`. Both are non-terminal and never a plan-time refusal: a rebuild fixes them, and a source with either counts as stale, so the next build rebuilds it in full. `upstream_unread` (bound, but withdrawn after a recompile, reload or publish failed, and the read of a warehouse table it was built from failed, then or at any read since, so whether that table changed is not known: answered live until a read of it succeeds and finds it unchanged, at the package\'s next manifest bind or rebind, or a reload plans it again; it judges nothing about the table and never counts it stale). Each names the generation it judged in `table`, so a consumer drops a verdict about a table it has since replaced. An open set.
|
|
3820
3820
|
*/
|
|
3821
3821
|
'reason'?: string;
|
|
3822
3822
|
'table'?: ServeVerdictTable;
|
|
@@ -3869,7 +3869,7 @@ export interface ServeVerdictIncompatibility {
|
|
|
3869
3869
|
'columns': Array<string>;
|
|
3870
3870
|
}
|
|
3871
3871
|
/**
|
|
3872
|
-
* With `contract_missing` or `
|
|
3872
|
+
* With `contract_missing`, `incompatible` or `upstream_unread`: the table generation the verdict judged, its `physicalTableName` and the `builtAt` its entry carried (absent when the entry carried none).
|
|
3873
3873
|
*/
|
|
3874
3874
|
export interface ServeVerdictTable {
|
|
3875
3875
|
'physicalTableName': string;
|