Add Bucket 2 CMS incremental modules (6 tables)
Watermarked incremental syncs for qcrh, qcri, qtnote, iprcct, icstt, methh, ported from the legacy /opt/sync merge logic. Rows initially backfilled from lgdat; columns match the cms.* dest (lgdat subset), pulled from DB2. Merge keys: qcrh dcord#, qcri ddord#, qtnote ggkey, iprcct tadate, icstt jhdate (legacy INSERT..ON CONFLICT -> keyed delete+insert), methh composite anpart,anplnt (legacy DELETE WHERE EXISTS). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
85c2295f63
commit
560056c39c
386
config/modules/icstt.json
Normal file
386
config/modules/icstt.json
Normal file
@ -0,0 +1,386 @@
|
||||
{
|
||||
"name": "icstt",
|
||||
"source_connection": "S78030956",
|
||||
"dest_connection": "usmidsap02",
|
||||
"dest_table": "cms.icstt",
|
||||
"staging_table": "pipekit_staging.icstt",
|
||||
"merge_strategy": "incremental",
|
||||
"merge_key": "jhdate",
|
||||
"enabled": 1,
|
||||
"dest_description": "Inventory Cost Transaction Log 6.0",
|
||||
"columns": [
|
||||
{
|
||||
"source_name": "JHPART",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "jhpart",
|
||||
"dest_type": "text",
|
||||
"description": "Part Number"
|
||||
},
|
||||
{
|
||||
"source_name": "JHDATE",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "jhdate",
|
||||
"dest_type": "date",
|
||||
"description": "Transaction Date"
|
||||
},
|
||||
{
|
||||
"source_name": "JHTIME",
|
||||
"source_type": "TIME",
|
||||
"dest_name": "jhtime",
|
||||
"dest_type": "time without time zone",
|
||||
"description": "Transaction Time"
|
||||
},
|
||||
{
|
||||
"source_name": "JHJOB#",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "jhjob#",
|
||||
"dest_type": "text",
|
||||
"description": "Job Number"
|
||||
},
|
||||
{
|
||||
"source_name": "JHPONR",
|
||||
"source_type": "DECIMAL(9,0)",
|
||||
"dest_name": "jhponr",
|
||||
"dest_type": "numeric",
|
||||
"description": "Purchase Order Number"
|
||||
},
|
||||
{
|
||||
"source_name": "JHPITM",
|
||||
"source_type": "DECIMAL(3,0)",
|
||||
"dest_name": "jhpitm",
|
||||
"dest_type": "numeric",
|
||||
"description": "Purchase Order Item"
|
||||
},
|
||||
{
|
||||
"source_name": "JHUSER",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "jhuser",
|
||||
"dest_type": "text",
|
||||
"description": "User ID"
|
||||
},
|
||||
{
|
||||
"source_name": "JHPROG",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "jhprog",
|
||||
"dest_type": "text",
|
||||
"description": "Program Number"
|
||||
},
|
||||
{
|
||||
"source_name": "JHCQTY",
|
||||
"source_type": "DECIMAL(15,5)",
|
||||
"dest_name": "jhcqty",
|
||||
"dest_type": "numeric",
|
||||
"description": "Quantity in Units of Issue"
|
||||
},
|
||||
{
|
||||
"source_name": "JHCTYP",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "jhctyp",
|
||||
"dest_type": "text",
|
||||
"description": "Standard or Actual Cost (A/S)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHMATO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhmato",
|
||||
"dest_type": "numeric",
|
||||
"description": "Material Unit Cost (old)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHLABO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhlabo",
|
||||
"dest_type": "numeric",
|
||||
"description": "Labour Unit Cost (old)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHBURO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhburo",
|
||||
"dest_type": "numeric",
|
||||
"description": "Burden Unit Cost (old)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHOTHO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhotho",
|
||||
"dest_type": "numeric",
|
||||
"description": "Other Unit Cost (old)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHTOTO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhtoto",
|
||||
"dest_type": "numeric",
|
||||
"description": "Total Unit Cost (old)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHMATN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhmatn",
|
||||
"dest_type": "numeric",
|
||||
"description": "Material Unit Cost (new)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHLABN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhlabn",
|
||||
"dest_type": "numeric",
|
||||
"description": "Labour Unit Cost (new)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHBURN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhburn",
|
||||
"dest_type": "numeric",
|
||||
"description": "Burden Unit Cost (new)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHOTHN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhothn",
|
||||
"dest_type": "numeric",
|
||||
"description": "Other Unit Cost (new)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHTOTN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhtotn",
|
||||
"dest_type": "numeric",
|
||||
"description": "Total Unit Cost (new)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHBRFO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhbrfo",
|
||||
"dest_type": "numeric",
|
||||
"description": "Burden Unit Cost (Old Fixed)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHBRVO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhbrvo",
|
||||
"dest_type": "numeric",
|
||||
"description": "Burden Unit Cost (Old Var)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHBRFN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhbrfn",
|
||||
"dest_type": "numeric",
|
||||
"description": "Burden Unit Cost (New Fixed)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHBRVN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhbrvn",
|
||||
"dest_type": "numeric",
|
||||
"description": "Burden Unit Cost (New Variable)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHSHCO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhshco",
|
||||
"dest_type": "numeric",
|
||||
"description": "S & H Cost (old)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHCRCO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhcrco",
|
||||
"dest_type": "numeric",
|
||||
"description": "Currency Cost (old)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHSHCN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhshcn",
|
||||
"dest_type": "numeric",
|
||||
"description": "S & H Cost (new)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHCRCN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhcrcn",
|
||||
"dest_type": "numeric",
|
||||
"description": "Currency Cost (new)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHPLNT",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "jhplnt",
|
||||
"dest_type": "text",
|
||||
"description": "Plant Code"
|
||||
},
|
||||
{
|
||||
"source_name": "JHABSO",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "jhabso",
|
||||
"dest_type": "text",
|
||||
"description": "Absorbed or NonAbsorbed Cost (1/2)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHBOML",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "jhboml",
|
||||
"dest_type": "text",
|
||||
"description": "BOM Levels Recalculated (1=Yes,2=No)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHLLPT",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "jhllpt",
|
||||
"dest_type": "text",
|
||||
"description": "Lower Level Parts Recalculated (1=Yes,2=No)"
|
||||
},
|
||||
{
|
||||
"source_name": "JHCONQ",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "jhconq",
|
||||
"dest_type": "numeric",
|
||||
"description": "Issued quantity Against this receipt"
|
||||
},
|
||||
{
|
||||
"source_name": "JHCSTS",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "jhcsts",
|
||||
"dest_type": "text",
|
||||
"description": "Quantity issued record status"
|
||||
},
|
||||
{
|
||||
"source_name": "JHAVDN",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhavdn",
|
||||
"dest_type": "numeric",
|
||||
"description": "Duty cost New"
|
||||
},
|
||||
{
|
||||
"source_name": "JHAVDO",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhavdo",
|
||||
"dest_type": "numeric",
|
||||
"description": "Duty cost Old"
|
||||
},
|
||||
{
|
||||
"source_name": "JHAV1N",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhav1n",
|
||||
"dest_type": "numeric",
|
||||
"description": "Multiplier-1 Cost New"
|
||||
},
|
||||
{
|
||||
"source_name": "JHAV1O",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhav1o",
|
||||
"dest_type": "numeric",
|
||||
"description": "Multiplier-1 Cost Old"
|
||||
},
|
||||
{
|
||||
"source_name": "JHAV2N",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhav2n",
|
||||
"dest_type": "numeric",
|
||||
"description": "Multiplier-2 Cost New"
|
||||
},
|
||||
{
|
||||
"source_name": "JHAV2O",
|
||||
"source_type": "NUMERIC(13,5)",
|
||||
"dest_name": "jhav2o",
|
||||
"dest_type": "numeric",
|
||||
"description": "Multiplier-2 Cost Old"
|
||||
},
|
||||
{
|
||||
"source_name": "JHFUT1",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "jhfut1",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "JHFUT2",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "jhfut2",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "JHFUT3",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "jhfut3",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "JHFUT4",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "jhfut4",
|
||||
"dest_type": "numeric",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "JHFUT5",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "jhfut5",
|
||||
"dest_type": "numeric",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "JHFLG1",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "jhflg1",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "JHFLG2",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "jhflg2",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "JHFLG3",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "jhflg3",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "JHRCID",
|
||||
"source_type": "CHAR(12)",
|
||||
"dest_name": "jhrcid",
|
||||
"dest_type": "text",
|
||||
"description": "Record ID"
|
||||
},
|
||||
{
|
||||
"source_name": "JHCRCD",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "jhcrcd",
|
||||
"dest_type": "text",
|
||||
"description": "Last Actual Currency"
|
||||
},
|
||||
{
|
||||
"source_name": "JHOHQT",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "jhohqt",
|
||||
"dest_type": "numeric",
|
||||
"description": "Current On-Hand Qty"
|
||||
},
|
||||
{
|
||||
"source_name": "JHOQTA",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "jhoqta",
|
||||
"dest_type": "numeric",
|
||||
"description": "Cost On-Hand Qty"
|
||||
}
|
||||
],
|
||||
"watermarks": [
|
||||
{
|
||||
"name": "icstt_wm",
|
||||
"connection": "usmidsap02",
|
||||
"resolver_sql": "SELECT COALESCE(MAX(jhdate), DATE '2000-01-01') FROM cms.icstt WHERE jhdate <= current_date",
|
||||
"default_value": null
|
||||
}
|
||||
],
|
||||
"hooks": []
|
||||
}
|
||||
55
config/modules/icstt.sql
Normal file
55
config/modules/icstt.sql
Normal file
@ -0,0 +1,55 @@
|
||||
SELECT
|
||||
RTRIM(JHPART) AS jhpart,
|
||||
CASE WHEN JHDATE IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE JHDATE END AS jhdate,
|
||||
JHTIME AS jhtime,
|
||||
RTRIM("JHJOB#") AS "jhjob#",
|
||||
JHPONR AS jhponr,
|
||||
JHPITM AS jhpitm,
|
||||
RTRIM(JHUSER) AS jhuser,
|
||||
RTRIM(JHPROG) AS jhprog,
|
||||
JHCQTY AS jhcqty,
|
||||
RTRIM(JHCTYP) AS jhctyp,
|
||||
JHMATO AS jhmato,
|
||||
JHLABO AS jhlabo,
|
||||
JHBURO AS jhburo,
|
||||
JHOTHO AS jhotho,
|
||||
JHTOTO AS jhtoto,
|
||||
JHMATN AS jhmatn,
|
||||
JHLABN AS jhlabn,
|
||||
JHBURN AS jhburn,
|
||||
JHOTHN AS jhothn,
|
||||
JHTOTN AS jhtotn,
|
||||
JHBRFO AS jhbrfo,
|
||||
JHBRVO AS jhbrvo,
|
||||
JHBRFN AS jhbrfn,
|
||||
JHBRVN AS jhbrvn,
|
||||
JHSHCO AS jhshco,
|
||||
JHCRCO AS jhcrco,
|
||||
JHSHCN AS jhshcn,
|
||||
JHCRCN AS jhcrcn,
|
||||
RTRIM(JHPLNT) AS jhplnt,
|
||||
RTRIM(JHABSO) AS jhabso,
|
||||
RTRIM(JHBOML) AS jhboml,
|
||||
RTRIM(JHLLPT) AS jhllpt,
|
||||
JHCONQ AS jhconq,
|
||||
RTRIM(JHCSTS) AS jhcsts,
|
||||
JHAVDN AS jhavdn,
|
||||
JHAVDO AS jhavdo,
|
||||
JHAV1N AS jhav1n,
|
||||
JHAV1O AS jhav1o,
|
||||
JHAV2N AS jhav2n,
|
||||
JHAV2O AS jhav2o,
|
||||
RTRIM(JHFUT1) AS jhfut1,
|
||||
RTRIM(JHFUT2) AS jhfut2,
|
||||
RTRIM(JHFUT3) AS jhfut3,
|
||||
JHFUT4 AS jhfut4,
|
||||
JHFUT5 AS jhfut5,
|
||||
RTRIM(JHFLG1) AS jhflg1,
|
||||
RTRIM(JHFLG2) AS jhflg2,
|
||||
RTRIM(JHFLG3) AS jhflg3,
|
||||
RTRIM(JHRCID) AS jhrcid,
|
||||
RTRIM(JHCRCD) AS jhcrcd,
|
||||
JHOHQT AS jhohqt,
|
||||
JHOQTA AS jhoqta
|
||||
FROM LGDAT.ICSTT
|
||||
WHERE JHDATE >= '{icstt_wm}'
|
||||
71
config/modules/iprcct.json
Normal file
71
config/modules/iprcct.json
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
"name": "iprcct",
|
||||
"source_connection": "S78030956",
|
||||
"dest_connection": "usmidsap02",
|
||||
"dest_table": "cms.iprcct",
|
||||
"staging_table": "pipekit_staging.iprcct",
|
||||
"merge_strategy": "incremental",
|
||||
"merge_key": "tadate",
|
||||
"enabled": 1,
|
||||
"dest_description": "Price List Trans Log Headers 6.0",
|
||||
"columns": [
|
||||
{
|
||||
"source_name": "TAPLCD",
|
||||
"source_type": "CHAR(5)",
|
||||
"dest_name": "taplcd",
|
||||
"dest_type": "text",
|
||||
"description": "Price List Code"
|
||||
},
|
||||
{
|
||||
"source_name": "TAPART",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "tapart",
|
||||
"dest_type": "text",
|
||||
"description": "Part Number"
|
||||
},
|
||||
{
|
||||
"source_name": "TAUNIT",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "taunit",
|
||||
"dest_type": "text",
|
||||
"description": "Pricing Unit"
|
||||
},
|
||||
{
|
||||
"source_name": "TADATE",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "tadate",
|
||||
"dest_type": "date",
|
||||
"description": "Transaction Date"
|
||||
},
|
||||
{
|
||||
"source_name": "TATIME",
|
||||
"source_type": "TIME",
|
||||
"dest_name": "tatime",
|
||||
"dest_type": "time without time zone",
|
||||
"description": "Transaction Time"
|
||||
},
|
||||
{
|
||||
"source_name": "TAUSER",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "tauser",
|
||||
"dest_type": "text",
|
||||
"description": "User ID"
|
||||
},
|
||||
{
|
||||
"source_name": "TAPROG",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "taprog",
|
||||
"dest_type": "text",
|
||||
"description": "Program Number"
|
||||
}
|
||||
],
|
||||
"watermarks": [
|
||||
{
|
||||
"name": "iprcct_wm",
|
||||
"connection": "usmidsap02",
|
||||
"resolver_sql": "SELECT COALESCE(MAX(tadate), DATE '2000-01-01') FROM cms.iprcct",
|
||||
"default_value": null
|
||||
}
|
||||
],
|
||||
"hooks": []
|
||||
}
|
||||
10
config/modules/iprcct.sql
Normal file
10
config/modules/iprcct.sql
Normal file
@ -0,0 +1,10 @@
|
||||
SELECT
|
||||
RTRIM(TAPLCD) AS taplcd,
|
||||
RTRIM(TAPART) AS tapart,
|
||||
RTRIM(TAUNIT) AS taunit,
|
||||
CASE WHEN TADATE IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE TADATE END AS tadate,
|
||||
TATIME AS tatime,
|
||||
RTRIM(TAUSER) AS tauser,
|
||||
RTRIM(TAPROG) AS taprog
|
||||
FROM LGDAT.IPRCCT
|
||||
WHERE TADATE >= '{iprcct_wm}'
|
||||
176
config/modules/methh.json
Normal file
176
config/modules/methh.json
Normal file
@ -0,0 +1,176 @@
|
||||
{
|
||||
"name": "methh",
|
||||
"source_connection": "S78030956",
|
||||
"dest_connection": "usmidsap02",
|
||||
"dest_table": "cms.methh",
|
||||
"staging_table": "pipekit_staging.methh",
|
||||
"merge_strategy": "incremental",
|
||||
"merge_key": "anpart, anplnt",
|
||||
"enabled": 1,
|
||||
"dest_description": "Method Header File 6.0",
|
||||
"columns": [
|
||||
{
|
||||
"source_name": "ANPART",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "anpart",
|
||||
"dest_type": "text",
|
||||
"description": "Part Number"
|
||||
},
|
||||
{
|
||||
"source_name": "ANPREF",
|
||||
"source_type": "DECIMAL(3,0)",
|
||||
"dest_name": "anpref",
|
||||
"dest_type": "numeric",
|
||||
"description": "Production Preference"
|
||||
},
|
||||
{
|
||||
"source_name": "ANDATE",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "andate",
|
||||
"dest_type": "date",
|
||||
"description": "Last Updated"
|
||||
},
|
||||
{
|
||||
"source_name": "ANMATL",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "anmatl",
|
||||
"dest_type": "numeric",
|
||||
"description": "Material Records"
|
||||
},
|
||||
{
|
||||
"source_name": "ANOSDE",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "anosde",
|
||||
"dest_type": "numeric",
|
||||
"description": "O/S Records"
|
||||
},
|
||||
{
|
||||
"source_name": "ANROUT",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "anrout",
|
||||
"dest_type": "numeric",
|
||||
"description": "Routing Records"
|
||||
},
|
||||
{
|
||||
"source_name": "ANTOOL",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "antool",
|
||||
"dest_type": "numeric",
|
||||
"description": "Tooling Records"
|
||||
},
|
||||
{
|
||||
"source_name": "ANENGC",
|
||||
"source_type": "CHAR(11)",
|
||||
"dest_name": "anengc",
|
||||
"dest_type": "text",
|
||||
"description": "Engineering Change #"
|
||||
},
|
||||
{
|
||||
"source_name": "ANREVL",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "anrevl",
|
||||
"dest_type": "text",
|
||||
"description": "Revision Level"
|
||||
},
|
||||
{
|
||||
"source_name": "ANRDAT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "anrdat",
|
||||
"dest_type": "date",
|
||||
"description": "Revision Date"
|
||||
},
|
||||
{
|
||||
"source_name": "ANPLNT",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "anplnt",
|
||||
"dest_type": "text",
|
||||
"description": "Plant Code"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU01",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "anfu01",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU02",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "anfu02",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU03",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "anfu03",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU04",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "anfu04",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU05",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "anfu05",
|
||||
"dest_type": "numeric",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU06",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "anfu06",
|
||||
"dest_type": "numeric",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU07",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "anfu07",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU08",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "anfu08",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU09",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "anfu09",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU10",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "anfu10",
|
||||
"dest_type": "date",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "ANFU11",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "anfu11",
|
||||
"dest_type": "date",
|
||||
"description": "Future Use"
|
||||
}
|
||||
],
|
||||
"watermarks": [
|
||||
{
|
||||
"name": "methh_wm",
|
||||
"connection": "usmidsap02",
|
||||
"resolver_sql": "SELECT COALESCE(MAX(andate), DATE '0001-01-01') FROM cms.methh",
|
||||
"default_value": null
|
||||
}
|
||||
],
|
||||
"hooks": []
|
||||
}
|
||||
25
config/modules/methh.sql
Normal file
25
config/modules/methh.sql
Normal file
@ -0,0 +1,25 @@
|
||||
SELECT
|
||||
RTRIM(ANPART) AS anpart,
|
||||
ANPREF AS anpref,
|
||||
CASE WHEN ANDATE IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ANDATE END AS andate,
|
||||
ANMATL AS anmatl,
|
||||
ANOSDE AS anosde,
|
||||
ANROUT AS anrout,
|
||||
ANTOOL AS antool,
|
||||
RTRIM(ANENGC) AS anengc,
|
||||
RTRIM(ANREVL) AS anrevl,
|
||||
CASE WHEN ANRDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ANRDAT END AS anrdat,
|
||||
RTRIM(ANPLNT) AS anplnt,
|
||||
RTRIM(ANFU01) AS anfu01,
|
||||
RTRIM(ANFU02) AS anfu02,
|
||||
RTRIM(ANFU03) AS anfu03,
|
||||
RTRIM(ANFU04) AS anfu04,
|
||||
ANFU05 AS anfu05,
|
||||
ANFU06 AS anfu06,
|
||||
RTRIM(ANFU07) AS anfu07,
|
||||
RTRIM(ANFU08) AS anfu08,
|
||||
RTRIM(ANFU09) AS anfu09,
|
||||
CASE WHEN ANFU10 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ANFU10 END AS anfu10,
|
||||
CASE WHEN ANFU11 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ANFU11 END AS anfu11
|
||||
FROM LGDAT.METHH
|
||||
WHERE ANDATE >= '{methh_wm}'
|
||||
1107
config/modules/qcrh.json
Normal file
1107
config/modules/qcrh.json
Normal file
File diff suppressed because it is too large
Load Diff
158
config/modules/qcrh.sql
Normal file
158
config/modules/qcrh.sql
Normal file
@ -0,0 +1,158 @@
|
||||
SELECT
|
||||
"DCORD#" AS "dcord#",
|
||||
CASE WHEN DCODAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCODAT END AS dcodat,
|
||||
RTRIM(DCOTYP) AS dcotyp,
|
||||
RTRIM(DCIUSE) AS dciuse,
|
||||
RTRIM(DCBCUS) AS dcbcus,
|
||||
RTRIM(DCBNAM) AS dcbnam,
|
||||
RTRIM(DCBAD1) AS dcbad1,
|
||||
RTRIM(DCBATT) AS dcbatt,
|
||||
RTRIM(DCBPHO) AS dcbpho,
|
||||
RTRIM(DCTRCD) AS dctrcd,
|
||||
RTRIM(DCNU28) AS dcnu28,
|
||||
RTRIM(DCSHVI) AS dcshvi,
|
||||
RTRIM(DCSCUS) AS dcscus,
|
||||
RTRIM(DCSNAM) AS dcsnam,
|
||||
RTRIM(DCSAD1) AS dcsad1,
|
||||
RTRIM(DCSAD2) AS dcsad2,
|
||||
RTRIM(DCSAD3) AS dcsad3,
|
||||
RTRIM(DCSAD4) AS dcsad4,
|
||||
RTRIM(DCSAD5) AS dcsad5,
|
||||
RTRIM(DCSAD6) AS dcsad6,
|
||||
RTRIM(DCSAD7) AS dcsad7,
|
||||
RTRIM(DCSAD8) AS dcsad8,
|
||||
RTRIM(DCSAD9) AS dcsad9,
|
||||
RTRIM(DCSAD10) AS dcsad10,
|
||||
RTRIM(DCSPOS) AS dcspos,
|
||||
RTRIM(DCPO) AS dcpo,
|
||||
RTRIM(DCQUOT) AS dcquot,
|
||||
RTRIM(DCCURR) AS dccurr,
|
||||
CASE WHEN DCMDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCMDAT END AS dcmdat,
|
||||
RTRIM(DCSLMN) AS dcslmn,
|
||||
DCCPCT AS dccpct,
|
||||
DCCRAT AS dccrat,
|
||||
RTRIM(DCRES) AS dcres,
|
||||
RTRIM(DCFSTL) AS dcfstl,
|
||||
RTRIM(DCPSTL) AS dcpstl,
|
||||
RTRIM(DCPPCL) AS dcppcl,
|
||||
RTRIM(DCGDIS) AS dcgdis,
|
||||
RTRIM(DCGDSF) AS dcgdsf,
|
||||
RTRIM(DCSTAT) AS dcstat,
|
||||
RTRIM(DCWOPR) AS dcwopr,
|
||||
"DCNDL#" AS "dcndl#",
|
||||
DCTOTO AS dctoto,
|
||||
DCTDIS AS dctdis,
|
||||
DCTTAX AS dcttax,
|
||||
DCTFRT AS dctfrt,
|
||||
DCTWGT AS dctwgt,
|
||||
RTRIM(DCTWUN) AS dctwun,
|
||||
DCTVOL AS dctvol,
|
||||
RTRIM(DCTVUN) AS dctvun,
|
||||
RTRIM(DCAVPR) AS dcavpr,
|
||||
CASE WHEN DCUDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCUDAT END AS dcudat,
|
||||
RTRIM(DCUSRE) AS dcusre,
|
||||
RTRIM(DCUSRC) AS dcusrc,
|
||||
"DCINV#" AS "dcinv#",
|
||||
DCOBAL AS dcobal,
|
||||
RTRIM(DCARBK) AS dcarbk,
|
||||
RTRIM(DCSTKL) AS dcstkl,
|
||||
DCRFNO AS dcrfno,
|
||||
CASE WHEN DCXDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCXDAT END AS dcxdat,
|
||||
RTRIM(DCTERR) AS dcterr,
|
||||
RTRIM(DCSLIP) AS dcslip,
|
||||
RTRIM(DCCARC) AS dccarc,
|
||||
RTRIM(DCSERC) AS dcserc,
|
||||
CASE WHEN DCSDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCSDAT END AS dcsdat,
|
||||
CASE WHEN DCHDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCHDAT END AS dchdat,
|
||||
CASE WHEN DCDDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCDDAT END AS dcddat,
|
||||
CASE WHEN DCFDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCFDAT END AS dcfdat,
|
||||
CASE WHEN DCRDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCRDAT END AS dcrdat,
|
||||
CASE WHEN DCQDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCQDAT END AS dcqdat,
|
||||
CASE WHEN DCCDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCCDAT END AS dccdat,
|
||||
RTRIM(DCHREA) AS dchrea,
|
||||
RTRIM(DCBOFG) AS dcbofg,
|
||||
RTRIM(DCAPLG) AS dcaplg,
|
||||
RTRIM(DCFOBC) AS dcfobc,
|
||||
RTRIM(DCSCOM) AS dcscom,
|
||||
RTRIM(DCOSRC) AS dcosrc,
|
||||
RTRIM(DCOFXD) AS dcofxd,
|
||||
RTRIM(DCSLCS) AS dcslcs,
|
||||
RTRIM(DCCRTY) AS dccrty,
|
||||
RTRIM(DCCRDT) AS dccrdt,
|
||||
RTRIM("DCCRD#") AS "dccrd#",
|
||||
RTRIM(DCEXPR) AS dcexpr,
|
||||
RTRIM(DCHODR) AS dchodr,
|
||||
DCCRNM AS dccrnm,
|
||||
RTRIM(DCSHBF) AS dcshbf,
|
||||
RTRIM(DCCLEN) AS dcclen,
|
||||
DDFTTX AS ddfttx,
|
||||
RTRIM(DCFUT1) AS dcfut1,
|
||||
RTRIM(DCFUT2) AS dcfut2,
|
||||
RTRIM(DCFLG1) AS dcflg1,
|
||||
RTRIM(DCFLG2) AS dcflg2,
|
||||
RTRIM(DCREFN) AS dcrefn,
|
||||
RTRIM(DCPLNT) AS dcplnt,
|
||||
RTRIM(DCFUT3) AS dcfut3,
|
||||
RTRIM(DCFUT4) AS dcfut4,
|
||||
RTRIM(DCFUT5) AS dcfut5,
|
||||
RTRIM(DCFUT6) AS dcfut6,
|
||||
RTRIM(DCFUT7) AS dcfut7,
|
||||
RTRIM(DCFUT8) AS dcfut8,
|
||||
RTRIM(DCFUT9) AS dcfut9,
|
||||
CASE WHEN DCDAT1 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCDAT1 END AS dcdat1,
|
||||
CASE WHEN DCDAT2 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCDAT2 END AS dcdat2,
|
||||
RTRIM(DCFLG3) AS dcflg3,
|
||||
RTRIM(DCFLG4) AS dcflg4,
|
||||
RTRIM(DCFLG5) AS dcflg5,
|
||||
RTRIM(DCFLG6) AS dcflg6,
|
||||
RTRIM(DCFLG7) AS dcflg7,
|
||||
DCFUT10 AS dcfut10,
|
||||
DCFUT11 AS dcfut11,
|
||||
DCFUT12 AS dcfut12,
|
||||
DCFUT13 AS dcfut13,
|
||||
DCFUT14 AS dcfut14,
|
||||
DCFUT15 AS dcfut15,
|
||||
DCFUT16 AS dcfut16,
|
||||
DCFUT17 AS dcfut17,
|
||||
DCFUT18 AS dcfut18,
|
||||
DCFUT19 AS dcfut19,
|
||||
DCFUT20 AS dcfut20,
|
||||
RTRIM(DCDEPT) AS dcdept,
|
||||
RTRIM(DCPROM) AS dcprom,
|
||||
RTRIM(DCCLMO) AS dcclmo,
|
||||
RTRIM(DCTTMZ) AS dcttmz,
|
||||
RTRIM(DCCTMZ) AS dcctmz,
|
||||
RTRIM(DCOTMZ) AS dcotmz,
|
||||
RTRIM(DCMTMZ) AS dcmtmz,
|
||||
RTRIM(DCQTMZ) AS dcqtmz,
|
||||
RTRIM(DCSTMZ) AS dcstmz,
|
||||
DCMTME AS dcmtme,
|
||||
CASE WHEN DCMXDT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DCMXDT END AS dcmxdt,
|
||||
DCMXTM AS dcmxtm,
|
||||
RTRIM(DCR870) AS dcr870,
|
||||
RTRIM(DCS870) AS dcs870,
|
||||
RTRIM(DCFCHG) AS dcfchg,
|
||||
RTRIM(DCSTTP) AS dcsttp,
|
||||
RTRIM(DCSCNS) AS dcscns,
|
||||
RTRIM(DCOTMC) AS dcotmc,
|
||||
RTRIM(DCOFOM) AS dcofom,
|
||||
RTRIM(DCOFTM) AS dcoftm,
|
||||
RTRIM(DCAPPTM) AS dcapptm,
|
||||
RTRIM(DCEXPO) AS dcexpo,
|
||||
RTRIM(DCSDLV) AS dcsdlv,
|
||||
RTRIM(DCSPIC) AS dcspic,
|
||||
RTRIM(DCFRTC) AS dcfrtc,
|
||||
RTRIM(DCCPLT) AS dccplt,
|
||||
RTRIM(DCSDBC) AS dcsdbc,
|
||||
RTRIM(DCSDBS) AS dcsdbs,
|
||||
RTRIM(DCSDSC) AS dcsdsc,
|
||||
RTRIM(DCSDSS) AS dcsdss,
|
||||
RTRIM(DCSDCR) AS dcsdcr,
|
||||
RTRIM(DCSCPO) AS dcscpo,
|
||||
RTRIM(DCSCOR) AS dcscor,
|
||||
RTRIM(DCFROM) AS dcfrom,
|
||||
RTRIM(DCSCTY) AS dcscty,
|
||||
RTRIM(DCSPOV) AS dcspov,
|
||||
RTRIM(DCSCRY) AS dcscry
|
||||
FROM LGDAT.QCRH
|
||||
WHERE "DCORD#" >= {qcrh_wm}
|
||||
757
config/modules/qcri.json
Normal file
757
config/modules/qcri.json
Normal file
@ -0,0 +1,757 @@
|
||||
{
|
||||
"name": "qcri",
|
||||
"source_connection": "S78030956",
|
||||
"dest_connection": "usmidsap02",
|
||||
"dest_table": "cms.qcri",
|
||||
"staging_table": "pipekit_staging.qcri",
|
||||
"merge_strategy": "incremental",
|
||||
"merge_key": "ddord#",
|
||||
"enabled": 1,
|
||||
"dest_description": "Customer Order Item 6.1",
|
||||
"columns": [
|
||||
{
|
||||
"source_name": "DDORD#",
|
||||
"source_type": "NUMERIC(9,0)",
|
||||
"dest_name": "ddord#",
|
||||
"dest_type": "numeric",
|
||||
"description": "Customer Order Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDITM#",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "dditm#",
|
||||
"dest_type": "numeric",
|
||||
"description": "Item Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDDES#",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "dddes#",
|
||||
"dest_type": "numeric",
|
||||
"description": "Description Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQTOI",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "ddqtoi",
|
||||
"dest_type": "numeric",
|
||||
"description": "Quantity Ordered IU"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQTBI",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "ddqtbi",
|
||||
"dest_type": "numeric",
|
||||
"description": "Quantity Backordered IU"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQTSI",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "ddqtsi",
|
||||
"dest_type": "numeric",
|
||||
"description": "Quantity Shipped IU"
|
||||
},
|
||||
{
|
||||
"source_name": "DDUNIT",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddunit",
|
||||
"dest_type": "text",
|
||||
"description": "Unit of Measure"
|
||||
},
|
||||
{
|
||||
"source_name": "DDUNPR",
|
||||
"source_type": "NUMERIC(12,5)",
|
||||
"dest_name": "ddunpr",
|
||||
"dest_type": "numeric",
|
||||
"description": "Unit Price"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTOTI",
|
||||
"source_type": "NUMERIC(10,2)",
|
||||
"dest_name": "ddtoti",
|
||||
"dest_type": "numeric",
|
||||
"description": "Item Net Total"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSLMN",
|
||||
"source_type": "CHAR(5)",
|
||||
"dest_name": "ddslmn",
|
||||
"dest_type": "text",
|
||||
"description": "Salesman Code"
|
||||
},
|
||||
{
|
||||
"source_name": "DDCPCT",
|
||||
"source_type": "NUMERIC(4,2)",
|
||||
"dest_name": "ddcpct",
|
||||
"dest_type": "numeric",
|
||||
"description": "Comm. %"
|
||||
},
|
||||
{
|
||||
"source_name": "DDCRAT",
|
||||
"source_type": "NUMERIC(5,2)",
|
||||
"dest_name": "ddcrat",
|
||||
"dest_type": "numeric",
|
||||
"description": "Comm. Rate"
|
||||
},
|
||||
{
|
||||
"source_name": "DDAIND",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddaind",
|
||||
"dest_type": "text",
|
||||
"description": "Active Indicator"
|
||||
},
|
||||
{
|
||||
"source_name": "DDPTEX",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddptex",
|
||||
"dest_type": "text",
|
||||
"description": "PST Exempt"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFTCD",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddftcd",
|
||||
"dest_type": "text",
|
||||
"description": "FST Code"
|
||||
},
|
||||
{
|
||||
"source_name": "DDRDAT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddrdat",
|
||||
"dest_type": "date",
|
||||
"description": "Promise Date"
|
||||
},
|
||||
{
|
||||
"source_name": "DDMAJS",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddmajs",
|
||||
"dest_type": "text",
|
||||
"description": "Major Sales Code"
|
||||
},
|
||||
{
|
||||
"source_name": "DDMINS",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddmins",
|
||||
"dest_type": "text",
|
||||
"description": "Minor Sales Code"
|
||||
},
|
||||
{
|
||||
"source_name": "DDITST",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "dditst",
|
||||
"dest_type": "text",
|
||||
"description": "Status Open, B/o, Compl."
|
||||
},
|
||||
{
|
||||
"source_name": "DDPART",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ddpart",
|
||||
"dest_type": "text",
|
||||
"description": "Part Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDGLC",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddglc",
|
||||
"dest_type": "text",
|
||||
"description": "G/L Sales Code"
|
||||
},
|
||||
{
|
||||
"source_name": "DDCRRS",
|
||||
"source_type": "CHAR(2)",
|
||||
"dest_name": "ddcrrs",
|
||||
"dest_type": "text",
|
||||
"description": "Credit Reason"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSDAT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddsdat",
|
||||
"dest_type": "date",
|
||||
"description": "Ship Date"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTXGR",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddtxgr",
|
||||
"dest_type": "text",
|
||||
"description": "Tax Group"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTXRT",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddtxrt",
|
||||
"dest_type": "text",
|
||||
"description": "Tax Rate"
|
||||
},
|
||||
{
|
||||
"source_name": "DDNU07",
|
||||
"source_type": "CHAR(7)",
|
||||
"dest_name": "ddnu07",
|
||||
"dest_type": "text",
|
||||
"description": "Not used"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTMPS",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddtmps",
|
||||
"dest_type": "text",
|
||||
"description": "Temporary - Used by Release"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTEMP",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "ddtemp",
|
||||
"dest_type": "numeric",
|
||||
"description": "Temporary - Used by Release"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQTOO",
|
||||
"source_type": "NUMERIC(10,2)",
|
||||
"dest_name": "ddqtoo",
|
||||
"dest_type": "numeric",
|
||||
"description": "Quantity Ordered OU"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQTBO",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "ddqtbo",
|
||||
"dest_type": "numeric",
|
||||
"description": "Quantity Backordered OU"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQTSO",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "ddqtso",
|
||||
"dest_type": "numeric",
|
||||
"description": "Quantity Shipped OU"
|
||||
},
|
||||
{
|
||||
"source_name": "DDORUN",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddorun",
|
||||
"dest_type": "text",
|
||||
"description": "Order Unit"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQTSP",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "ddqtsp",
|
||||
"dest_type": "numeric",
|
||||
"description": "Quantity Shipped PU"
|
||||
},
|
||||
{
|
||||
"source_name": "DDPRUN",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddprun",
|
||||
"dest_type": "text",
|
||||
"description": "Pricing Unit"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTOTB",
|
||||
"source_type": "NUMERIC(10,2)",
|
||||
"dest_name": "ddtotb",
|
||||
"dest_type": "numeric",
|
||||
"description": "Base Total"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTDIS",
|
||||
"source_type": "NUMERIC(10,2)",
|
||||
"dest_name": "ddtdis",
|
||||
"dest_type": "numeric",
|
||||
"description": "Total Discounts"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTTAX",
|
||||
"source_type": "NUMERIC(10,2)",
|
||||
"dest_name": "ddttax",
|
||||
"dest_type": "numeric",
|
||||
"description": "Total Tax"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTFRT",
|
||||
"source_type": "NUMERIC(10,2)",
|
||||
"dest_name": "ddtfrt",
|
||||
"dest_type": "numeric",
|
||||
"description": "Total Freight"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTWGT",
|
||||
"source_type": "NUMERIC(10,2)",
|
||||
"dest_name": "ddtwgt",
|
||||
"dest_type": "numeric",
|
||||
"description": "Total Weight"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTWUN",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddtwun",
|
||||
"dest_type": "text",
|
||||
"description": "Weight Unit"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTVOL",
|
||||
"source_type": "NUMERIC(10,2)",
|
||||
"dest_name": "ddtvol",
|
||||
"dest_type": "numeric",
|
||||
"description": "Total Volume"
|
||||
},
|
||||
{
|
||||
"source_name": "DDTVUN",
|
||||
"source_type": "CHAR(3)",
|
||||
"dest_name": "ddtvun",
|
||||
"dest_type": "text",
|
||||
"description": "Volume Unit"
|
||||
},
|
||||
{
|
||||
"source_name": "DDODAT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddodat",
|
||||
"dest_type": "date",
|
||||
"description": "Original Date Requested"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSTKL",
|
||||
"source_type": "CHAR(6)",
|
||||
"dest_name": "ddstkl",
|
||||
"dest_type": "text",
|
||||
"description": "Stock Location"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSTOR",
|
||||
"source_type": "CHAR(17)",
|
||||
"dest_name": "ddstor",
|
||||
"dest_type": "text",
|
||||
"description": "Store Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDDDAT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddddat",
|
||||
"dest_type": "date",
|
||||
"description": "Don't Ship Before"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFDAT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddfdat",
|
||||
"dest_type": "date",
|
||||
"description": "Confirm Ship Date NOT USE"
|
||||
},
|
||||
{
|
||||
"source_name": "DDHDAT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddhdat",
|
||||
"dest_type": "date",
|
||||
"description": "Reschedule Date NOT USE"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQDAT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddqdat",
|
||||
"dest_type": "date",
|
||||
"description": "Request Date"
|
||||
},
|
||||
{
|
||||
"source_name": "DDCDAT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddcdat",
|
||||
"dest_type": "date",
|
||||
"description": "Cancel Date"
|
||||
},
|
||||
{
|
||||
"source_name": "DDOLST",
|
||||
"source_type": "NUMERIC(7,0)",
|
||||
"dest_name": "ddolst",
|
||||
"dest_type": "numeric",
|
||||
"description": "Option List"
|
||||
},
|
||||
{
|
||||
"source_name": "DDCTMS",
|
||||
"source_type": "TIMESTMP",
|
||||
"dest_name": "ddctms",
|
||||
"dest_type": "time without time zone",
|
||||
"description": "Item Created Timestamp"
|
||||
},
|
||||
{
|
||||
"source_name": "DDCUSR",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ddcusr",
|
||||
"dest_type": "text",
|
||||
"description": "Created By User"
|
||||
},
|
||||
{
|
||||
"source_name": "DDDBUY",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "dddbuy",
|
||||
"dest_type": "text",
|
||||
"description": "Direct Buy"
|
||||
},
|
||||
{
|
||||
"source_name": "DDREQ#",
|
||||
"source_type": "NUMERIC(9,0)",
|
||||
"dest_name": "ddreq#",
|
||||
"dest_type": "numeric",
|
||||
"description": "P/O Requisition Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDPJNM",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ddpjnm",
|
||||
"dest_type": "text",
|
||||
"description": "Project Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUT1",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddfut1",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUT2",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddfut2",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUT3",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddfut3",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUT4",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ddfut4",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUT5",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ddfut5",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUT6",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ddfut6",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUT7",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "ddfut7",
|
||||
"dest_type": "numeric",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUT8",
|
||||
"source_type": "NUMERIC(15,5)",
|
||||
"dest_name": "ddfut8",
|
||||
"dest_type": "numeric",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUT9",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ddfut9",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUTA",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ddfuta",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUTB",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ddfutb",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUTC",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ddfutc",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFUTD",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ddfutd",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use"
|
||||
},
|
||||
{
|
||||
"source_name": "DDWTCH",
|
||||
"source_type": "NUMERIC(9,0)",
|
||||
"dest_name": "ddwtch",
|
||||
"dest_type": "numeric",
|
||||
"description": "Warranty Claim Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDWTCI",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "ddwtci",
|
||||
"dest_type": "numeric",
|
||||
"description": "Warranty Claim Dtl #"
|
||||
},
|
||||
{
|
||||
"source_name": "DDLDSQ",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "ddldsq",
|
||||
"dest_type": "numeric",
|
||||
"description": "Load Sequence Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDRAN#",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ddran#",
|
||||
"dest_type": "text",
|
||||
"description": "Customer RAN Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDCTMZ",
|
||||
"source_type": "CHAR(4)",
|
||||
"dest_name": "ddctmz",
|
||||
"dest_type": "text",
|
||||
"description": "Cancel Date Time Zone"
|
||||
},
|
||||
{
|
||||
"source_name": "DDOTMZ",
|
||||
"source_type": "CHAR(4)",
|
||||
"dest_name": "ddotmz",
|
||||
"dest_type": "text",
|
||||
"description": "Original Date Requested Time Zone"
|
||||
},
|
||||
{
|
||||
"source_name": "DDRTMZ",
|
||||
"source_type": "CHAR(4)",
|
||||
"dest_name": "ddrtmz",
|
||||
"dest_type": "text",
|
||||
"description": "Promise Date Time Zone"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQTMZ",
|
||||
"source_type": "CHAR(4)",
|
||||
"dest_name": "ddqtmz",
|
||||
"dest_type": "text",
|
||||
"description": "Request Date Time Zone"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSTMZ",
|
||||
"source_type": "CHAR(4)",
|
||||
"dest_name": "ddstmz",
|
||||
"dest_type": "text",
|
||||
"description": "Ship Date Time Zone"
|
||||
},
|
||||
{
|
||||
"source_name": "DDRTME",
|
||||
"source_type": "NUMERIC(4,0)",
|
||||
"dest_name": "ddrtme",
|
||||
"dest_type": "numeric",
|
||||
"description": "Promise Time"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQTME",
|
||||
"source_type": "NUMERIC(4,0)",
|
||||
"dest_name": "ddqtme",
|
||||
"dest_type": "numeric",
|
||||
"description": "Request Time"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSTME",
|
||||
"source_type": "NUMERIC(4,0)",
|
||||
"dest_name": "ddstme",
|
||||
"dest_type": "numeric",
|
||||
"description": "Ship Time"
|
||||
},
|
||||
{
|
||||
"source_name": "DDRXDT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddrxdt",
|
||||
"dest_type": "date",
|
||||
"description": "Promise Date Cust TM"
|
||||
},
|
||||
{
|
||||
"source_name": "DDRXTM",
|
||||
"source_type": "NUMERIC(4,0)",
|
||||
"dest_name": "ddrxtm",
|
||||
"dest_type": "numeric",
|
||||
"description": "Promise Time Cust TM"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQXDT",
|
||||
"source_type": "DATE",
|
||||
"dest_name": "ddqxdt",
|
||||
"dest_type": "date",
|
||||
"description": "Request Date Cust TM"
|
||||
},
|
||||
{
|
||||
"source_name": "DDQXTM",
|
||||
"source_type": "NUMERIC(4,0)",
|
||||
"dest_name": "ddqxtm",
|
||||
"dest_type": "numeric",
|
||||
"description": "Request Time Cust TM"
|
||||
},
|
||||
{
|
||||
"source_name": "DDPTYP",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddptyp",
|
||||
"dest_type": "text",
|
||||
"description": "Pick Type"
|
||||
},
|
||||
{
|
||||
"source_name": "DDAWLS",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddawls",
|
||||
"dest_type": "text",
|
||||
"description": "Allow Late Shipment"
|
||||
},
|
||||
{
|
||||
"source_name": "DDPOIT",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "ddpoit",
|
||||
"dest_type": "numeric",
|
||||
"description": "Parent Order Item"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSRVC",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddsrvc",
|
||||
"dest_type": "text",
|
||||
"description": "Service Charge OCRI"
|
||||
},
|
||||
{
|
||||
"source_name": "DDPRCL",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddprcl",
|
||||
"dest_type": "text",
|
||||
"description": "Price Lock"
|
||||
},
|
||||
{
|
||||
"source_name": "DDAVAC",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddavac",
|
||||
"dest_type": "text",
|
||||
"description": "Availability Checked"
|
||||
},
|
||||
{
|
||||
"source_name": "DDDBAC",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "dddbac",
|
||||
"dest_type": "text",
|
||||
"description": "Direct Buy Action"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSCDP",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddscdp",
|
||||
"dest_type": "text",
|
||||
"description": "SCD Part"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSOCP",
|
||||
"source_type": "CHAR(30)",
|
||||
"dest_name": "ddsocp",
|
||||
"dest_type": "text",
|
||||
"description": "SCD Drop-Ship Orig. Cust. Part #"
|
||||
},
|
||||
{
|
||||
"source_name": "DDCSPI",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ddcspi",
|
||||
"dest_type": "text",
|
||||
"description": "Customer Purchase Order Item"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSCPI",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ddscpi",
|
||||
"dest_type": "text",
|
||||
"description": "SCD Drop-Ship Customer PO Item #"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSCOR",
|
||||
"source_type": "CHAR(30)",
|
||||
"dest_name": "ddscor",
|
||||
"dest_type": "text",
|
||||
"description": "SCD Tier-1 Order #"
|
||||
},
|
||||
{
|
||||
"source_name": "DDSCIM",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ddscim",
|
||||
"dest_type": "text",
|
||||
"description": "SCD Tier-1 Order Item #"
|
||||
},
|
||||
{
|
||||
"source_name": "DDREV#",
|
||||
"source_type": "CHAR(30)",
|
||||
"dest_name": "ddrev#",
|
||||
"dest_type": "text",
|
||||
"description": "Customer Revision Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDCSPA",
|
||||
"source_type": "CHAR(30)",
|
||||
"dest_name": "ddcspa",
|
||||
"dest_type": "text",
|
||||
"description": "Customer Alias Part Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDOITM",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "ddoitm",
|
||||
"dest_type": "numeric",
|
||||
"description": "Item Number"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFROM",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddfrom",
|
||||
"dest_type": "text",
|
||||
"description": "Order Origination"
|
||||
},
|
||||
{
|
||||
"source_name": "DDMMEL",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ddmmel",
|
||||
"dest_type": "text",
|
||||
"description": "Min/Max Lock"
|
||||
},
|
||||
{
|
||||
"source_name": "DDFEAT",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ddfeat",
|
||||
"dest_type": "text",
|
||||
"description": "Feature"
|
||||
},
|
||||
{
|
||||
"source_name": "DDOPTN",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ddoptn",
|
||||
"dest_type": "text",
|
||||
"description": "Option"
|
||||
}
|
||||
],
|
||||
"watermarks": [
|
||||
{
|
||||
"name": "qcri_wm",
|
||||
"connection": "usmidsap02",
|
||||
"resolver_sql": "SELECT COALESCE(MAX(\"ddord#\"),0) - 1000 FROM cms.qcri",
|
||||
"default_value": null
|
||||
}
|
||||
],
|
||||
"hooks": []
|
||||
}
|
||||
108
config/modules/qcri.sql
Normal file
108
config/modules/qcri.sql
Normal file
@ -0,0 +1,108 @@
|
||||
SELECT
|
||||
"DDORD#" AS "ddord#",
|
||||
"DDITM#" AS "dditm#",
|
||||
"DDDES#" AS "dddes#",
|
||||
DDQTOI AS ddqtoi,
|
||||
DDQTBI AS ddqtbi,
|
||||
DDQTSI AS ddqtsi,
|
||||
RTRIM(DDUNIT) AS ddunit,
|
||||
DDUNPR AS ddunpr,
|
||||
DDTOTI AS ddtoti,
|
||||
RTRIM(DDSLMN) AS ddslmn,
|
||||
DDCPCT AS ddcpct,
|
||||
DDCRAT AS ddcrat,
|
||||
RTRIM(DDAIND) AS ddaind,
|
||||
RTRIM(DDPTEX) AS ddptex,
|
||||
RTRIM(DDFTCD) AS ddftcd,
|
||||
CASE WHEN DDRDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDRDAT END AS ddrdat,
|
||||
RTRIM(DDMAJS) AS ddmajs,
|
||||
RTRIM(DDMINS) AS ddmins,
|
||||
RTRIM(DDITST) AS dditst,
|
||||
RTRIM(DDPART) AS ddpart,
|
||||
RTRIM(DDGLC) AS ddglc,
|
||||
RTRIM(DDCRRS) AS ddcrrs,
|
||||
CASE WHEN DDSDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDSDAT END AS ddsdat,
|
||||
RTRIM(DDTXGR) AS ddtxgr,
|
||||
RTRIM(DDTXRT) AS ddtxrt,
|
||||
RTRIM(DDNU07) AS ddnu07,
|
||||
RTRIM(DDTMPS) AS ddtmps,
|
||||
DDTEMP AS ddtemp,
|
||||
DDQTOO AS ddqtoo,
|
||||
DDQTBO AS ddqtbo,
|
||||
DDQTSO AS ddqtso,
|
||||
RTRIM(DDORUN) AS ddorun,
|
||||
DDQTSP AS ddqtsp,
|
||||
RTRIM(DDPRUN) AS ddprun,
|
||||
DDTOTB AS ddtotb,
|
||||
DDTDIS AS ddtdis,
|
||||
DDTTAX AS ddttax,
|
||||
DDTFRT AS ddtfrt,
|
||||
DDTWGT AS ddtwgt,
|
||||
RTRIM(DDTWUN) AS ddtwun,
|
||||
DDTVOL AS ddtvol,
|
||||
RTRIM(DDTVUN) AS ddtvun,
|
||||
CASE WHEN DDODAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDODAT END AS ddodat,
|
||||
RTRIM(DDSTKL) AS ddstkl,
|
||||
RTRIM(DDSTOR) AS ddstor,
|
||||
CASE WHEN DDDDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDDDAT END AS ddddat,
|
||||
CASE WHEN DDFDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDFDAT END AS ddfdat,
|
||||
CASE WHEN DDHDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDHDAT END AS ddhdat,
|
||||
CASE WHEN DDQDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDQDAT END AS ddqdat,
|
||||
CASE WHEN DDCDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDCDAT END AS ddcdat,
|
||||
DDOLST AS ddolst,
|
||||
DDCTMS AS ddctms,
|
||||
RTRIM(DDCUSR) AS ddcusr,
|
||||
RTRIM(DDDBUY) AS dddbuy,
|
||||
"DDREQ#" AS "ddreq#",
|
||||
RTRIM(DDPJNM) AS ddpjnm,
|
||||
RTRIM(DDFUT1) AS ddfut1,
|
||||
RTRIM(DDFUT2) AS ddfut2,
|
||||
RTRIM(DDFUT3) AS ddfut3,
|
||||
RTRIM(DDFUT4) AS ddfut4,
|
||||
RTRIM(DDFUT5) AS ddfut5,
|
||||
RTRIM(DDFUT6) AS ddfut6,
|
||||
DDFUT7 AS ddfut7,
|
||||
DDFUT8 AS ddfut8,
|
||||
RTRIM(DDFUT9) AS ddfut9,
|
||||
RTRIM(DDFUTA) AS ddfuta,
|
||||
RTRIM(DDFUTB) AS ddfutb,
|
||||
RTRIM(DDFUTC) AS ddfutc,
|
||||
RTRIM(DDFUTD) AS ddfutd,
|
||||
DDWTCH AS ddwtch,
|
||||
DDWTCI AS ddwtci,
|
||||
DDLDSQ AS ddldsq,
|
||||
RTRIM("DDRAN#") AS "ddran#",
|
||||
RTRIM(DDCTMZ) AS ddctmz,
|
||||
RTRIM(DDOTMZ) AS ddotmz,
|
||||
RTRIM(DDRTMZ) AS ddrtmz,
|
||||
RTRIM(DDQTMZ) AS ddqtmz,
|
||||
RTRIM(DDSTMZ) AS ddstmz,
|
||||
DDRTME AS ddrtme,
|
||||
DDQTME AS ddqtme,
|
||||
DDSTME AS ddstme,
|
||||
CASE WHEN DDRXDT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDRXDT END AS ddrxdt,
|
||||
DDRXTM AS ddrxtm,
|
||||
CASE WHEN DDQXDT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DDQXDT END AS ddqxdt,
|
||||
DDQXTM AS ddqxtm,
|
||||
RTRIM(DDPTYP) AS ddptyp,
|
||||
RTRIM(DDAWLS) AS ddawls,
|
||||
DDPOIT AS ddpoit,
|
||||
RTRIM(DDSRVC) AS ddsrvc,
|
||||
RTRIM(DDPRCL) AS ddprcl,
|
||||
RTRIM(DDAVAC) AS ddavac,
|
||||
RTRIM(DDDBAC) AS dddbac,
|
||||
RTRIM(DDSCDP) AS ddscdp,
|
||||
RTRIM(DDSOCP) AS ddsocp,
|
||||
RTRIM(DDCSPI) AS ddcspi,
|
||||
RTRIM(DDSCPI) AS ddscpi,
|
||||
RTRIM(DDSCOR) AS ddscor,
|
||||
RTRIM(DDSCIM) AS ddscim,
|
||||
RTRIM("DDREV#") AS "ddrev#",
|
||||
RTRIM(DDCSPA) AS ddcspa,
|
||||
DDOITM AS ddoitm,
|
||||
RTRIM(DDFROM) AS ddfrom,
|
||||
RTRIM(DDMMEL) AS ddmmel,
|
||||
RTRIM(DDFEAT) AS ddfeat,
|
||||
RTRIM(DDOPTN) AS ddoptn
|
||||
FROM LGDAT.QCRI
|
||||
WHERE "DDORD#" >= {qcri_wm}
|
||||
85
config/modules/qtnote.json
Normal file
85
config/modules/qtnote.json
Normal file
@ -0,0 +1,85 @@
|
||||
{
|
||||
"name": "qtnote",
|
||||
"source_connection": "S78030956",
|
||||
"dest_connection": "usmidsap02",
|
||||
"dest_table": "cms.qtnote",
|
||||
"staging_table": "pipekit_staging.qtnote",
|
||||
"merge_strategy": "incremental",
|
||||
"merge_key": "ggkey",
|
||||
"enabled": 1,
|
||||
"dest_description": "Note pad file 6.1",
|
||||
"columns": [
|
||||
{
|
||||
"source_name": "GGKEY",
|
||||
"source_type": "CHAR(20)",
|
||||
"dest_name": "ggkey",
|
||||
"dest_type": "text",
|
||||
"description": "Alpha Key"
|
||||
},
|
||||
{
|
||||
"source_name": "GGPAG#",
|
||||
"source_type": "NUMERIC(3,0)",
|
||||
"dest_name": "ggpag#",
|
||||
"dest_type": "numeric",
|
||||
"description": "Page Number"
|
||||
},
|
||||
{
|
||||
"source_name": "GGLIN#",
|
||||
"source_type": "NUMERIC(2,0)",
|
||||
"dest_name": "gglin#",
|
||||
"dest_type": "numeric",
|
||||
"description": "Line Number"
|
||||
},
|
||||
{
|
||||
"source_name": "GGTEXT",
|
||||
"source_type": "CHAR(75)",
|
||||
"dest_name": "ggtext",
|
||||
"dest_type": "text",
|
||||
"description": "Text"
|
||||
},
|
||||
{
|
||||
"source_name": "GGFUT1",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ggfut1",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use 1"
|
||||
},
|
||||
{
|
||||
"source_name": "GGFUT2",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ggfut2",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use 2"
|
||||
},
|
||||
{
|
||||
"source_name": "GGFUT3",
|
||||
"source_type": "CHAR(1)",
|
||||
"dest_name": "ggfut3",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use 3"
|
||||
},
|
||||
{
|
||||
"source_name": "GGFUT4",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ggfut4",
|
||||
"dest_type": "text",
|
||||
"description": "Create User ID"
|
||||
},
|
||||
{
|
||||
"source_name": "GGFUT5",
|
||||
"source_type": "CHAR(10)",
|
||||
"dest_name": "ggfut5",
|
||||
"dest_type": "text",
|
||||
"description": "Future Use 5"
|
||||
}
|
||||
],
|
||||
"watermarks": [
|
||||
{
|
||||
"name": "qtnote_wm",
|
||||
"connection": "usmidsap02",
|
||||
"resolver_sql": "SELECT LPAD((substring(COALESCE(MAX(ggkey),'0'),1,9)::bigint - 10000)||'001',12,'0') FROM cms.qtnote",
|
||||
"default_value": null
|
||||
}
|
||||
],
|
||||
"hooks": []
|
||||
}
|
||||
12
config/modules/qtnote.sql
Normal file
12
config/modules/qtnote.sql
Normal file
@ -0,0 +1,12 @@
|
||||
SELECT
|
||||
RTRIM(GGKEY) AS ggkey,
|
||||
"GGPAG#" AS "ggpag#",
|
||||
"GGLIN#" AS "gglin#",
|
||||
RTRIM(GGTEXT) AS ggtext,
|
||||
RTRIM(GGFUT1) AS ggfut1,
|
||||
RTRIM(GGFUT2) AS ggfut2,
|
||||
RTRIM(GGFUT3) AS ggfut3,
|
||||
RTRIM(GGFUT4) AS ggfut4,
|
||||
RTRIM(GGFUT5) AS ggfut5
|
||||
FROM LGDAT.QTNOTE
|
||||
WHERE GGKEY >= '{qtnote_wm}'
|
||||
Loading…
Reference in New Issue
Block a user