RUNNING
View
A View as RunningLake's configuration repository declares it, at views/<name>.yaml. Generated from the Go types the control plane decodes this file into, so it checks the shape the gate reads — field names and types, and which fields may exist. The gate also applies rules no schema can express — required fields inside spec among them — so a file this schema accepts can still be refused by `rl diff`. Take #/properties/spec for the spec alone.
File: views/<name>.yaml
Fields
| Field | Type | Required | Meaning |
|---|---|---|---|
apiVersion |
string | Yes |
The config schema's version, which is independent of the HTTP API's (rule unsupported-api-version). Values: |
kind |
string | Yes |
The kind this file declares. A kind that disagrees with the file's path is refused (rule kind-mismatch). Values: |
metadata |
object | Yes |
No description
|
metadata. |
string | Yes |
The resource's name, which is also its path segment. It must be the name this file's path gives it (rule name-mismatch). |
metadata. |
map of string | No |
No description
|
metadata. |
map of string | No |
No description
|
spec |
object | No |
No description
|
spec. |
string | No |
Layer and Schema name where the view lives; Name is the view's own segment. The file is views/ |
spec. |
string | No |
No description
|
spec. |
string | No |
No description
|
spec. |
string | No |
SQL is the one declared statement, in the restricted authoring dialect. It is stored as the author wrote it: the control plane transpiles per engine when it writes representations, and a statement rewritten on the way in could not be shown back to the person who wrote it. Fifteen rules of the dialect are checked at `rl diff`: every ORDER BY item says NULLS FIRST or NULLS LAST (dialect-null-order), a SUM or AVG over a floating-point cast is a warning (dialect-float-aggregate), and so is every FLOOR or CEIL call (dialect-floor-ceil), every TRY_ |
spec. |
array of object | No |
Reads is what the statement reads, declared by the author in the spelling a Grant's target uses: structured, never dotted. The republication rule judges the view against this list and against nothing else, because nothing here parses the statement; a read the author left out, or declared at the wrong depth, is caught only when the statement is parsed. |
spec. |
string | No |
No description
|
spec. |
string | No |
No description
|
spec. |
string | No |
No description
|
spec. |
string | No |
No description
|
spec. |
string | No |
No description
|
A nested field is written with its parents, spec.a.b; an item of a list is
[] and a value of a map is *. Required means the
parent object must carry the field; the rules a schema cannot express, such as a field that
is required only inside spec, are checked by rl diff.
The schema
This page is read from the kind’s published schema, at
https://runninglake.com/schema/v1alpha1/view.json. An editor that follows it checks a file of this kind as you
type. To see the fields of a kind’s spec from the command line, run rl schema
with the kind’s name: it works offline and prints what the gate accepts. The
command reference has the rest.