Add `pipekit export` / `pipekit apply` (pipekit/config_io.py) to serialise the DB's config — drivers, connections, modules (+ columns, watermarks, hooks), groups, schedules — to a git-trackable text tree under config/, and rehydrate it. SQLite stays runtime state; definitions become diffable/reviewable/ revertible. - config only: run_log/group_run/settings and per-run state columns excluded - name-keyed refs (portable across databases); source_query in .sql sidecars; columns as real JSON arrays for line-by-line diffs - newline-normalised so CRLF-vs-LF is never a spurious change - apply is create/update by name; child collections fully synced; top-level deletes gated behind --prune; --dry-run prints the plan - round-trip is identity (export -> apply --dry-run == nothing to do) Commits the current config/ as the first baseline, capturing the freshly populated columns_json for rm00101/rm00301/iv00101. Documented in SPEC.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
100 lines
2.5 KiB
JSON
100 lines
2.5 KiB
JSON
{
|
|
"name": "tb_addbacks",
|
|
"source_connection": "sqlserver",
|
|
"dest_connection": "usmidsap02",
|
|
"dest_table": "gs.tb_addbacks",
|
|
"staging_table": "pipekit_staging.tb_addbacks",
|
|
"merge_strategy": "full",
|
|
"merge_key": null,
|
|
"enabled": 1,
|
|
"dest_description": "Combined trial balance union view facilitated through SQL Server",
|
|
"columns": [
|
|
{
|
|
"source_name": "SSYR",
|
|
"source_type": "NUMERIC(10,0)",
|
|
"dest_name": "ssyr",
|
|
"dest_type": "numeric(10,0)",
|
|
"description": "Recast Season"
|
|
},
|
|
{
|
|
"source_name": "SSPR",
|
|
"source_type": "NVARCHAR(4000)",
|
|
"dest_name": "sspr",
|
|
"dest_type": "text",
|
|
"description": "Recast Period"
|
|
},
|
|
{
|
|
"source_name": "ORIGIN",
|
|
"source_type": "VARCHAR(3)",
|
|
"dest_name": "origin",
|
|
"dest_type": "text",
|
|
"description": "Origin System"
|
|
},
|
|
{
|
|
"source_name": "SOURCE",
|
|
"source_type": "VARCHAR(9)",
|
|
"dest_name": "source",
|
|
"dest_type": "text",
|
|
"description": "Source Type"
|
|
},
|
|
{
|
|
"source_name": "SEGMENT",
|
|
"source_type": "VARCHAR(4)",
|
|
"dest_name": "segment",
|
|
"dest_type": "text",
|
|
"description": "P&L Segment"
|
|
},
|
|
{
|
|
"source_name": "OPEN_LOCAL",
|
|
"source_type": "NUMERIC(38,5)",
|
|
"dest_name": "open_local",
|
|
"dest_type": "numeric(38,5)",
|
|
"description": "Opening Balance"
|
|
},
|
|
{
|
|
"source_name": "NET_LOCAL",
|
|
"source_type": "NUMERIC(38,5)",
|
|
"dest_name": "net_local",
|
|
"dest_type": "numeric(38,5)",
|
|
"description": "Net Change"
|
|
},
|
|
{
|
|
"source_name": "END_LOCAL",
|
|
"source_type": "NUMERIC(38,5)",
|
|
"dest_name": "end_local",
|
|
"dest_type": "numeric(38,5)",
|
|
"description": "Ending Balance"
|
|
},
|
|
{
|
|
"source_name": "FS",
|
|
"source_type": "VARCHAR(2)",
|
|
"dest_name": "fs",
|
|
"dest_type": "text",
|
|
"description": "Financial Statement"
|
|
},
|
|
{
|
|
"source_name": "Level 4",
|
|
"source_type": "VARCHAR(60)",
|
|
"dest_name": "level4",
|
|
"dest_type": "text",
|
|
"description": "Level 4 Account Group"
|
|
},
|
|
{
|
|
"source_name": "EBITDA",
|
|
"source_type": "NVARCHAR(255)",
|
|
"dest_name": "ebitda",
|
|
"dest_type": "text",
|
|
"description": "EBITDA Flag"
|
|
}
|
|
],
|
|
"watermarks": [
|
|
{
|
|
"name": "period",
|
|
"connection": "usmidsap02",
|
|
"resolver_sql": "SELECT MAX(sspr) FROM gs.tb_addbacks WHERE source = 'Actual'",
|
|
"default_value": "2022"
|
|
}
|
|
],
|
|
"hooks": []
|
|
}
|