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>
632 lines
16 KiB
JSON
632 lines
16 KiB
JSON
{
|
|
"name": "oid",
|
|
"source_connection": "S78030956",
|
|
"dest_connection": "usmidsap02",
|
|
"dest_table": "cms.oid",
|
|
"staging_table": "pipekit_staging.oid",
|
|
"merge_strategy": "incremental",
|
|
"merge_key": "diinv#",
|
|
"enabled": 1,
|
|
"dest_description": "Invoice detail file 6.1",
|
|
"columns": [
|
|
{
|
|
"source_name": "DIINV#",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "diinv#",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Invoice Number"
|
|
},
|
|
{
|
|
"source_name": "DILIN#",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "dilin#",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Detail Number"
|
|
},
|
|
{
|
|
"source_name": "DIORD#",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "diord#",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Customer Order Number"
|
|
},
|
|
{
|
|
"source_name": "DIITM#",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "diitm#",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Item Number"
|
|
},
|
|
{
|
|
"source_name": "DIQTBO",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "diqtbo",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Quantity Backordered"
|
|
},
|
|
{
|
|
"source_name": "DIQTSH",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "diqtsh",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Quantity Shipped"
|
|
},
|
|
{
|
|
"source_name": "DIUNIT",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "diunit",
|
|
"dest_type": "text",
|
|
"description": "Unit of Measure"
|
|
},
|
|
{
|
|
"source_name": "DIPRIC",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "dipric",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Unit Price"
|
|
},
|
|
{
|
|
"source_name": "DIPRUN",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "diprun",
|
|
"dest_type": "text",
|
|
"description": "Pricing Unit"
|
|
},
|
|
{
|
|
"source_name": "DIRETP",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "diretp",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Last Retro Price"
|
|
},
|
|
{
|
|
"source_name": "DIRETU",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "diretu",
|
|
"dest_type": "text",
|
|
"description": "Retro Price Unit"
|
|
},
|
|
{
|
|
"source_name": "DIEXT",
|
|
"source_type": "NUMERIC(10,2)",
|
|
"dest_name": "diext",
|
|
"dest_type": "numeric(10,2)",
|
|
"description": "Extension"
|
|
},
|
|
{
|
|
"source_name": "DIPSTX",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "dipstx",
|
|
"dest_type": "text",
|
|
"description": "PST Exempt"
|
|
},
|
|
{
|
|
"source_name": "DIFTXC",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "diftxc",
|
|
"dest_type": "text",
|
|
"description": "FST Code"
|
|
},
|
|
{
|
|
"source_name": "DITXGR",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "ditxgr",
|
|
"dest_type": "text",
|
|
"description": "Tax Group"
|
|
},
|
|
{
|
|
"source_name": "DITXRT",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "ditxrt",
|
|
"dest_type": "text",
|
|
"description": "Tax Rate"
|
|
},
|
|
{
|
|
"source_name": "DIDESC",
|
|
"source_type": "CHAR(30)",
|
|
"dest_name": "didesc",
|
|
"dest_type": "text",
|
|
"description": "Description"
|
|
},
|
|
{
|
|
"source_name": "DIMAJR",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "dimajr",
|
|
"dest_type": "text",
|
|
"description": "Major Sales Code"
|
|
},
|
|
{
|
|
"source_name": "DIMINR",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "diminr",
|
|
"dest_type": "text",
|
|
"description": "Minor Sales Code"
|
|
},
|
|
{
|
|
"source_name": "DIPART",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "dipart",
|
|
"dest_type": "text",
|
|
"description": "Part Number"
|
|
},
|
|
{
|
|
"source_name": "DIPREP",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "diprep",
|
|
"dest_type": "text",
|
|
"description": "Prepaid bl.flag"
|
|
},
|
|
{
|
|
"source_name": "DIRELN",
|
|
"source_type": "CHAR(8)",
|
|
"dest_name": "direln",
|
|
"dest_type": "text",
|
|
"description": "Release Number"
|
|
},
|
|
{
|
|
"source_name": "DIGLCD",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "diglcd",
|
|
"dest_type": "text",
|
|
"description": "G/L Sales Code"
|
|
},
|
|
{
|
|
"source_name": "DIREAS",
|
|
"source_type": "CHAR(2)",
|
|
"dest_name": "direas",
|
|
"dest_type": "text",
|
|
"description": "Reason Code"
|
|
},
|
|
{
|
|
"source_name": "DISLMN",
|
|
"source_type": "CHAR(5)",
|
|
"dest_name": "dislmn",
|
|
"dest_type": "text",
|
|
"description": "Salesman Code"
|
|
},
|
|
{
|
|
"source_name": "DICPCT",
|
|
"source_type": "NUMERIC(4,2)",
|
|
"dest_name": "dicpct",
|
|
"dest_type": "numeric(4,2)",
|
|
"description": "Comm. %"
|
|
},
|
|
{
|
|
"source_name": "DICRAT",
|
|
"source_type": "NUMERIC(5,2)",
|
|
"dest_name": "dicrat",
|
|
"dest_type": "numeric(5,2)",
|
|
"description": "Comm. Rate"
|
|
},
|
|
{
|
|
"source_name": "DICOST",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "dicost",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Unit Cost"
|
|
},
|
|
{
|
|
"source_name": "DICTEX",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "dictex",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Cost Extension"
|
|
},
|
|
{
|
|
"source_name": "DIQTSO",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "diqtso",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Quantity Shipped Or."
|
|
},
|
|
{
|
|
"source_name": "DIORUN",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "diorun",
|
|
"dest_type": "text",
|
|
"description": "Order Unit"
|
|
},
|
|
{
|
|
"source_name": "DIQTSP",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "diqtsp",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Quantity Shipped Pr."
|
|
},
|
|
{
|
|
"source_name": "DIEXTN",
|
|
"source_type": "NUMERIC(10,2)",
|
|
"dest_name": "diextn",
|
|
"dest_type": "numeric(10,2)",
|
|
"description": "Extension No disc/tax"
|
|
},
|
|
{
|
|
"source_name": "DITDIS",
|
|
"source_type": "NUMERIC(10,2)",
|
|
"dest_name": "ditdis",
|
|
"dest_type": "numeric(10,2)",
|
|
"description": "Total Discounts"
|
|
},
|
|
{
|
|
"source_name": "DIPSTA",
|
|
"source_type": "NUMERIC(10,2)",
|
|
"dest_name": "dipsta",
|
|
"dest_type": "numeric(10,2)",
|
|
"description": "PST Amount"
|
|
},
|
|
{
|
|
"source_name": "DIFSTA",
|
|
"source_type": "NUMERIC(10,2)",
|
|
"dest_name": "difsta",
|
|
"dest_type": "numeric(10,2)",
|
|
"description": "FST Amount"
|
|
},
|
|
{
|
|
"source_name": "DITAXA",
|
|
"source_type": "NUMERIC(10,2)",
|
|
"dest_name": "ditaxa",
|
|
"dest_type": "numeric(10,2)",
|
|
"description": "Tax Amount"
|
|
},
|
|
{
|
|
"source_name": "DIFTAM",
|
|
"source_type": "NUMERIC(10,2)",
|
|
"dest_name": "diftam",
|
|
"dest_type": "numeric(10,2)",
|
|
"description": "Prepaid Freight Amount"
|
|
},
|
|
{
|
|
"source_name": "DISTKL",
|
|
"source_type": "CHAR(6)",
|
|
"dest_name": "distkl",
|
|
"dest_type": "text",
|
|
"description": "Stock Location"
|
|
},
|
|
{
|
|
"source_name": "DILBCT",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "dilbct",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Labour Unit Cost"
|
|
},
|
|
{
|
|
"source_name": "DIBRCT",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "dibrct",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Burden Unit Cost"
|
|
},
|
|
{
|
|
"source_name": "DIMLCT",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "dimlct",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Matl Unit Cost"
|
|
},
|
|
{
|
|
"source_name": "DIOTCT",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "diotct",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Other Unit Cost"
|
|
},
|
|
{
|
|
"source_name": "DIRAN",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "diran",
|
|
"dest_type": "text",
|
|
"description": "RAN Number"
|
|
},
|
|
{
|
|
"source_name": "DIOLST",
|
|
"source_type": "NUMERIC(7,0)",
|
|
"dest_name": "diolst",
|
|
"dest_type": "numeric(7,0)",
|
|
"description": "Option List"
|
|
},
|
|
{
|
|
"source_name": "DIFUT1",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "difut1",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT2",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "difut2",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT3",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "difut3",
|
|
"dest_type": "text",
|
|
"description": "Service Contract Invoice?"
|
|
},
|
|
{
|
|
"source_name": "DIFUT4",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "difut4",
|
|
"dest_type": "text",
|
|
"description": "Original GL Sales Distribution Code"
|
|
},
|
|
{
|
|
"source_name": "DIFUT5",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "difut5",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT6",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "difut6",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIBRFC",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "dibrfc",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Burden Unit (Fixed)"
|
|
},
|
|
{
|
|
"source_name": "DIBRVC",
|
|
"source_type": "NUMERIC(12,5)",
|
|
"dest_name": "dibrvc",
|
|
"dest_type": "numeric(12,5)",
|
|
"description": "Burden Unit (Var)"
|
|
},
|
|
{
|
|
"source_name": "DIFUT7",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "difut7",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT8",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "difut8",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIBLHL",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "diblhl",
|
|
"dest_type": "text",
|
|
"description": "Bill -and-hold Type"
|
|
},
|
|
{
|
|
"source_name": "DIIRNK",
|
|
"source_type": "NUMERIC(10,0)",
|
|
"dest_name": "diirnk",
|
|
"dest_type": "numeric(10,0)",
|
|
"description": "Invoice Record No"
|
|
},
|
|
{
|
|
"source_name": "DISTPR",
|
|
"source_type": "NUMERIC(4,0)",
|
|
"dest_name": "distpr",
|
|
"dest_type": "numeric(4,0)",
|
|
"description": "Stock Trans Period"
|
|
},
|
|
{
|
|
"source_name": "DIPJCD",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "dipjcd",
|
|
"dest_type": "text",
|
|
"description": "Project Code"
|
|
},
|
|
{
|
|
"source_name": "DIWCN",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "diwcn",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Warranty Claim Number"
|
|
},
|
|
{
|
|
"source_name": "DIWCDN",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "diwcdn",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Warranty Claim Detail"
|
|
},
|
|
{
|
|
"source_name": "DIADAL",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "diadal",
|
|
"dest_type": "text",
|
|
"description": "Advertising Allowance"
|
|
},
|
|
{
|
|
"source_name": "DIACRN",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "diacrn",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Advertising Allowance Credit Note #"
|
|
},
|
|
{
|
|
"source_name": "DIACRL",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "diacrl",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Advertising Allowance Credit Note Line #"
|
|
},
|
|
{
|
|
"source_name": "DIVSXF",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "divsxf",
|
|
"dest_type": "text",
|
|
"description": "Invoice Created for Virtual Sales"
|
|
},
|
|
{
|
|
"source_name": "DISRVC",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "disrvc",
|
|
"dest_type": "text",
|
|
"description": "Service Charge OID"
|
|
},
|
|
{
|
|
"source_name": "DIEXCR",
|
|
"source_type": "NUMERIC(11,6)",
|
|
"dest_name": "diexcr",
|
|
"dest_type": "numeric(11,6)",
|
|
"description": "Currency Exchange Rate"
|
|
},
|
|
{
|
|
"source_name": "DIFDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "difdat",
|
|
"dest_type": "date",
|
|
"description": "Service Charge Inv Period From Date"
|
|
},
|
|
{
|
|
"source_name": "DITDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "ditdat",
|
|
"dest_type": "date",
|
|
"description": "Service Charge Inv Period To Date"
|
|
},
|
|
{
|
|
"source_name": "DIRBIV",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "dirbiv",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Last Retro Billing Invoice No."
|
|
},
|
|
{
|
|
"source_name": "DIRBIL",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "dirbil",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Last Retro Billing Invoice Line No"
|
|
},
|
|
{
|
|
"source_name": "DISONM",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "disonm",
|
|
"dest_type": "text",
|
|
"description": "Service Ticket Number"
|
|
},
|
|
{
|
|
"source_name": "DISOLN",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "disoln",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Service Ticket Line No"
|
|
},
|
|
{
|
|
"source_name": "DIMMEL",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "dimmel",
|
|
"dest_type": "text",
|
|
"description": "Min/Max Lock"
|
|
},
|
|
{
|
|
"source_name": "DIOITM",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "dioitm",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Item Number"
|
|
},
|
|
{
|
|
"source_name": "DIFUT9",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "difut9",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT10",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "difut10",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT11",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "difut11",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT12",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "difut12",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT13",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "difut13",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT14",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "difut14",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT15",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "difut15",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT16",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "difut16",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT17",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "difut17",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT18",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "difut18",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT19",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "difut19",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "DIFUT20",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "difut20",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future Use"
|
|
}
|
|
],
|
|
"watermarks": [
|
|
{
|
|
"name": "oid_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": []
|
|
}
|