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>
121 lines
3.0 KiB
JSON
121 lines
3.0 KiB
JSON
{
|
|
"name": "ois",
|
|
"source_connection": "S78030956",
|
|
"dest_connection": "usmidsap02",
|
|
"dest_table": "cms.ois",
|
|
"staging_table": "pipekit_staging.ois",
|
|
"merge_strategy": "incremental",
|
|
"merge_key": "flinv#",
|
|
"enabled": 1,
|
|
"dest_description": "Invoice detail discount/charge 6.0",
|
|
"columns": [
|
|
{
|
|
"source_name": "FLINV#",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "flinv#",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Invoice Number"
|
|
},
|
|
{
|
|
"source_name": "FLLIN#",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "fllin#",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Detail Number"
|
|
},
|
|
{
|
|
"source_name": "FLDIS#",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "fldis#",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Discount Number"
|
|
},
|
|
{
|
|
"source_name": "FLDISC",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "fldisc",
|
|
"dest_type": "text",
|
|
"description": "Discount Code"
|
|
},
|
|
{
|
|
"source_name": "FLDDES",
|
|
"source_type": "CHAR(30)",
|
|
"dest_name": "flddes",
|
|
"dest_type": "text",
|
|
"description": "Discount Description"
|
|
},
|
|
{
|
|
"source_name": "FLDRCR",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "fldrcr",
|
|
"dest_type": "text",
|
|
"description": "Debit Credit"
|
|
},
|
|
{
|
|
"source_name": "FLBANT",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "flbant",
|
|
"dest_type": "text",
|
|
"description": "Rate Base"
|
|
},
|
|
{
|
|
"source_name": "FLPERC",
|
|
"source_type": "NUMERIC(8,5)",
|
|
"dest_name": "flperc",
|
|
"dest_type": "numeric(8,5)",
|
|
"description": "Discount Percent"
|
|
},
|
|
{
|
|
"source_name": "FLDAMT",
|
|
"source_type": "NUMERIC(13,5)",
|
|
"dest_name": "fldamt",
|
|
"dest_type": "numeric(13,5)",
|
|
"description": "Discount Amount"
|
|
},
|
|
{
|
|
"source_name": "FLAPER",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "flaper",
|
|
"dest_type": "text",
|
|
"description": "Fixed or per Unit"
|
|
},
|
|
{
|
|
"source_name": "FLDEXT",
|
|
"source_type": "NUMERIC(10,2)",
|
|
"dest_name": "fldext",
|
|
"dest_type": "numeric(10,2)",
|
|
"description": "Discount Extension"
|
|
},
|
|
{
|
|
"source_name": "FLAUNT",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "flaunt",
|
|
"dest_type": "text",
|
|
"description": "Amount Per-Unit"
|
|
},
|
|
{
|
|
"source_name": "FLRTEF",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "flrtef",
|
|
"dest_type": "text",
|
|
"description": "Rate Flag"
|
|
},
|
|
{
|
|
"source_name": "FLRNDD",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "flrndd",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Rounding # of Decimals"
|
|
}
|
|
],
|
|
"watermarks": [
|
|
{
|
|
"name": "ois_wm",
|
|
"connection": "usmidsap02",
|
|
"resolver_sql": "SELECT COALESCE(MAX(dhidat), DATE '1900-01-01') - 30 FROM cms.oih WHERE dhidat <= CURRENT_DATE",
|
|
"default_value": null
|
|
}
|
|
],
|
|
"hooks": []
|
|
}
|