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>
240 lines
5.7 KiB
JSON
240 lines
5.7 KiB
JSON
{
|
|
"name": "artrn",
|
|
"source_connection": "S78030956",
|
|
"dest_connection": "usmidsap02",
|
|
"dest_table": "cms.artrn",
|
|
"staging_table": "pipekit_staging.artrn",
|
|
"merge_strategy": "incremental",
|
|
"merge_key": "lotnx",
|
|
"enabled": 1,
|
|
"dest_description": "A/R Payment Transactions 6.0",
|
|
"columns": [
|
|
{
|
|
"source_name": "LOCOMP",
|
|
"source_type": "CHAR(2)",
|
|
"dest_name": "locomp",
|
|
"dest_type": "text",
|
|
"description": "Company Code Alpha"
|
|
},
|
|
{
|
|
"source_name": "LOCUST",
|
|
"source_type": "CHAR(8)",
|
|
"dest_name": "locust",
|
|
"dest_type": "text",
|
|
"description": "Customer Code"
|
|
},
|
|
{
|
|
"source_name": "LOINV#",
|
|
"source_type": "CHAR(15)",
|
|
"dest_name": "loinv#",
|
|
"dest_type": "text",
|
|
"description": "Invoice Number"
|
|
},
|
|
{
|
|
"source_name": "LOTTYP",
|
|
"source_type": "CHAR(2)",
|
|
"dest_name": "lottyp",
|
|
"dest_type": "text",
|
|
"description": "Trans Typ"
|
|
},
|
|
{
|
|
"source_name": "LOIDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "loidat",
|
|
"dest_type": "date",
|
|
"description": "Invoice Date"
|
|
},
|
|
{
|
|
"source_name": "LOTDAT",
|
|
"source_type": "DATE",
|
|
"dest_name": "lotdat",
|
|
"dest_type": "date",
|
|
"description": "Transaction Date"
|
|
},
|
|
{
|
|
"source_name": "LOTRTP",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "lotrtp",
|
|
"dest_type": "text",
|
|
"description": "Transaction Type"
|
|
},
|
|
{
|
|
"source_name": "LOAMT",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "loamt",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Amount"
|
|
},
|
|
{
|
|
"source_name": "LOCURR",
|
|
"source_type": "CHAR(2)",
|
|
"dest_name": "locurr",
|
|
"dest_type": "text",
|
|
"description": "Currency Code"
|
|
},
|
|
{
|
|
"source_name": "LOCHQ#",
|
|
"source_type": "CHAR(15)",
|
|
"dest_name": "lochq#",
|
|
"dest_type": "text",
|
|
"description": "Cheque #"
|
|
},
|
|
{
|
|
"source_name": "LOTRDS",
|
|
"source_type": "CHAR(30)",
|
|
"dest_name": "lotrds",
|
|
"dest_type": "text",
|
|
"description": "Transaction Description"
|
|
},
|
|
{
|
|
"source_name": "LOCOM#",
|
|
"source_type": "CHAR(2)",
|
|
"dest_name": "locom#",
|
|
"dest_type": "text",
|
|
"description": "G/L Company Code"
|
|
},
|
|
{
|
|
"source_name": "LOARAC",
|
|
"source_type": "CHAR(10)",
|
|
"dest_name": "loarac",
|
|
"dest_type": "text",
|
|
"description": "G/L Account"
|
|
},
|
|
{
|
|
"source_name": "A1",
|
|
"source_type": "CHAR(12)",
|
|
"dest_name": "a1",
|
|
"dest_type": "text",
|
|
"description": "A1"
|
|
},
|
|
{
|
|
"source_name": "LOFSYR",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "lofsyr",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Fiscal Year"
|
|
},
|
|
{
|
|
"source_name": "LOFSPR",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "lofspr",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Fiscal Period"
|
|
},
|
|
{
|
|
"source_name": "A2",
|
|
"source_type": "CHAR(14)",
|
|
"dest_name": "a2",
|
|
"dest_type": "text",
|
|
"description": "A2"
|
|
},
|
|
{
|
|
"source_name": "LOPCUS",
|
|
"source_type": "CHAR(8)",
|
|
"dest_name": "lopcus",
|
|
"dest_type": "text",
|
|
"description": "Chq Paid by Cust #"
|
|
},
|
|
{
|
|
"source_name": "LOCHDT",
|
|
"source_type": "DATE",
|
|
"dest_name": "lochdt",
|
|
"dest_type": "date",
|
|
"description": "Cheque Date"
|
|
},
|
|
{
|
|
"source_name": "LOMAJR",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "lomajr",
|
|
"dest_type": "text",
|
|
"description": "Major Sales Code"
|
|
},
|
|
{
|
|
"source_name": "LOMINR",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "lominr",
|
|
"dest_type": "text",
|
|
"description": "Minor Sales Code"
|
|
},
|
|
{
|
|
"source_name": "LOTERY",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "lotery",
|
|
"dest_type": "text",
|
|
"description": "Territory Code"
|
|
},
|
|
{
|
|
"source_name": "LOCUSR",
|
|
"source_type": "CHAR(8)",
|
|
"dest_name": "locusr",
|
|
"dest_type": "text",
|
|
"description": "Customer Ref"
|
|
},
|
|
{
|
|
"source_name": "LOARBC",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "loarbc",
|
|
"dest_type": "text",
|
|
"description": "A/R Bank Code"
|
|
},
|
|
{
|
|
"source_name": "LOPYBC",
|
|
"source_type": "CHAR(3)",
|
|
"dest_name": "lopybc",
|
|
"dest_type": "text",
|
|
"description": "Payment Bank code"
|
|
},
|
|
{
|
|
"source_name": "LOCRID",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "locrid",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Cheque RecordID"
|
|
},
|
|
{
|
|
"source_name": "LOCUEX",
|
|
"source_type": "NUMERIC(11,6)",
|
|
"dest_name": "locuex",
|
|
"dest_type": "numeric(11,6)",
|
|
"description": "Currency Exchange Rate"
|
|
},
|
|
{
|
|
"source_name": "LOTNX",
|
|
"source_type": "NUMERIC(9,0)",
|
|
"dest_name": "lotnx",
|
|
"dest_type": "numeric(9,0)",
|
|
"description": "Transaction Number"
|
|
},
|
|
{
|
|
"source_name": "LOABTH",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "loabth",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Adjustment Batch Number"
|
|
},
|
|
{
|
|
"source_name": "LOCBTH",
|
|
"source_type": "NUMERIC(2,0)",
|
|
"dest_name": "locbth",
|
|
"dest_type": "numeric(2,0)",
|
|
"description": "Cash Entry Batch Number"
|
|
},
|
|
{
|
|
"source_name": "LOVAMT",
|
|
"source_type": "NUMERIC(11,2)",
|
|
"dest_name": "lovamt",
|
|
"dest_type": "numeric(11,2)",
|
|
"description": "Voided Amount"
|
|
}
|
|
],
|
|
"watermarks": [
|
|
{
|
|
"name": "lotnx",
|
|
"connection": "usmidsap02",
|
|
"resolver_sql": "select max(lotnx) from cms.artrn",
|
|
"default_value": "1"
|
|
}
|
|
],
|
|
"hooks": []
|
|
}
|