@malloy-publisher/sdk 0.0.238 → 0.0.240
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 +27 -3
- package/package.json +1 -1
package/dist/client/api.d.ts
CHANGED
|
@@ -229,6 +229,12 @@ export interface BuildInstruction {
|
|
|
229
229
|
* @memberof BuildInstruction
|
|
230
230
|
*/
|
|
231
231
|
'destination'?: string;
|
|
232
|
+
/**
|
|
233
|
+
* Rebuild this source from scratch even if it declares `refresh=\"incremental\"` and has a recorded `covered_through` boundary: the build runs the ordinary full CTAS and the boundary is re-derived from the table it writes. The escape hatch for a boundary or a table that is no longer trusted. Per-source rather than only per-request because re-seeding is a per-source decision: a host may want one source rebuilt while the rest advance by delta in the same run. OR-ed with the request-level `reseed`, so either asks for this source to rebuild. Ignored for a source that is not incremental (such a source is always built in full). Note `forceRefresh` is NOT how you ask for this, in any mode: it only defeats skip-if-unchanged, which does not even run for an orchestrated build.
|
|
234
|
+
* @type {boolean}
|
|
235
|
+
* @memberof BuildInstruction
|
|
236
|
+
*/
|
|
237
|
+
'reseed'?: boolean;
|
|
232
238
|
}
|
|
233
239
|
/**
|
|
234
240
|
* Build input. Per-source instructions assigned by the caller.
|
|
@@ -764,11 +770,17 @@ export interface CreateMaterializationRequest {
|
|
|
764
770
|
*/
|
|
765
771
|
'buildInstructions'?: BuildInstructions | null;
|
|
766
772
|
/**
|
|
767
|
-
* Build a new table even when a source\'s sourceEntityId is unchanged.
|
|
773
|
+
* Build a new table even when a source\'s sourceEntityId is unchanged — that is, defeat skip-if-unchanged, which would otherwise carry the existing table forward and run no SQL for that source. It means ONLY that. It never re-seeds a source declaring `refresh=\"incremental\"`: such a source is exempt from skip-if-unchanged anyway (its content address does not move when its data does), so there is nothing here for the flag to change, and reading it as \"rebuild from scratch\" would make a forced run — which is every scheduled fire — a full rebuild that no delta could ever follow. Ask for a rebuild with `reseed`. Has no effect at all on an orchestrated build: the host decides what gets built by instructing it, so no carry-forward runs.
|
|
768
774
|
* @type {boolean}
|
|
769
775
|
* @memberof CreateMaterializationRequest
|
|
770
776
|
*/
|
|
771
777
|
'forceRefresh'?: boolean;
|
|
778
|
+
/**
|
|
779
|
+
* Rebuild every in-scope source declaring `refresh=\"incremental\"` from scratch, ignoring its recorded `covered_through` boundary, and re-derive the boundary from the table each rebuild writes. The escape hatch for a boundary or a table that is no longer trusted. Narrow it with `sourceNames`. Unlike `forceRefresh` this is about HOW an incremental source is built, not whether it is built at all, which is why the two are separate flags rather than one. An orchestrated caller can instead set `reseed` per source on each BuildInstruction, and the two are OR-ed: either asks for that source to rebuild.
|
|
780
|
+
* @type {boolean}
|
|
781
|
+
* @memberof CreateMaterializationRequest
|
|
782
|
+
*/
|
|
783
|
+
'reseed'?: boolean;
|
|
772
784
|
/**
|
|
773
785
|
* Restrict the plan/build to these persist source names. Omit = all persist sources.
|
|
774
786
|
* @type {Array<string>}
|
|
@@ -1350,6 +1362,18 @@ export interface ManifestEntry {
|
|
|
1350
1362
|
* @memberof ManifestEntry
|
|
1351
1363
|
*/
|
|
1352
1364
|
'freshnessFallback'?: ManifestEntryFreshnessFallbackEnum;
|
|
1365
|
+
/**
|
|
1366
|
+
* For a source declaring `refresh=\"incremental\"`, the EXCLUSIVE upper end of the watermark range this table is now known to contain — the boundary the next refresh will start from. Canonical scalar text (`2024-07-01`, `2024-07-01 12:00:00`, `41`), interpreted per `coveredThroughType`. Reported so a caller can observe and verify incremental progress rather than infer it: a value that advanced between runs is a delta that applied. Absent for a non-incremental source, and for an incremental one whose source is empty (no boundary is derivable, so none is recorded).
|
|
1367
|
+
* @type {string}
|
|
1368
|
+
* @memberof ManifestEntry
|
|
1369
|
+
*/
|
|
1370
|
+
'coveredThrough'?: string;
|
|
1371
|
+
/**
|
|
1372
|
+
* The Malloy type of `coveredThrough` (`date`, `timestamp`, `number`, `string`), which decides how its text is compared and rendered. Present exactly when `coveredThrough` is.
|
|
1373
|
+
* @type {string}
|
|
1374
|
+
* @memberof ManifestEntry
|
|
1375
|
+
*/
|
|
1376
|
+
'coveredThroughType'?: string;
|
|
1353
1377
|
}
|
|
1354
1378
|
export declare const ManifestEntryFreshnessFallbackEnum: {
|
|
1355
1379
|
readonly Live: "live";
|
|
@@ -1968,7 +1992,7 @@ export interface PersistSourcePlan {
|
|
|
1968
1992
|
*/
|
|
1969
1993
|
'sql': string;
|
|
1970
1994
|
/**
|
|
1971
|
-
* The source\'s declared `#@ persist ... refresh=...` value (\"full\"
|
|
1995
|
+
* The source\'s declared `#@ persist ... refresh=...` value, reported verbatim; null = unset (which means \"full\"). Read and VALIDATED by the publisher, no longer an inert pass-through: a value outside {\"full\", \"incremental\"} is a publish rejection, and `refresh=\"incremental\"` additionally requires a `watermark=` naming one output dimension (see `annotationFields`). An incremental source advances its serving table by a bounded delta in place instead of being rebuilt, so the mode also governs the build path — which is why it is validated rather than passed through.
|
|
1972
1996
|
* @type {string}
|
|
1973
1997
|
* @memberof PersistSourcePlan
|
|
1974
1998
|
*/
|
|
@@ -1994,7 +2018,7 @@ export interface PersistSourcePlan {
|
|
|
1994
2018
|
*/
|
|
1995
2019
|
'columns': Array<Column>;
|
|
1996
2020
|
/**
|
|
1997
|
-
* All key=value fields of the source\'s `#@ persist` annotation (e.g. `name`, `realization`). The control plane uses `name` as the materialized table name (it may carry a dialect container path like `dataset.table`). Returned as the full set so new persist directives need no publisher change.
|
|
2021
|
+
* All key=value fields of the source\'s `#@ persist` annotation (e.g. `name`, `realization`). The control plane uses `name` as the materialized table name (it may carry a dialect container path like `dataset.table`). Returned as the full set so new persist directives need no publisher change; an unrecognized key rides through here and is reported as a package warning, never a rejection. Recognized keys beyond `name`/`realization`/`storage`, both read from the EFFECTIVE merged tag (a source extending a persisted parent inherits the parent\'s keys, and its own keys merge over them per key): * `watermark` — one output dimension name, monotone non-decreasing. Required by `refresh=\"incremental\"`; the platform derives each refresh\'s half-open range from it. Must be a single quoted string naming a column of `columns`. * `merge_key` — comma-separated output dimension names, none of them the watermark. Declares row identity for a source whose rows are restated with a LATER watermark value, which selects a MERGE apply; omitted, the delta replaces the range instead. Compound keys go in one quoted string (`merge_key=\"order_id, region\"`). Both are validated at publish against the compiled output schema, so a dangling or stale name is rejected rather than deferred to a build. Neither participates in `sourceEntityId`: adding a watermark to an existing source must not re-address its table.
|
|
1998
2022
|
* @type {{ [key: string]: string; }}
|
|
1999
2023
|
* @memberof PersistSourcePlan
|
|
2000
2024
|
*/
|