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>
394 lines
9.6 KiB
JSON
394 lines
9.6 KiB
JSON
{
|
|
"name": "rprh",
|
|
"source_connection": "S78030956",
|
|
"dest_connection": "usmidsap02",
|
|
"dest_table": "cms.rprh",
|
|
"staging_table": "pipekit_staging.rprh",
|
|
"merge_strategy": "incremental",
|
|
"merge_key": "nwbtid",
|
|
"enabled": 1,
|
|
"dest_description": "Production Reporting Batch Header 6.0",
|
|
"columns": [
|
|
{
|
|
"source_name": "NWBTID",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "nwbtid",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Batch Number"
|
|
},
|
|
{
|
|
"source_name": "NWLABL",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "nwlabl",
|
|
"dest_type": "text",
|
|
"description": "Batch Label"
|
|
},
|
|
{
|
|
"source_name": "NWBPRT",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwbprt",
|
|
"dest_type": "text",
|
|
"description": "Print Indicator"
|
|
},
|
|
{
|
|
"source_name": "NWPOST",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwpost",
|
|
"dest_type": "text",
|
|
"description": "Post Indicator"
|
|
},
|
|
{
|
|
"source_name": "NWFSYY",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "nwfsyy",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Fiscal Year"
|
|
},
|
|
{
|
|
"source_name": "NWFSPP",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "nwfspp",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Fiscal Period"
|
|
},
|
|
{
|
|
"source_name": "NWRDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "nwrdat",
|
|
"dest_type": "date",
|
|
"description": "Report Date"
|
|
},
|
|
{
|
|
"source_name": "NWTMZN",
|
|
"source_type": "CHAR(4)",
|
|
"dest_name": "nwtmzn",
|
|
"dest_type": "text",
|
|
"description": "Time Zone Code"
|
|
},
|
|
{
|
|
"source_name": "NWSHFT",
|
|
"source_type": "NUMERIC(1,0)",
|
|
"dest_name": "nwshft",
|
|
"dest_type": "numeric(1,0)",
|
|
"description": "Shift Number"
|
|
},
|
|
{
|
|
"source_name": "NWSHGP",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwshgp",
|
|
"dest_type": "text",
|
|
"description": "Shift Group"
|
|
},
|
|
{
|
|
"source_name": "NWNXT#",
|
|
"source_type": "NUMERIC(5,0)",
|
|
"dest_name": "nwnxt#",
|
|
"dest_type": "numeric(5,0)",
|
|
"description": "Next Entry #"
|
|
},
|
|
{
|
|
"source_name": "NWCRBY",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "nwcrby",
|
|
"dest_type": "text",
|
|
"description": "Created By"
|
|
},
|
|
{
|
|
"source_name": "NWCDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "nwcdat",
|
|
"dest_type": "date",
|
|
"description": "Date Created"
|
|
},
|
|
{
|
|
"source_name": "NWCTIM",
|
|
"source_type": "TIME",
|
|
"dest_name": "nwctim",
|
|
"dest_type": "time",
|
|
"description": "Time Created"
|
|
},
|
|
{
|
|
"source_name": "NWUPBY",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "nwupby",
|
|
"dest_type": "text",
|
|
"description": "Updated By"
|
|
},
|
|
{
|
|
"source_name": "NWUDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "nwudat",
|
|
"dest_type": "date",
|
|
"description": "Date Updated"
|
|
},
|
|
{
|
|
"source_name": "NWUTIM",
|
|
"source_type": "TIME",
|
|
"dest_name": "nwutim",
|
|
"dest_type": "time",
|
|
"description": "Time Updated"
|
|
},
|
|
{
|
|
"source_name": "NWIUSE",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwiuse",
|
|
"dest_type": "text",
|
|
"description": "Batch In Use"
|
|
},
|
|
{
|
|
"source_name": "NWSRCE",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "nwsrce",
|
|
"dest_type": "text",
|
|
"description": "Source Code"
|
|
},
|
|
{
|
|
"source_name": "NWSTKL",
|
|
"source_type": "CHAR(6)",
|
|
"dest_name": "nwstkl",
|
|
"dest_type": "text",
|
|
"description": "Receive To Location"
|
|
},
|
|
{
|
|
"source_name": "NWSCPR",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwscpr",
|
|
"dest_type": "text",
|
|
"description": "Seperate Complete Prod. Reporting"
|
|
},
|
|
{
|
|
"source_name": "NWIUCN",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "nwiucn",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "# of Users in the Batch"
|
|
},
|
|
{
|
|
"source_name": "NWAPFC",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwapfc",
|
|
"dest_type": "text",
|
|
"description": "Complete Production Change"
|
|
},
|
|
{
|
|
"source_name": "NWAPCP",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwapcp",
|
|
"dest_type": "text",
|
|
"description": "Auto-Post Complelete Production"
|
|
},
|
|
{
|
|
"source_name": "NWFUT1",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "nwfut1",
|
|
"dest_type": "text",
|
|
"description": "Future1"
|
|
},
|
|
{
|
|
"source_name": "NWFUT2",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "nwfut2",
|
|
"dest_type": "text",
|
|
"description": "Future2"
|
|
},
|
|
{
|
|
"source_name": "NWFUT3",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "nwfut3",
|
|
"dest_type": "text",
|
|
"description": "Future3"
|
|
},
|
|
{
|
|
"source_name": "NWFUT4",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "nwfut4",
|
|
"dest_type": "text",
|
|
"description": "Future4"
|
|
},
|
|
{
|
|
"source_name": "NWFUT5",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "nwfut5",
|
|
"dest_type": "text",
|
|
"description": "O/S PO#/Item#"
|
|
},
|
|
{
|
|
"source_name": "NWFUT6",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "nwfut6",
|
|
"dest_type": "text",
|
|
"description": "Future6"
|
|
},
|
|
{
|
|
"source_name": "NWFUT7",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "nwfut7",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future7"
|
|
},
|
|
{
|
|
"source_name": "NWFUT8",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "nwfut8",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future8"
|
|
},
|
|
{
|
|
"source_name": "NWFUT9",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "nwfut9",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future9"
|
|
},
|
|
{
|
|
"source_name": "NWFLG1",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwflg1",
|
|
"dest_type": "text",
|
|
"description": "End Date/Time by Dept/Resc Shift End"
|
|
},
|
|
{
|
|
"source_name": "NWFLG2",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwflg2",
|
|
"dest_type": "text",
|
|
"description": "Future Flag2"
|
|
},
|
|
{
|
|
"source_name": "NWFLG3",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwflg3",
|
|
"dest_type": "text",
|
|
"description": "Apply Unabsorbed Material Costs REPP Prod"
|
|
},
|
|
{
|
|
"source_name": "NWPLNT",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "nwplnt",
|
|
"dest_type": "text",
|
|
"description": "Plant Code"
|
|
},
|
|
{
|
|
"source_name": "NWEDILN",
|
|
"source_type": "NUMERIC(8,0)",
|
|
"dest_name": "nwediln",
|
|
"dest_type": "numeric(8,0)",
|
|
"description": "EDI Log Number"
|
|
},
|
|
{
|
|
"source_name": "NWEDILE",
|
|
"source_type": "NUMERIC(6,0)",
|
|
"dest_name": "nwedile",
|
|
"dest_type": "numeric(6,0)",
|
|
"description": "EDI Log Entry #"
|
|
},
|
|
{
|
|
"source_name": "NWSHFS",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "nwshfs",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Shift Sequence #"
|
|
},
|
|
{
|
|
"source_name": "NWFLBH",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwflbh",
|
|
"dest_type": "text",
|
|
"description": "Created from LBHIST Inqr"
|
|
},
|
|
{
|
|
"source_name": "NWOBTID",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "nwobtid",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Original Batch ID"
|
|
},
|
|
{
|
|
"source_name": "NWFUT10",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwfut10",
|
|
"dest_type": "text",
|
|
"description": "Future-Use Fields"
|
|
},
|
|
{
|
|
"source_name": "NWFUT11",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "nwfut11",
|
|
"dest_type": "text",
|
|
"description": "Future-Use Fields"
|
|
},
|
|
{
|
|
"source_name": "NWFUT12",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "nwfut12",
|
|
"dest_type": "text",
|
|
"description": "WIP Adj. Orig. Batch Id"
|
|
},
|
|
{
|
|
"source_name": "NWFUT13",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "nwfut13",
|
|
"dest_type": "text",
|
|
"description": "Future-Use Fields"
|
|
},
|
|
{
|
|
"source_name": "NWFUT14",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "nwfut14",
|
|
"dest_type": "text",
|
|
"description": "Future-Use Fields"
|
|
},
|
|
{
|
|
"source_name": "NWFUT15",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "nwfut15",
|
|
"dest_type": "text",
|
|
"description": "Future-Use Fields"
|
|
},
|
|
{
|
|
"source_name": "NWFUT16",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "nwfut16",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future-Use Fields"
|
|
},
|
|
{
|
|
"source_name": "NWFUT17",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "nwfut17",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future-Use Fields"
|
|
},
|
|
{
|
|
"source_name": "NWPUSR",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "nwpusr",
|
|
"dest_type": "text",
|
|
"description": "Posted By"
|
|
},
|
|
{
|
|
"source_name": "NWPDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "nwpdat",
|
|
"dest_type": "date",
|
|
"description": "Posted Date"
|
|
},
|
|
{
|
|
"source_name": "NWPTIM",
|
|
"source_type": "NUMERIC(6,0)",
|
|
"dest_name": "nwptim",
|
|
"dest_type": "numeric(6,0)",
|
|
"description": "Posted Time"
|
|
}
|
|
],
|
|
"watermarks": [
|
|
{
|
|
"name": "stamp",
|
|
"connection": "usmidsap02",
|
|
"resolver_sql": "select max(nwpdat) from cms.rprh",
|
|
"default_value": "None"
|
|
}
|
|
],
|
|
"hooks": []
|
|
}
|