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>
261 lines
6.2 KiB
JSON
261 lines
6.2 KiB
JSON
{
|
|
"name": "_custom_sales_line_connector",
|
|
"source_connection": "sqlserver",
|
|
"dest_connection": "usmidsap02",
|
|
"dest_table": "gp._custom_sales_line_connector",
|
|
"staging_table": "pipekit_staging._custom_sales_line_connector",
|
|
"merge_strategy": "full",
|
|
"merge_key": null,
|
|
"enabled": 1,
|
|
"dest_description": null,
|
|
"columns": [
|
|
{
|
|
"source_name": "Doctype",
|
|
"source_type": "VARCHAR(25)",
|
|
"dest_name": "doctype",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Doc Num",
|
|
"source_type": "VARCHAR(21)",
|
|
"dest_name": "doc_num",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Original Doc",
|
|
"source_type": "VARCHAR(21)",
|
|
"dest_name": "original_doc",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Doc Date",
|
|
"source_type": "DATE",
|
|
"dest_name": "doc_date",
|
|
"dest_type": "date",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Order Date",
|
|
"source_type": "DATE",
|
|
"dest_name": "order_date",
|
|
"dest_type": "date",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Req Date",
|
|
"source_type": "DATE",
|
|
"dest_name": "req_date",
|
|
"dest_type": "date",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Prom Date",
|
|
"source_type": "DATE",
|
|
"dest_name": "prom_date",
|
|
"dest_type": "date",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Cust Num",
|
|
"source_type": "VARCHAR(15)",
|
|
"dest_name": "cust_num",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Cust Name",
|
|
"source_type": "VARCHAR(65)",
|
|
"dest_name": "cust_name",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Rep ID",
|
|
"source_type": "VARCHAR(15)",
|
|
"dest_name": "rep_id",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Rep Name",
|
|
"source_type": "VARCHAR(21)",
|
|
"dest_name": "rep_name",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Cust PO",
|
|
"source_type": "VARCHAR(21)",
|
|
"dest_name": "cust_po",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "_HD_Grower",
|
|
"source_type": "VARCHAR(5)",
|
|
"dest_name": "_hd_grower",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Origin",
|
|
"source_type": "CHAR(11)",
|
|
"dest_name": "origin",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Address Code",
|
|
"source_type": "VARCHAR(15)",
|
|
"dest_name": "address_code",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "State",
|
|
"source_type": "VARCHAR(29)",
|
|
"dest_name": "state",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "City",
|
|
"source_type": "VARCHAR(35)",
|
|
"dest_name": "city",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Cust Channel",
|
|
"source_type": "VARCHAR(20)",
|
|
"dest_name": "cust_channel",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Mold ID",
|
|
"source_type": "VARCHAR(8000)",
|
|
"dest_name": "mold_id",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Item Num",
|
|
"source_type": "VARCHAR(31)",
|
|
"dest_name": "item_num",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Item Description",
|
|
"source_type": "VARCHAR(101)",
|
|
"dest_name": "item_description",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Quantity",
|
|
"source_type": "NUMERIC(19,5)",
|
|
"dest_name": "quantity",
|
|
"dest_type": "numeric(19,5)",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Collection",
|
|
"source_type": "VARCHAR(100)",
|
|
"dest_name": "collection",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Segment",
|
|
"source_type": "VARCHAR(32)",
|
|
"dest_name": "segment",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Unit Price",
|
|
"source_type": "NUMERIC(21,5)",
|
|
"dest_name": "unit_price",
|
|
"dest_type": "numeric(21,5)",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Ext. Price",
|
|
"source_type": "NUMERIC(38,7)",
|
|
"dest_name": "ext._price",
|
|
"dest_type": "numeric(38,7)",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Unit Cost",
|
|
"source_type": "NUMERIC(19,5)",
|
|
"dest_name": "unit_cost",
|
|
"dest_type": "numeric(19,5)",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Ext. Cost",
|
|
"source_type": "NUMERIC(38,9)",
|
|
"dest_name": "ext._cost",
|
|
"dest_type": "numeric(38,9)",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Margin Dollar",
|
|
"source_type": "NUMERIC(22,5)",
|
|
"dest_name": "margin_dollar",
|
|
"dest_type": "numeric(22,5)",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Ext. Margin Dollar",
|
|
"source_type": "NUMERIC(38,7)",
|
|
"dest_name": "ext._margin_dollar",
|
|
"dest_type": "numeric(38,7)",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Margin %",
|
|
"source_type": "NVARCHAR(4000)",
|
|
"dest_name": "margin__",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Job Number",
|
|
"source_type": "VARCHAR(25)",
|
|
"dest_name": "job_number",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Program",
|
|
"source_type": "VARCHAR(100)",
|
|
"dest_name": "program",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "Container",
|
|
"source_type": "VARCHAR(25)",
|
|
"dest_name": "container",
|
|
"dest_type": "text",
|
|
"description": null
|
|
},
|
|
{
|
|
"source_name": "AOP Rep",
|
|
"source_type": "VARCHAR(10)",
|
|
"dest_name": "aop_rep",
|
|
"dest_type": "text",
|
|
"description": null
|
|
}
|
|
],
|
|
"watermarks": [],
|
|
"hooks": []
|
|
}
|