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>
177 lines
4.0 KiB
JSON
177 lines
4.0 KiB
JSON
{
|
|
"name": "ffsbglr1",
|
|
"source_connection": "S78030956",
|
|
"dest_connection": "usmidsap02",
|
|
"dest_table": "cms.ffsbglr1",
|
|
"staging_table": "pipekit_staging.ffsbglr1",
|
|
"merge_strategy": "incremental",
|
|
"merge_key": "perd",
|
|
"enabled": 0,
|
|
"dest_description": "FFSBGLR1",
|
|
"columns": [
|
|
{
|
|
"source_name": "MODULE",
|
|
"source_type": "CHAR(4)",
|
|
"dest_name": "module",
|
|
"dest_type": "text",
|
|
"description": "Module"
|
|
},
|
|
{
|
|
"source_name": "BATCH",
|
|
"source_type": "CHAR(9)",
|
|
"dest_name": "batch",
|
|
"dest_type": "text",
|
|
"description": "Batch"
|
|
},
|
|
{
|
|
"source_name": "PERD",
|
|
"source_type": "CHAR(4)",
|
|
"dest_name": "perd",
|
|
"dest_type": "text",
|
|
"description": "Perd"
|
|
},
|
|
{
|
|
"source_name": "TDATE",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "tdate",
|
|
"dest_type": "text",
|
|
"description": "Tdate"
|
|
},
|
|
{
|
|
"source_name": "PDATE",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "pdate",
|
|
"dest_type": "text",
|
|
"description": "Pdate"
|
|
},
|
|
{
|
|
"source_name": "ACCT",
|
|
"source_type": "CHAR(12)",
|
|
"dest_name": "acct",
|
|
"dest_type": "text",
|
|
"description": "Acct"
|
|
},
|
|
{
|
|
"source_name": "AMT",
|
|
"source_type": "DECIMAL(16,6)",
|
|
"dest_name": "amt",
|
|
"dest_type": "numeric(16,6)",
|
|
"description": "Amt"
|
|
},
|
|
{
|
|
"source_name": "PROJ",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "proj",
|
|
"dest_type": "text",
|
|
"description": "Proj"
|
|
},
|
|
{
|
|
"source_name": "USRN",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "usrn",
|
|
"dest_type": "text",
|
|
"description": "Usrn"
|
|
},
|
|
{
|
|
"source_name": "REV",
|
|
"source_type": "VARCHAR(2)",
|
|
"dest_name": "rev",
|
|
"dest_type": "text",
|
|
"description": "Rev"
|
|
},
|
|
{
|
|
"source_name": "CUSMOD",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cusmod",
|
|
"dest_type": "text",
|
|
"description": "Cusmod"
|
|
},
|
|
{
|
|
"source_name": "CUSKEY1",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cuskey1",
|
|
"dest_type": "text",
|
|
"description": "Cuskey1"
|
|
},
|
|
{
|
|
"source_name": "CUSKEY1D",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cuskey1d",
|
|
"dest_type": "text",
|
|
"description": "Cuskey1d"
|
|
},
|
|
{
|
|
"source_name": "CUSKEY2",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cuskey2",
|
|
"dest_type": "text",
|
|
"description": "Cuskey2"
|
|
},
|
|
{
|
|
"source_name": "CUSKEY2D",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cuskey2d",
|
|
"dest_type": "text",
|
|
"description": "Cuskey2d"
|
|
},
|
|
{
|
|
"source_name": "CUSKEY3",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cuskey3",
|
|
"dest_type": "text",
|
|
"description": "Cuskey3"
|
|
},
|
|
{
|
|
"source_name": "CUSKEY3D",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cuskey3d",
|
|
"dest_type": "text",
|
|
"description": "Cuskey3d"
|
|
},
|
|
{
|
|
"source_name": "CUSKEY4",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cuskey4",
|
|
"dest_type": "text",
|
|
"description": "Cuskey4"
|
|
},
|
|
{
|
|
"source_name": "CUSKEY4D",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cuskey4d",
|
|
"dest_type": "text",
|
|
"description": "Cuskey4d"
|
|
},
|
|
{
|
|
"source_name": "CUSVEND",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cusvend",
|
|
"dest_type": "text",
|
|
"description": "Cusvend"
|
|
},
|
|
{
|
|
"source_name": "CUSCUST",
|
|
"source_type": "VARCHAR(50)",
|
|
"dest_name": "cuscust",
|
|
"dest_type": "text",
|
|
"description": "Cuscust"
|
|
},
|
|
{
|
|
"source_name": "RECID",
|
|
"source_type": "VARCHAR(12)",
|
|
"dest_name": "recid",
|
|
"dest_type": "text",
|
|
"description": "Recid"
|
|
}
|
|
],
|
|
"watermarks": [
|
|
{
|
|
"name": "fspr",
|
|
"connection": "usmidsap02",
|
|
"resolver_sql": "select max(perd) from cms.ffsbglr1",
|
|
"default_value": "2601"
|
|
}
|
|
],
|
|
"hooks": []
|
|
}
|