@malloy-publisher/server 0.0.238 → 0.0.239

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.
@@ -4510,7 +4510,36 @@ components:
4510
4510
  forceRefresh:
4511
4511
  type: boolean
4512
4512
  default: false
4513
- description: Build a new table even when a source's sourceEntityId is unchanged.
4513
+ description: >-
4514
+ Build a new table even when a source's sourceEntityId is unchanged —
4515
+ that is, defeat skip-if-unchanged, which would otherwise carry the
4516
+ existing table forward and run no SQL for that source.
4517
+
4518
+ It means ONLY that. It never re-seeds a source declaring
4519
+ `refresh="incremental"`: such a source is exempt from
4520
+ skip-if-unchanged anyway (its content address does not move when its
4521
+ data does), so there is nothing here for the flag to change, and
4522
+ reading it as "rebuild from scratch" would make a forced run — which
4523
+ is every scheduled fire — a full rebuild that no delta could ever
4524
+ follow. Ask for a rebuild with `reseed`.
4525
+
4526
+ Has no effect at all on an orchestrated build: the host decides what
4527
+ gets built by instructing it, so no carry-forward runs.
4528
+ reseed:
4529
+ type: boolean
4530
+ default: false
4531
+ description: >-
4532
+ Rebuild every in-scope source declaring `refresh="incremental"` from
4533
+ scratch, ignoring its recorded `covered_through` boundary, and
4534
+ re-derive the boundary from the table each rebuild writes. The escape
4535
+ hatch for a boundary or a table that is no longer trusted. Narrow it
4536
+ with `sourceNames`.
4537
+
4538
+ Unlike `forceRefresh` this is about HOW an incremental source is
4539
+ built, not whether it is built at all, which is why the two are
4540
+ separate flags rather than one. An orchestrated caller can instead
4541
+ set `reseed` per source on each BuildInstruction, and the two are
4542
+ OR-ed: either asks for that source to rebuild.
4514
4543
  sourceNames:
4515
4544
  type: array
4516
4545
  items:
@@ -4679,9 +4708,15 @@ components:
4679
4708
  refresh:
4680
4709
  type: ["string", "null"]
4681
4710
  description: >-
4682
- The source's declared `#@ persist ... refresh=...` value
4683
- ("full" | "incremental"), reported verbatim; null = unset.
4684
- Metadata pass-through inert to the publisher today.
4711
+ The source's declared `#@ persist ... refresh=...` value, reported
4712
+ verbatim; null = unset (which means "full"). Read and VALIDATED by
4713
+ the publisher, no longer an inert pass-through: a value outside
4714
+ {"full", "incremental"} is a publish rejection, and
4715
+ `refresh="incremental"` additionally requires a `watermark=` naming
4716
+ one output dimension (see `annotationFields`). An incremental source
4717
+ advances its serving table by a bounded delta in place instead of
4718
+ being rebuilt, so the mode also governs the build path — which is why
4719
+ it is validated rather than passed through.
4685
4720
  freshness:
4686
4721
  oneOf:
4687
4722
  - $ref: "#/components/schemas/Freshness"
@@ -4717,12 +4752,37 @@ components:
4717
4752
  type: object
4718
4753
  additionalProperties:
4719
4754
  type: string
4720
- description:
4755
+ description: >-
4721
4756
  All key=value fields of the source's `#@ persist` annotation (e.g.
4722
4757
  `name`, `realization`). The control plane uses `name` as the
4723
4758
  materialized table name (it may carry a dialect container path like
4724
4759
  `dataset.table`). Returned as the full set so new persist directives
4725
- need no publisher change.
4760
+ need no publisher change; an unrecognized key rides through here and
4761
+ is reported as a package warning, never a rejection.
4762
+
4763
+
4764
+ Recognized keys beyond `name`/`realization`/`storage`, both read from
4765
+ the EFFECTIVE merged tag (a source extending a persisted parent
4766
+ inherits the parent's keys, and its own keys merge over them per key):
4767
+
4768
+
4769
+ * `watermark` — one output dimension name, monotone non-decreasing.
4770
+ Required by `refresh="incremental"`; the platform derives each
4771
+ refresh's half-open range from it. Must be a single quoted string
4772
+ naming a column of `columns`.
4773
+
4774
+
4775
+ * `merge_key` — comma-separated output dimension names, none of them
4776
+ the watermark. Declares row identity for a source whose rows are
4777
+ restated with a LATER watermark value, which selects a MERGE apply;
4778
+ omitted, the delta replaces the range instead. Compound keys go in one
4779
+ quoted string (`merge_key="order_id, region"`).
4780
+
4781
+
4782
+ Both are validated at publish against the compiled output schema, so
4783
+ a dangling or stale name is rejected rather than deferred to a build.
4784
+ Neither participates in `sourceEntityId`: adding a watermark to an
4785
+ existing source must not re-address its table.
4726
4786
  modelPath:
4727
4787
  type: string
4728
4788
  description:
@@ -4840,6 +4900,26 @@ components:
4840
4900
  The name resolves generically against registered connections; any
4841
4901
  managed-tier alias is resolved by the host upstream and never
4842
4902
  reaches the publisher.
4903
+ reseed:
4904
+ type: boolean
4905
+ default: false
4906
+ description: >-
4907
+ Rebuild this source from scratch even if it declares
4908
+ `refresh="incremental"` and has a recorded `covered_through`
4909
+ boundary: the build runs the ordinary full CTAS and the boundary is
4910
+ re-derived from the table it writes. The escape hatch for a boundary
4911
+ or a table that is no longer trusted.
4912
+
4913
+ Per-source rather than only per-request because re-seeding is a
4914
+ per-source decision: a host may want one source rebuilt while the
4915
+ rest advance by delta in the same run. OR-ed with the request-level
4916
+ `reseed`, so either asks for this source to rebuild. Ignored for a
4917
+ source that is not incremental (such a source is always built in
4918
+ full).
4919
+
4920
+ Note `forceRefresh` is NOT how you ask for this, in any mode: it
4921
+ only defeats skip-if-unchanged, which does not even run for an
4922
+ orchestrated build.
4843
4923
 
4844
4924
  BuildManifest:
4845
4925
  type: object
@@ -4925,6 +5005,26 @@ components:
4925
5005
  description: >-
4926
5006
  Per-version read-time policy when the entry is stale. Never combined
4927
5007
  across versions; each version's entries carry its own declared fallback.
5008
+ coveredThrough:
5009
+ type: string
5010
+ description: >-
5011
+ For a source declaring `refresh="incremental"`, the EXCLUSIVE upper
5012
+ end of the watermark range this table is now known to contain — the
5013
+ boundary the next refresh will start from. Canonical scalar text
5014
+ (`2024-07-01`, `2024-07-01 12:00:00`, `41`), interpreted per
5015
+ `coveredThroughType`.
5016
+
5017
+ Reported so a caller can observe and verify incremental progress
5018
+ rather than infer it: a value that advanced between runs is a delta
5019
+ that applied. Absent for a non-incremental source, and for an
5020
+ incremental one whose source is empty (no boundary is derivable, so
5021
+ none is recorded).
5022
+ coveredThroughType:
5023
+ type: string
5024
+ description: >-
5025
+ The Malloy type of `coveredThrough` (`date`, `timestamp`, `number`,
5026
+ `string`), which decides how its text is compared and rendered.
5027
+ Present exactly when `coveredThrough` is.
4928
5028
 
4929
5029
  parameters:
4930
5030
  environmentName: