code wiki / (root) / nx_xform.nx

nx_xform.nx

buildroot/runtime/nx_xform.nx

13423 B311 linesdepth 10pulls 21 transitivereach 1 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_xform.nx -- TRANSFORM-DAG (F1008), the dbt-class core: MODELS AS DATA + dependency ordering + FAIL-CLOSED data-tests. A model names a stored column, a metric to compute over it, and a test its result must pass; models declare deps on other models and the engine builds them in topological order, recording the dependency edges (its own lineage) and STOPPING the pipeline the moment a data-test fails. SCOPE, honest: this is the ORCHESTRATION + VALIDATION half of dbt -- DAG order, cycle refusal, data tests, fail-fast, self-reported lineage -- with each model computing a scalar metric via the sovereign analytics (ad_profile). Multi-model DATA FLOW (a model consuming an upstream materialised table), the semantic layer, and generated docs are the named finer gaps. Models are DATA (transform_models.conf), never code (rule 11). license_tier: ORIGINAL No hardware writes (Rule 26).

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_estate_path.nx nx_analyst_store.nx nx_xform.nx nx_xform_gate.nx

imports: nx_syscalls.nxnx_estate_path.nxnx_analyst_store.nx

imported by: nx_xform_gate.nx

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ep_anchor sys_openat_rd sys_close sys_chdir sys_mmap sys_mmap ↻ xf_raw sys_write sys_exit xf_streq xf_order_json sys_mmap ↻ xf_load sys_openat_rd ↻ sys_mmap ↻ sys_read sys_close ↻ xf_dup sys_mmap ↻ xf_atoi xf_topo sys_mmap ↻ xf_csv_has xf_raw ↻ xf_num sys_mmap ↻ xf_qstr xf_run_json sys_mmap ↻ xf_load ↻ xf_topo ↻ xf_raw ↻ xf_num ↻ xf_qstr ↻ xf_csv_has ↻ xf_metric sys_mmap ↻ asr_load_field_sharded sys_mmap ↻

structs

none

consts

14const XF_MAGIC_100000: i64 = 100000
16const XF_MAXM: i64 = 32
17const XF_CONF_CAP: i64 = 8192
18const XF_OUT: i64 = 32768
19const XF_TAB: i64 = 9
20const XF_NL: i64 = 10
21const XF_CR: i64 = 13
22const XF_HASH: i64 = 35
23const XF_ZERO: i64 = 48

functions

25func xf_raw(out: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { out[o] = s[i]; o = o + 1; i = i + 1 } return o }
26func xf_num(out: *u8, o: i64, v: i64) -> i64
called by 2: xf_order_jsonxf_run_json calls 1: sys_mmap
38func xf_qstr(out: *u8, o: i64, s: *u8) -> i64
50func xf_streq(a: *u8, b: *u8) -> i64
56func xf_atoi(s: *u8) -> i64
called by 1: xf_load
66func xf_dup(buf: *u8, a: i64, b: i64) -> *u8
called by 1: xf_load calls 1: sys_mmap
75func xf_csv_has(csv: *u8, tok: *u8) -> i64
97func xf_dep_count(csv: *u8) -> i64
105func xf_load(ids: *i64, deps: *i64, prefs: *i64, keys: *i64, fidx: *i64, ops: *i64, tops: *i64, targs: *i64) -> i64
149func xf_topo(ids: *i64, deps: *i64, m: i64, order: *i64) -> i64
173func xf_metric(pref: *u8, key: *u8, fidx: i64, op: *u8) -> i64
189func xf_test(result: i64, top: *u8, targ: i64) -> i64
called by 2: xf_run_jsonmain calls 1: xf_streq
195func xf_order_json(out: *u8) -> i64
228func xf_run_json(out: *u8) -> i64
297func main(argc: i64, argv: *i64) -> i64