@aiaiai-pt/frankctl 0.4.4 → 0.5.1
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/CHANGELOG.md +25 -0
- package/README.md +36 -4
- package/dist/index.js +282 -275
- package/package.json +1 -1
- package/skills/frank-cli/SKILL.md +43 -5
package/package.json
CHANGED
|
@@ -71,8 +71,11 @@ A pipeline is one multi-document YAML file describing three kinds of object unde
|
|
|
71
71
|
| `Pipeline` | Transform steps (SQL/Python) turning bronze → **silver/gold** |
|
|
72
72
|
| `BackingDataset` | Maps a silver table's columns to **ontology** entity properties |
|
|
73
73
|
|
|
74
|
-
Objects reference each other by `metadata.name`, so one file
|
|
75
|
-
version-controllable. Commit
|
|
74
|
+
Objects reference each other by `metadata.name`, so one file can be self-contained and
|
|
75
|
+
version-controllable. Commit only reviewed, secret-free declarations. Source credentials
|
|
76
|
+
are currently literal `source_config` values: `frankctl` does not expand `${ENV_VAR}` and
|
|
77
|
+
export preserves those values. Keep a secret-bearing Source in an untracked mode-0600
|
|
78
|
+
file and commit its Pipeline/BackingDataset declarations separately.
|
|
76
79
|
|
|
77
80
|
### The loop: scaffold → edit → apply
|
|
78
81
|
|
|
@@ -102,15 +105,35 @@ Datasets → ontology.
|
|
|
102
105
|
frankctl pipelines apply -f pipeline.yaml --wait --timeout 600
|
|
103
106
|
```
|
|
104
107
|
|
|
108
|
+
Use `--json` with `--wait` for one evidence object correlated to the exact Source
|
|
109
|
+
workflow/SyncRun, Dagster/TransformRun, and ontology SyncRun started by this invocation.
|
|
110
|
+
Snapshot IDs are decimal strings so JavaScript cannot round them. `status: skipped`
|
|
111
|
+
means the ontology was already converged and no rows were replayed. Ontology evidence
|
|
112
|
+
prefers `snapshot_id_exact`; numeric-only evidence fails closed. Use `bd entities` for
|
|
113
|
+
separate target entity readback.
|
|
114
|
+
|
|
105
115
|
### Preflight before you apply
|
|
106
116
|
|
|
107
117
|
| Flag | What it does |
|
|
108
118
|
|------|--------------|
|
|
109
119
|
| `--dry-run` | Client-side parse + cross-ref resolve. Catches malformed YAML and broken references. No server call. |
|
|
110
120
|
| `--dry-run-server` | Server-side preflight against the catalog + DB without persisting. Catches unknown `pattern_id`s, would-be immutable-diff conflicts, and unresolved refs. |
|
|
121
|
+
| `--dry-run-server --live-ontology` | Adds an opt-in, GET-only check of ontology tenant, type, properties, relationships, keys, and declared carrier types. It never changes ontology schema or entities. |
|
|
111
122
|
|
|
112
123
|
Run `--dry-run-server` in CI on every change; run `apply --wait` to promote.
|
|
113
124
|
|
|
125
|
+
`Source.spec.streams` is desired state. Reapply creates or patches declared streams by
|
|
126
|
+
name while preserving IDs, cursors, iterator chunks, counters, and run history. Omitted
|
|
127
|
+
streams are preserved and reported as unmanaged; declare `is_enabled: false` to disable
|
|
128
|
+
one explicitly. When streams are declared, `--wait` executes only their enabled names.
|
|
129
|
+
`spec.max_items_per_chunk` sets an iterator chunk budget; omit it for the connector or
|
|
130
|
+
cluster default and use explicit `null` in a Source PATCH to clear an override.
|
|
131
|
+
|
|
132
|
+
For relationship mappings, add a matching `metadata.dependsOn` entry to the
|
|
133
|
+
BackingDataset and set `spec.sync_mode: manual`. `--wait` topologically orders same-file
|
|
134
|
+
dependencies and requires external dependencies in the same ontology tenant to be
|
|
135
|
+
already `synced`. Cycles and self-referential relationships fail before execution.
|
|
136
|
+
|
|
114
137
|
### Immutable state & when to force
|
|
115
138
|
|
|
116
139
|
Backing Datasets carry operational state (ontology cursor, sync history). If a change
|
|
@@ -126,13 +149,18 @@ Without these, `apply` is fully idempotent.
|
|
|
126
149
|
|
|
127
150
|
### Export existing work back to YAML
|
|
128
151
|
|
|
129
|
-
Already built a pipeline in the UI?
|
|
130
|
-
|
|
152
|
+
Already built a pipeline in the UI? Export it — plus its Sources and Backing Datasets —
|
|
153
|
+
to a private file for review:
|
|
131
154
|
|
|
132
155
|
```bash
|
|
133
|
-
|
|
156
|
+
umask 077
|
|
157
|
+
frankctl pipelines export <pipeline-id> > pipeline.private.yaml
|
|
134
158
|
```
|
|
135
159
|
|
|
160
|
+
The export includes Source configuration and config-only stream declarations but omits
|
|
161
|
+
stream runtime state. Split any secret-bearing Source document out before committing the
|
|
162
|
+
remaining declarations.
|
|
163
|
+
|
|
136
164
|
### Minimal manifest shape
|
|
137
165
|
|
|
138
166
|
```yaml
|
|
@@ -247,9 +275,19 @@ frankctl sources history <id> [--limit N] [--offset N]
|
|
|
247
275
|
frankctl sources streams list <source-id> [--enabled-only]
|
|
248
276
|
frankctl sources streams set <source-id> -f streams.yaml
|
|
249
277
|
frankctl sources streams refresh-schema <source-id> --from-discovery
|
|
278
|
+
frankctl sources streams refresh-schema <source-id> -f discovery-result.yaml
|
|
250
279
|
```
|
|
251
280
|
|
|
252
281
|
`-f` accepts YAML, JSON, or `-` (stdin). `streams set` takes a bare array or `{streams: […]}`.
|
|
282
|
+
Schema refresh consumes a complete discovery snapshot. It changes discovered schema and
|
|
283
|
+
supported modes while preserving namespace/destination routing, operator choices, and
|
|
284
|
+
runtime state; streams absent from a non-empty snapshot are removed as stale.
|
|
285
|
+
|
|
286
|
+
After a successful `full_refresh` + `replace`, `rows_synced` is the current table
|
|
287
|
+
cardinality rather than a lifetime sum. Append and incremental modes remain cumulative.
|
|
288
|
+
A connector-confirmed, fully exhausted zero-row result can atomically replace an existing
|
|
289
|
+
table only for `full_refresh` + `replace`; unknown, partial, failed, append, merge, and
|
|
290
|
+
incremental empties cannot erase it.
|
|
253
291
|
|
|
254
292
|
### Pipelines & Transforms (bronze → silver/gold)
|
|
255
293
|
|