{ "schema_version": 1, "nodes": [ { "id": "statuses", "type": "source.inline", "label": "Student statuses", "position": {"x": 40, "y": 80}, "config": { "source_name": "student_statuses", "fixture": "student-statuses.json", "rows": [] } }, { "id": "exclusions", "type": "source.inline", "label": "Export exclusions", "position": {"x": 520, "y": 300}, "config": { "source_name": "export_exclusions", "fixture": "export-exclusions.json", "rows": [] } }, { "id": "latest-rank", "type": "window.rank", "label": "Latest status per student", "position": {"x": 280, "y": 80}, "config": { "method": "row_number", "target_column": "status_rank", "partition_by": ["student_id"], "order_by": [ {"column": "status_date", "direction": "desc"} ] } }, { "id": "latest-only", "type": "filter", "label": "Keep latest status", "position": {"x": 520, "y": 80}, "config": { "column": "status_rank", "operator": "eq", "value": 1 } }, { "id": "eligible-only", "type": "combine.join", "label": "Exclude ineligible students", "position": {"x": 760, "y": 160}, "config": { "join_type": "anti", "left_keys": ["student_id"], "right_keys": ["student_id"], "right_prefix": "excluded_" } }, { "id": "export-calculations", "type": "calculate", "label": "Calculate export fields", "position": {"x": 1000, "y": 160}, "config": { "calculations": [ { "target_column": "full_name", "expression": "trim(first_name) || ' ' || trim(last_name)", "result_type": "string" }, { "target_column": "birth_date_display", "expression": "to_char(birth_date, 'DD.MM.YYYY')", "result_type": "string" }, { "target_column": "status_group", "expression": "case when status in ('active', 'enrolled') then 'current' else 'inactive' end", "result_type": "string" } ] } }, { "id": "export-fields", "type": "select", "label": "HEICO export", "position": {"x": 1240, "y": 160}, "config": { "fields": [ {"column": "student_id", "alias": "student_id"}, {"column": "full_name", "alias": "full_name"}, {"column": "birth_date_display", "alias": "birth_date"}, {"column": "program", "alias": "program"}, {"column": "status_group", "alias": "status_group"} ] } }, { "id": "output", "type": "output", "label": "Export rows", "position": {"x": 1480, "y": 160}, "config": {} } ], "edges": [ {"id": "e1", "source": "statuses", "target": "latest-rank"}, {"id": "e2", "source": "latest-rank", "target": "latest-only"}, { "id": "e3", "source": "latest-only", "target": "eligible-only", "target_port": "left" }, { "id": "e4", "source": "exclusions", "target": "eligible-only", "target_port": "right" }, {"id": "e5", "source": "eligible-only", "target": "export-calculations"}, {"id": "e6", "source": "export-calculations", "target": "export-fields"}, {"id": "e7", "source": "export-fields", "target": "output"} ] }