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>
506 lines
12 KiB
JSON
506 lines
12 KiB
JSON
{
|
|
"name": "aroht",
|
|
"source_connection": "S78030956",
|
|
"dest_connection": "usmidsap02",
|
|
"dest_table": "cms.aroht",
|
|
"staging_table": "pipekit_staging.aroht",
|
|
"merge_strategy": "incremental",
|
|
"merge_key": "ascom#, ascust, asinv#",
|
|
"enabled": 1,
|
|
"dest_description": "A/R Open Receivables 6.1",
|
|
"columns": [
|
|
{
|
|
"source_name": "ASCOMP",
|
|
"source_type": "CHAR(2)",
|
|
"dest_name": "ascomp",
|
|
"dest_type": "text",
|
|
"description": "Company Code Alpha"
|
|
},
|
|
{
|
|
"source_name": "ASCUST",
|
|
"source_type": "CHAR(8)",
|
|
"dest_name": "ascust",
|
|
"dest_type": "text",
|
|
"description": "Customer Code"
|
|
},
|
|
{
|
|
"source_name": "ASINV#",
|
|
"source_type": "CHAR(15)",
|
|
"dest_name": "asinv#",
|
|
"dest_type": "text",
|
|
"description": "Invoice Number"
|
|
},
|
|
{
|
|
"source_name": "ASITYP",
|
|
"source_type": "CHAR(2)",
|
|
"dest_name": "asityp",
|
|
"dest_type": "text",
|
|
"description": "Invoice Typ"
|
|
},
|
|
{
|
|
"source_name": "ASIDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "asidat",
|
|
"dest_type": "date",
|
|
"description": "Invoice Date"
|
|
},
|
|
{
|
|
"source_name": "ASTDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "astdat",
|
|
"dest_type": "date",
|
|
"description": "Transaction Date"
|
|
},
|
|
{
|
|
"source_name": "ASDDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "asddat",
|
|
"dest_type": "date",
|
|
"description": "Due Date"
|
|
},
|
|
{
|
|
"source_name": "ASTRTP",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "astrtp",
|
|
"dest_type": "text",
|
|
"description": "Transaction Type"
|
|
},
|
|
{
|
|
"source_name": "ASINAM",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "asinam",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Invoice Amount"
|
|
},
|
|
{
|
|
"source_name": "ASDIS",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "asdis",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Discount Amount"
|
|
},
|
|
{
|
|
"source_name": "ASADJ",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "asadj",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Adjustnt Amount"
|
|
},
|
|
{
|
|
"source_name": "ASPAY",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "aspay",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Payment Amount"
|
|
},
|
|
{
|
|
"source_name": "ASDUAM",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "asduam",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Invoice Balance"
|
|
},
|
|
{
|
|
"source_name": "ASDWO",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "asdwo",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Total Write-off"
|
|
},
|
|
{
|
|
"source_name": "ASDED",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "asded",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Total Deductions"
|
|
},
|
|
{
|
|
"source_name": "ASHLD",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "ashld",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Total Term Discount"
|
|
},
|
|
{
|
|
"source_name": "ASHDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "ashdat",
|
|
"dest_type": "date",
|
|
"description": "Term Discount Due date"
|
|
},
|
|
{
|
|
"source_name": "ASPDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "aspdat",
|
|
"dest_type": "date",
|
|
"description": "Last Payment Date"
|
|
},
|
|
{
|
|
"source_name": "ASCHQ#",
|
|
"source_type": "CHAR(15)",
|
|
"dest_name": "aschq#",
|
|
"dest_type": "text",
|
|
"description": "Last Cheque #"
|
|
},
|
|
{
|
|
"source_name": "ASCPAM",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "ascpam",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Last Payment $"
|
|
},
|
|
{
|
|
"source_name": "ASCURA",
|
|
"source_type": "CHAR(2)",
|
|
"dest_name": "ascura",
|
|
"dest_type": "text",
|
|
"description": "Currency Code"
|
|
},
|
|
{
|
|
"source_name": "ASEXRT",
|
|
"source_type": "NUMERIC(11,6)",
|
|
"dest_name": "asexrt",
|
|
"dest_type": "numeric(11,6)",
|
|
"description": "Exchange Rate"
|
|
},
|
|
{
|
|
"source_name": "ASFSYR",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "asfsyr",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Fiscal Year"
|
|
},
|
|
{
|
|
"source_name": "ASFSPR",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "asfspr",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Fiscal Period"
|
|
},
|
|
{
|
|
"source_name": "ASBCHQ",
|
|
"source_type": "CHAR(6)",
|
|
"dest_name": "asbchq",
|
|
"dest_type": "text",
|
|
"description": "Reference Number"
|
|
},
|
|
{
|
|
"source_name": "ASTRDS",
|
|
"source_type": "CHAR(30)",
|
|
"dest_name": "astrds",
|
|
"dest_type": "text",
|
|
"description": "Transaction Description"
|
|
},
|
|
{
|
|
"source_name": "ASCOM#",
|
|
"source_type": "CHAR(2)",
|
|
"dest_name": "ascom#",
|
|
"dest_type": "text",
|
|
"description": "G/L Company Code"
|
|
},
|
|
{
|
|
"source_name": "ASARAC",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "asarac",
|
|
"dest_type": "text",
|
|
"description": "G/L Account"
|
|
},
|
|
{
|
|
"source_name": "ASSLMN",
|
|
"source_type": "CHAR(5)",
|
|
"dest_name": "asslmn",
|
|
"dest_type": "text",
|
|
"description": "Salesman Code"
|
|
},
|
|
{
|
|
"source_name": "ASTERR",
|
|
"source_type": "CHAR(4)",
|
|
"dest_name": "asterr",
|
|
"dest_type": "text",
|
|
"description": "Territory Code"
|
|
},
|
|
{
|
|
"source_name": "ASBTCH",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "asbtch",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "A/R Cash Batch Number"
|
|
},
|
|
{
|
|
"source_name": "ASBTAM",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "asbtam",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Batch Amount"
|
|
},
|
|
{
|
|
"source_name": "ASTPST",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "astpst",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Total Tax"
|
|
},
|
|
{
|
|
"source_name": "ASTFST",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "astfst",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Total First Level"
|
|
},
|
|
{
|
|
"source_name": "ASTCST",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "astcst",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Total Cost"
|
|
},
|
|
{
|
|
"source_name": "ASODIS",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "asodis",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Order Discount"
|
|
},
|
|
{
|
|
"source_name": "ASORIN",
|
|
"source_type": "CHAR(9)",
|
|
"dest_name": "asorin",
|
|
"dest_type": "text",
|
|
"description": "Original Invoice #"
|
|
},
|
|
{
|
|
"source_name": "ASBOL#",
|
|
"source_type": "CHAR(9)",
|
|
"dest_name": "asbol#",
|
|
"dest_type": "text",
|
|
"description": "OBSOLETE"
|
|
},
|
|
{
|
|
"source_name": "ASINVN",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "asinvn",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Invoice Number"
|
|
},
|
|
{
|
|
"source_name": "ASBOLN",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "asboln",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Original BOL Number"
|
|
},
|
|
{
|
|
"source_name": "ASHQCO",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "ashqco",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "HQ Company"
|
|
},
|
|
{
|
|
"source_name": "ASHQBT",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "ashqbt",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "HQ Batch"
|
|
},
|
|
{
|
|
"source_name": "ASFUT1",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "asfut1",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFUT2",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "asfut2",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFUT3",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "asfut3",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFUT4",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "asfut4",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFUT5",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "asfut5",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFUT6",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "asfut6",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFLG1",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "asflg1",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFLG2",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "asflg2",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFLG3",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "asflg3",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFLG4",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "asflg4",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFLG5",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "asflg5",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASWTCN",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "aswtcn",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Warranty Claim Number"
|
|
},
|
|
{
|
|
"source_name": "ASWTCD",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "aswtcd",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Warranty Claim Detail"
|
|
},
|
|
{
|
|
"source_name": "ASCPON",
|
|
"source_type": "CHAR(30)",
|
|
"dest_name": "ascpon",
|
|
"dest_type": "text",
|
|
"description": "Customer Purchase Order"
|
|
},
|
|
{
|
|
"source_name": "ASCRTY",
|
|
"source_type": "CHAR(1)",
|
|
"dest_name": "ascrty",
|
|
"dest_type": "text",
|
|
"description": "Use Credit Card"
|
|
},
|
|
{
|
|
"source_name": "ASSTTM",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "assttm",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Settle Amount"
|
|
},
|
|
{
|
|
"source_name": "ASSTTD",
|
|
"source_type": "DATE",
|
|
"dest_name": "assttd",
|
|
"dest_type": "date",
|
|
"description": "Settle Date"
|
|
},
|
|
{
|
|
"source_name": "ASTRMP",
|
|
"source_type": "NUMERIC(3,0)",
|
|
"dest_name": "astrmp",
|
|
"dest_type": "numeric(3,0)",
|
|
"description": "Terms Percentage"
|
|
},
|
|
{
|
|
"source_name": "ASSREF",
|
|
"source_type": "CHAR(30)",
|
|
"dest_name": "assref",
|
|
"dest_type": "text",
|
|
"description": "Invoice Shipment Reference"
|
|
},
|
|
{
|
|
"source_name": "ASPJNM",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "aspjnm",
|
|
"dest_type": "text",
|
|
"description": "Project Number"
|
|
},
|
|
{
|
|
"source_name": "ASDSPR",
|
|
"source_type": "NUMERIC(15,5)",
|
|
"dest_name": "asdspr",
|
|
"dest_type": "numeric(15,5)",
|
|
"description": "Discount Percent"
|
|
},
|
|
{
|
|
"source_name": "ASFUT7",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "asfut7",
|
|
"dest_type": "text",
|
|
"description": "Fiscal Century+ Year+Period"
|
|
},
|
|
{
|
|
"source_name": "ASFUT8",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "asfut8",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFUT9",
|
|
"source_type": "CHAR(20)",
|
|
"dest_name": "asfut9",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFUT10",
|
|
"source_type": "CHAR(30)",
|
|
"dest_name": "asfut10",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "ASFUT11",
|
|
"source_type": "CHAR(30)",
|
|
"dest_name": "asfut11",
|
|
"dest_type": "text",
|
|
"description": "Future Use"
|
|
},
|
|
{
|
|
"source_name": "RRN",
|
|
"source_type": "BIGINT",
|
|
"dest_name": "src_rrn",
|
|
"dest_type": "bigint",
|
|
"description": "Source relative record number (incremental watermark)"
|
|
}
|
|
],
|
|
"watermarks": [
|
|
{
|
|
"name": "aroht_rrn",
|
|
"connection": "usmidsap02",
|
|
"resolver_sql": "SELECT COALESCE(MAX(src_rrn), 0) FROM cms.aroht",
|
|
"default_value": "0"
|
|
}
|
|
],
|
|
"hooks": []
|
|
}
|