diff --git a/config/modules/icstt.json b/config/modules/icstt.json new file mode 100644 index 0000000..5171e2c --- /dev/null +++ b/config/modules/icstt.json @@ -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": [] +} diff --git a/config/modules/icstt.sql b/config/modules/icstt.sql new file mode 100644 index 0000000..4062b12 --- /dev/null +++ b/config/modules/icstt.sql @@ -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}' diff --git a/config/modules/iprcct.json b/config/modules/iprcct.json new file mode 100644 index 0000000..3c035ac --- /dev/null +++ b/config/modules/iprcct.json @@ -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": [] +} diff --git a/config/modules/iprcct.sql b/config/modules/iprcct.sql new file mode 100644 index 0000000..aca8537 --- /dev/null +++ b/config/modules/iprcct.sql @@ -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}' diff --git a/config/modules/methh.json b/config/modules/methh.json new file mode 100644 index 0000000..d9661a2 --- /dev/null +++ b/config/modules/methh.json @@ -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": [] +} diff --git a/config/modules/methh.sql b/config/modules/methh.sql new file mode 100644 index 0000000..e50a83d --- /dev/null +++ b/config/modules/methh.sql @@ -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}' diff --git a/config/modules/qcrh.json b/config/modules/qcrh.json new file mode 100644 index 0000000..7068820 --- /dev/null +++ b/config/modules/qcrh.json @@ -0,0 +1,1107 @@ +{ + "name": "qcrh", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.qcrh", + "staging_table": "pipekit_staging.qcrh", + "merge_strategy": "incremental", + "merge_key": "dcord#", + "enabled": 1, + "dest_description": "Customer Order Header 6.1", + "columns": [ + { + "source_name": "DCORD#", + "source_type": "NUMERIC(9,0)", + "dest_name": "dcord#", + "dest_type": "numeric", + "description": "Customer Order Number" + }, + { + "source_name": "DCODAT", + "source_type": "DATE", + "dest_name": "dcodat", + "dest_type": "date", + "description": "Date Entered" + }, + { + "source_name": "DCOTYP", + "source_type": "CHAR(1)", + "dest_name": "dcotyp", + "dest_type": "text", + "description": "Order Type: Blanket/Standard" + }, + { + "source_name": "DCIUSE", + "source_type": "CHAR(1)", + "dest_name": "dciuse", + "dest_type": "text", + "description": "Order In Use" + }, + { + "source_name": "DCBCUS", + "source_type": "CHAR(8)", + "dest_name": "dcbcus", + "dest_type": "text", + "description": "Bill-to Customer" + }, + { + "source_name": "DCBNAM", + "source_type": "CHAR(30)", + "dest_name": "dcbnam", + "dest_type": "text", + "description": "Bill-to Name" + }, + { + "source_name": "DCBAD1", + "source_type": "CHAR(35)", + "dest_name": "dcbad1", + "dest_type": "text", + "description": "Bill-to Address" + }, + { + "source_name": "DCBATT", + "source_type": "CHAR(25)", + "dest_name": "dcbatt", + "dest_type": "text", + "description": "Attention" + }, + { + "source_name": "DCBPHO", + "source_type": "CHAR(20)", + "dest_name": "dcbpho", + "dest_type": "text", + "description": "Phone Number" + }, + { + "source_name": "DCTRCD", + "source_type": "CHAR(2)", + "dest_name": "dctrcd", + "dest_type": "text", + "description": "Terms Code" + }, + { + "source_name": "DCNU28", + "source_type": "CHAR(28)", + "dest_name": "dcnu28", + "dest_type": "text", + "description": "Exempt/Export Permit" + }, + { + "source_name": "DCSHVI", + "source_type": "CHAR(30)", + "dest_name": "dcshvi", + "dest_type": "text", + "description": "Ship Via" + }, + { + "source_name": "DCSCUS", + "source_type": "CHAR(8)", + "dest_name": "dcscus", + "dest_type": "text", + "description": "Ship-to Customer" + }, + { + "source_name": "DCSNAM", + "source_type": "CHAR(30)", + "dest_name": "dcsnam", + "dest_type": "text", + "description": "Ship-to Name" + }, + { + "source_name": "DCSAD1", + "source_type": "CHAR(35)", + "dest_name": "dcsad1", + "dest_type": "text", + "description": "Ship-to Address 1" + }, + { + "source_name": "DCSAD2", + "source_type": "CHAR(35)", + "dest_name": "dcsad2", + "dest_type": "text", + "description": "Ship-to Address 2" + }, + { + "source_name": "DCSAD3", + "source_type": "CHAR(35)", + "dest_name": "dcsad3", + "dest_type": "text", + "description": "Ship-to Address 3" + }, + { + "source_name": "DCSAD4", + "source_type": "CHAR(35)", + "dest_name": "dcsad4", + "dest_type": "text", + "description": "Ship-to Address 4" + }, + { + "source_name": "DCSAD5", + "source_type": "CHAR(35)", + "dest_name": "dcsad5", + "dest_type": "text", + "description": "Ship-to Address 5" + }, + { + "source_name": "DCSAD6", + "source_type": "CHAR(35)", + "dest_name": "dcsad6", + "dest_type": "text", + "description": "Ship-to Address 6" + }, + { + "source_name": "DCSAD7", + "source_type": "CHAR(35)", + "dest_name": "dcsad7", + "dest_type": "text", + "description": "Ship-to Address 7" + }, + { + "source_name": "DCSAD8", + "source_type": "CHAR(35)", + "dest_name": "dcsad8", + "dest_type": "text", + "description": "Ship-to Address 8" + }, + { + "source_name": "DCSAD9", + "source_type": "CHAR(35)", + "dest_name": "dcsad9", + "dest_type": "text", + "description": "Ship-to Address 9" + }, + { + "source_name": "DCSAD10", + "source_type": "CHAR(35)", + "dest_name": "dcsad10", + "dest_type": "text", + "description": "Ship-to Address 10" + }, + { + "source_name": "DCSPOS", + "source_type": "CHAR(30)", + "dest_name": "dcspos", + "dest_type": "text", + "description": "Ship-to Postal Code" + }, + { + "source_name": "DCPO", + "source_type": "CHAR(30)", + "dest_name": "dcpo", + "dest_type": "text", + "description": "Purchase Order" + }, + { + "source_name": "DCQUOT", + "source_type": "CHAR(12)", + "dest_name": "dcquot", + "dest_type": "text", + "description": "Quote Number" + }, + { + "source_name": "DCCURR", + "source_type": "CHAR(2)", + "dest_name": "dccurr", + "dest_type": "text", + "description": "Currency Code" + }, + { + "source_name": "DCMDAT", + "source_type": "DATE", + "dest_name": "dcmdat", + "dest_type": "date", + "description": "Promise Date" + }, + { + "source_name": "DCSLMN", + "source_type": "CHAR(5)", + "dest_name": "dcslmn", + "dest_type": "text", + "description": "Salesman Code" + }, + { + "source_name": "DCCPCT", + "source_type": "NUMERIC(4,2)", + "dest_name": "dccpct", + "dest_type": "numeric", + "description": "Commission percentage" + }, + { + "source_name": "DCCRAT", + "source_type": "NUMERIC(5,2)", + "dest_name": "dccrat", + "dest_type": "numeric", + "description": "Commission rate" + }, + { + "source_name": "DCRES", + "source_type": "CHAR(5)", + "dest_name": "dcres", + "dest_type": "text", + "description": "Reserve" + }, + { + "source_name": "DCFSTL", + "source_type": "CHAR(20)", + "dest_name": "dcfstl", + "dest_type": "text", + "description": "FST Licence" + }, + { + "source_name": "DCPSTL", + "source_type": "CHAR(20)", + "dest_name": "dcpstl", + "dest_type": "text", + "description": "PST Licence" + }, + { + "source_name": "DCPPCL", + "source_type": "CHAR(1)", + "dest_name": "dcppcl", + "dest_type": "text", + "description": "Prepaid Collect" + }, + { + "source_name": "DCGDIS", + "source_type": "CHAR(3)", + "dest_name": "dcgdis", + "dest_type": "text", + "description": "Global Discount Code" + }, + { + "source_name": "DCGDSF", + "source_type": "CHAR(1)", + "dest_name": "dcgdsf", + "dest_type": "text", + "description": "Global Discount Flag" + }, + { + "source_name": "DCSTAT", + "source_type": "CHAR(1)", + "dest_name": "dcstat", + "dest_type": "text", + "description": "Status New, A, B/o, Comp" + }, + { + "source_name": "DCWOPR", + "source_type": "CHAR(1)", + "dest_name": "dcwopr", + "dest_type": "text", + "description": "Work Order Print Status" + }, + { + "source_name": "DCNDL#", + "source_type": "NUMERIC(3,0)", + "dest_name": "dcndl#", + "dest_type": "numeric", + "description": "Next description line no" + }, + { + "source_name": "DCTOTO", + "source_type": "NUMERIC(10,2)", + "dest_name": "dctoto", + "dest_type": "numeric", + "description": "Net Total" + }, + { + "source_name": "DCTDIS", + "source_type": "NUMERIC(10,2)", + "dest_name": "dctdis", + "dest_type": "numeric", + "description": "Total Discounts" + }, + { + "source_name": "DCTTAX", + "source_type": "NUMERIC(10,2)", + "dest_name": "dcttax", + "dest_type": "numeric", + "description": "Tax Total" + }, + { + "source_name": "DCTFRT", + "source_type": "NUMERIC(10,2)", + "dest_name": "dctfrt", + "dest_type": "numeric", + "description": "Freight Total" + }, + { + "source_name": "DCTWGT", + "source_type": "NUMERIC(10,2)", + "dest_name": "dctwgt", + "dest_type": "numeric", + "description": "Weight Total" + }, + { + "source_name": "DCTWUN", + "source_type": "CHAR(3)", + "dest_name": "dctwun", + "dest_type": "text", + "description": "Weight Unit" + }, + { + "source_name": "DCTVOL", + "source_type": "NUMERIC(10,2)", + "dest_name": "dctvol", + "dest_type": "numeric", + "description": "Volume Total" + }, + { + "source_name": "DCTVUN", + "source_type": "CHAR(3)", + "dest_name": "dctvun", + "dest_type": "text", + "description": "Volume Unit" + }, + { + "source_name": "DCAVPR", + "source_type": "CHAR(1)", + "dest_name": "dcavpr", + "dest_type": "text", + "description": "Available for Production" + }, + { + "source_name": "DCUDAT", + "source_type": "DATE", + "dest_name": "dcudat", + "dest_type": "date", + "description": "Date Changed" + }, + { + "source_name": "DCUSRE", + "source_type": "CHAR(10)", + "dest_name": "dcusre", + "dest_type": "text", + "description": "Entered by User" + }, + { + "source_name": "DCUSRC", + "source_type": "CHAR(10)", + "dest_name": "dcusrc", + "dest_type": "text", + "description": "Changed by User" + }, + { + "source_name": "DCINV#", + "source_type": "NUMERIC(9,0)", + "dest_name": "dcinv#", + "dest_type": "numeric", + "description": "Last Invoice Created" + }, + { + "source_name": "DCOBAL", + "source_type": "NUMERIC(10,2)", + "dest_name": "dcobal", + "dest_type": "numeric", + "description": "Order Balance" + }, + { + "source_name": "DCARBK", + "source_type": "CHAR(3)", + "dest_name": "dcarbk", + "dest_type": "text", + "description": "A/R Bank Code" + }, + { + "source_name": "DCSTKL", + "source_type": "CHAR(6)", + "dest_name": "dcstkl", + "dest_type": "text", + "description": "Default Stock Loc" + }, + { + "source_name": "DCRFNO", + "source_type": "NUMERIC(9,0)", + "dest_name": "dcrfno", + "dest_type": "numeric", + "description": "Reference Invoice" + }, + { + "source_name": "DCXDAT", + "source_type": "DATE", + "dest_name": "dcxdat", + "dest_type": "date", + "description": "Reference Date" + }, + { + "source_name": "DCTERR", + "source_type": "CHAR(4)", + "dest_name": "dcterr", + "dest_type": "text", + "description": "Territory Code" + }, + { + "source_name": "DCSLIP", + "source_type": "CHAR(1)", + "dest_name": "dcslip", + "dest_type": "text", + "description": "Credit Print Status" + }, + { + "source_name": "DCCARC", + "source_type": "CHAR(17)", + "dest_name": "dccarc", + "dest_type": "text", + "description": "Carrier Code" + }, + { + "source_name": "DCSERC", + "source_type": "CHAR(3)", + "dest_name": "dcserc", + "dest_type": "text", + "description": "Service Code" + }, + { + "source_name": "DCSDAT", + "source_type": "DATE", + "dest_name": "dcsdat", + "dest_type": "date", + "description": "Shipped Date" + }, + { + "source_name": "DCHDAT", + "source_type": "DATE", + "dest_name": "dchdat", + "dest_type": "date", + "description": "Credit Hold Date NOT USE" + }, + { + "source_name": "DCDDAT", + "source_type": "DATE", + "dest_name": "dcddat", + "dest_type": "date", + "description": "Don't Ship Before" + }, + { + "source_name": "DCFDAT", + "source_type": "DATE", + "dest_name": "dcfdat", + "dest_type": "date", + "description": "Confirm Ship Date NOT USE" + }, + { + "source_name": "DCRDAT", + "source_type": "DATE", + "dest_name": "dcrdat", + "dest_type": "date", + "description": "Reschedule Date NOT USE" + }, + { + "source_name": "DCQDAT", + "source_type": "DATE", + "dest_name": "dcqdat", + "dest_type": "date", + "description": "Request Date" + }, + { + "source_name": "DCCDAT", + "source_type": "DATE", + "dest_name": "dccdat", + "dest_type": "date", + "description": "Cancel Date" + }, + { + "source_name": "DCHREA", + "source_type": "CHAR(2)", + "dest_name": "dchrea", + "dest_type": "text", + "description": "Hold Status Reason Code" + }, + { + "source_name": "DCBOFG", + "source_type": "CHAR(1)", + "dest_name": "dcbofg", + "dest_type": "text", + "description": "Allow Back Order Code" + }, + { + "source_name": "DCAPLG", + "source_type": "CHAR(1)", + "dest_name": "dcaplg", + "dest_type": "text", + "description": "Auto Pick List Create" + }, + { + "source_name": "DCFOBC", + "source_type": "CHAR(3)", + "dest_name": "dcfobc", + "dest_type": "text", + "description": "FOB Code" + }, + { + "source_name": "DCSCOM", + "source_type": "CHAR(1)", + "dest_name": "dcscom", + "dest_type": "text", + "description": "Ship Complete" + }, + { + "source_name": "DCOSRC", + "source_type": "CHAR(3)", + "dest_name": "dcosrc", + "dest_type": "text", + "description": "Order Source Man/Edi/Fax" + }, + { + "source_name": "DCOFXD", + "source_type": "CHAR(1)", + "dest_name": "dcofxd", + "dest_type": "text", + "description": "Order Faxed" + }, + { + "source_name": "DCSLCS", + "source_type": "CHAR(8)", + "dest_name": "dcslcs", + "dest_type": "text", + "description": "Sold from Customer" + }, + { + "source_name": "DCCRTY", + "source_type": "CHAR(1)", + "dest_name": "dccrty", + "dest_type": "text", + "description": "Pay By Credit card" + }, + { + "source_name": "DCCRDT", + "source_type": "CHAR(2)", + "dest_name": "dccrdt", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "DCCRD#", + "source_type": "CHAR(16)", + "dest_name": "dccrd#", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "DCEXPR", + "source_type": "CHAR(8)", + "dest_name": "dcexpr", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "DCHODR", + "source_type": "CHAR(30)", + "dest_name": "dchodr", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "DCCRNM", + "source_type": "NUMERIC(10,2)", + "dest_name": "dccrnm", + "dest_type": "numeric", + "description": "Need Authorized Amount" + }, + { + "source_name": "DCSHBF", + "source_type": "CHAR(1)", + "dest_name": "dcshbf", + "dest_type": "text", + "description": "Allow ship Before auth." + }, + { + "source_name": "DCCLEN", + "source_type": "CHAR(20)", + "dest_name": "dcclen", + "dest_type": "text", + "description": "Customer Client Number" + }, + { + "source_name": "DDFTTX", + "source_type": "NUMERIC(10,2)", + "dest_name": "ddfttx", + "dest_type": "numeric", + "description": "Global Quantity" + }, + { + "source_name": "DCFUT1", + "source_type": "CHAR(10)", + "dest_name": "dcfut1", + "dest_type": "text", + "description": "Future Field 1" + }, + { + "source_name": "DCFUT2", + "source_type": "CHAR(10)", + "dest_name": "dcfut2", + "dest_type": "text", + "description": "Future Field" + }, + { + "source_name": "DCFLG1", + "source_type": "CHAR(1)", + "dest_name": "dcflg1", + "dest_type": "text", + "description": "Future Flag" + }, + { + "source_name": "DCFLG2", + "source_type": "CHAR(1)", + "dest_name": "dcflg2", + "dest_type": "text", + "description": "Future Flag" + }, + { + "source_name": "DCREFN", + "source_type": "CHAR(20)", + "dest_name": "dcrefn", + "dest_type": "text", + "description": "Cust. Reference" + }, + { + "source_name": "DCPLNT", + "source_type": "CHAR(3)", + "dest_name": "dcplnt", + "dest_type": "text", + "description": "Plant Code" + }, + { + "source_name": "DCFUT3", + "source_type": "CHAR(10)", + "dest_name": "dcfut3", + "dest_type": "text", + "description": "Future Field" + }, + { + "source_name": "DCFUT4", + "source_type": "CHAR(10)", + "dest_name": "dcfut4", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DCFUT5", + "source_type": "CHAR(15)", + "dest_name": "dcfut5", + "dest_type": "text", + "description": "Future Field 5" + }, + { + "source_name": "DCFUT6", + "source_type": "CHAR(15)", + "dest_name": "dcfut6", + "dest_type": "text", + "description": "Future Field 6" + }, + { + "source_name": "DCFUT7", + "source_type": "CHAR(20)", + "dest_name": "dcfut7", + "dest_type": "text", + "description": "Future Field 7" + }, + { + "source_name": "DCFUT8", + "source_type": "CHAR(20)", + "dest_name": "dcfut8", + "dest_type": "text", + "description": "Future Field 8" + }, + { + "source_name": "DCFUT9", + "source_type": "CHAR(30)", + "dest_name": "dcfut9", + "dest_type": "text", + "description": "Future Field 9" + }, + { + "source_name": "DCDAT1", + "source_type": "DATE", + "dest_name": "dcdat1", + "dest_type": "date", + "description": "Orig. Required Date" + }, + { + "source_name": "DCDAT2", + "source_type": "DATE", + "dest_name": "dcdat2", + "dest_type": "date", + "description": "Future Date 2" + }, + { + "source_name": "DCFLG3", + "source_type": "CHAR(1)", + "dest_name": "dcflg3", + "dest_type": "text", + "description": "Future Flag" + }, + { + "source_name": "DCFLG4", + "source_type": "CHAR(1)", + "dest_name": "dcflg4", + "dest_type": "text", + "description": "System-Stamped Credit Hold at Order Creation" + }, + { + "source_name": "DCFLG5", + "source_type": "CHAR(1)", + "dest_name": "dcflg5", + "dest_type": "text", + "description": "Future Flag" + }, + { + "source_name": "DCFLG6", + "source_type": "CHAR(1)", + "dest_name": "dcflg6", + "dest_type": "text", + "description": "Use Multi-Orders Discount Package" + }, + { + "source_name": "DCFLG7", + "source_type": "CHAR(1)", + "dest_name": "dcflg7", + "dest_type": "text", + "description": "Web-Service In-Use" + }, + { + "source_name": "DCFUT10", + "source_type": "NUMERIC(10,0)", + "dest_name": "dcfut10", + "dest_type": "numeric", + "description": "Future Field 10" + }, + { + "source_name": "DCFUT11", + "source_type": "NUMERIC(10,0)", + "dest_name": "dcfut11", + "dest_type": "numeric", + "description": "Future Field 11" + }, + { + "source_name": "DCFUT12", + "source_type": "NUMERIC(11,2)", + "dest_name": "dcfut12", + "dest_type": "numeric", + "description": "Future Field 12" + }, + { + "source_name": "DCFUT13", + "source_type": "NUMERIC(11,2)", + "dest_name": "dcfut13", + "dest_type": "numeric", + "description": "Future Field 13" + }, + { + "source_name": "DCFUT14", + "source_type": "NUMERIC(15,5)", + "dest_name": "dcfut14", + "dest_type": "numeric", + "description": "Future Field 14" + }, + { + "source_name": "DCFUT15", + "source_type": "NUMERIC(15,5)", + "dest_name": "dcfut15", + "dest_type": "numeric", + "description": "Future Field 15" + }, + { + "source_name": "DCFUT16", + "source_type": "NUMERIC(15,5)", + "dest_name": "dcfut16", + "dest_type": "numeric", + "description": "Future Field 16" + }, + { + "source_name": "DCFUT17", + "source_type": "NUMERIC(3,0)", + "dest_name": "dcfut17", + "dest_type": "numeric", + "description": "Future Field 17" + }, + { + "source_name": "DCFUT18", + "source_type": "NUMERIC(3,0)", + "dest_name": "dcfut18", + "dest_type": "numeric", + "description": "Future Field 18" + }, + { + "source_name": "DCFUT19", + "source_type": "NUMERIC(5,0)", + "dest_name": "dcfut19", + "dest_type": "numeric", + "description": "Future Field 19" + }, + { + "source_name": "DCFUT20", + "source_type": "NUMERIC(5,0)", + "dest_name": "dcfut20", + "dest_type": "numeric", + "description": "Future Field 20" + }, + { + "source_name": "DCDEPT", + "source_type": "CHAR(30)", + "dest_name": "dcdept", + "dest_type": "text", + "description": "Department Number" + }, + { + "source_name": "DCPROM", + "source_type": "CHAR(35)", + "dest_name": "dcprom", + "dest_type": "text", + "description": "Promotion Number" + }, + { + "source_name": "DCCLMO", + "source_type": "CHAR(1)", + "dest_name": "dcclmo", + "dest_type": "text", + "description": "Claim Order" + }, + { + "source_name": "DCTTMZ", + "source_type": "CHAR(4)", + "dest_name": "dcttmz", + "dest_type": "text", + "description": "Customer Time Zone" + }, + { + "source_name": "DCCTMZ", + "source_type": "CHAR(4)", + "dest_name": "dcctmz", + "dest_type": "text", + "description": "Cancel Date Time Zone" + }, + { + "source_name": "DCOTMZ", + "source_type": "CHAR(4)", + "dest_name": "dcotmz", + "dest_type": "text", + "description": "Date Entered Time Zone" + }, + { + "source_name": "DCMTMZ", + "source_type": "CHAR(4)", + "dest_name": "dcmtmz", + "dest_type": "text", + "description": "Promise Date Time Zone" + }, + { + "source_name": "DCQTMZ", + "source_type": "CHAR(4)", + "dest_name": "dcqtmz", + "dest_type": "text", + "description": "Request Date Time Zone" + }, + { + "source_name": "DCSTMZ", + "source_type": "CHAR(4)", + "dest_name": "dcstmz", + "dest_type": "text", + "description": "Ship Date Time Zone" + }, + { + "source_name": "DCMTME", + "source_type": "NUMERIC(4,0)", + "dest_name": "dcmtme", + "dest_type": "numeric", + "description": "Promise Time" + }, + { + "source_name": "DCMXDT", + "source_type": "DATE", + "dest_name": "dcmxdt", + "dest_type": "date", + "description": "Promise Date Cust TM" + }, + { + "source_name": "DCMXTM", + "source_type": "NUMERIC(4,0)", + "dest_name": "dcmxtm", + "dest_type": "numeric", + "description": "Promise Time Cust TM" + }, + { + "source_name": "DCR870", + "source_type": "CHAR(1)", + "dest_name": "dcr870", + "dest_type": "text", + "description": "Require Order Status Report (870)" + }, + { + "source_name": "DCS870", + "source_type": "CHAR(1)", + "dest_name": "dcs870", + "dest_type": "text", + "description": "Order Status Report (870) Completion Flag" + }, + { + "source_name": "DCFCHG", + "source_type": "CHAR(1)", + "dest_name": "dcfchg", + "dest_type": "text", + "description": "Frt. Code Manual Change Flag" + }, + { + "source_name": "DCSTTP", + "source_type": "CHAR(1)", + "dest_name": "dcsttp", + "dest_type": "text", + "description": "Ship-To Type" + }, + { + "source_name": "DCSCNS", + "source_type": "CHAR(8)", + "dest_name": "dcscns", + "dest_type": "text", + "description": "Ship-To Consumer" + }, + { + "source_name": "DCOTMC", + "source_type": "CHAR(2)", + "dest_name": "dcotmc", + "dest_type": "text", + "description": "original Term Code before PPC" + }, + { + "source_name": "DCOFOM", + "source_type": "CHAR(3)", + "dest_name": "dcofom", + "dest_type": "text", + "description": "original FOB before PPC" + }, + { + "source_name": "DCOFTM", + "source_type": "CHAR(1)", + "dest_name": "dcoftm", + "dest_type": "text", + "description": "original freight term" + }, + { + "source_name": "DCAPPTM", + "source_type": "CHAR(1)", + "dest_name": "dcapptm", + "dest_type": "text", + "description": "Apply PPC Term Code" + }, + { + "source_name": "DCEXPO", + "source_type": "CHAR(1)", + "dest_name": "dcexpo", + "dest_type": "text", + "description": "Expedited Order" + }, + { + "source_name": "DCSDLV", + "source_type": "CHAR(1)", + "dest_name": "dcsdlv", + "dest_type": "text", + "description": "Saturday Delivery" + }, + { + "source_name": "DCSPIC", + "source_type": "CHAR(1)", + "dest_name": "dcspic", + "dest_type": "text", + "description": "Saturday Pickup" + }, + { + "source_name": "DCFRTC", + "source_type": "CHAR(1)", + "dest_name": "dcfrtc", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "DCCPLT", + "source_type": "CHAR(3)", + "dest_name": "dccplt", + "dest_type": "text", + "description": "Create-At Plant" + }, + { + "source_name": "DCSDBC", + "source_type": "CHAR(17)", + "dest_name": "dcsdbc", + "dest_type": "text", + "description": "SCD Tier-1 Bill-to Customer" + }, + { + "source_name": "DCSDBS", + "source_type": "CHAR(20)", + "dest_name": "dcsdbs", + "dest_type": "text", + "description": "SCD Tier-1 Bill-to Supplier" + }, + { + "source_name": "DCSDSC", + "source_type": "CHAR(17)", + "dest_name": "dcsdsc", + "dest_type": "text", + "description": "SCD Tier-1 Ship-to Customer" + }, + { + "source_name": "DCSDSS", + "source_type": "CHAR(20)", + "dest_name": "dcsdss", + "dest_type": "text", + "description": "SCD Tier-1 Ship-to Supplier" + }, + { + "source_name": "DCSDCR", + "source_type": "CHAR(30)", + "dest_name": "dcsdcr", + "dest_type": "text", + "description": "SCD Tier-1 Customer Reference" + }, + { + "source_name": "DCSCPO", + "source_type": "CHAR(30)", + "dest_name": "dcscpo", + "dest_type": "text", + "description": "SCD Tier-1 Customer PO #" + }, + { + "source_name": "DCSCOR", + "source_type": "CHAR(30)", + "dest_name": "dcscor", + "dest_type": "text", + "description": "SCD Tier-1 Order #" + }, + { + "source_name": "DCFROM", + "source_type": "CHAR(1)", + "dest_name": "dcfrom", + "dest_type": "text", + "description": "Order Origination" + }, + { + "source_name": "DCSCTY", + "source_type": "CHAR(30)", + "dest_name": "dcscty", + "dest_type": "text", + "description": "Shipto City" + }, + { + "source_name": "DCSPOV", + "source_type": "CHAR(3)", + "dest_name": "dcspov", + "dest_type": "text", + "description": "Shipto State/ Province Code" + }, + { + "source_name": "DCSCRY", + "source_type": "CHAR(3)", + "dest_name": "dcscry", + "dest_type": "text", + "description": "Shipto Country Code" + } + ], + "watermarks": [ + { + "name": "qcrh_wm", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(\"dcord#\"),0) - 1000 FROM cms.qcrh", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/qcrh.sql b/config/modules/qcrh.sql new file mode 100644 index 0000000..7c2d19f --- /dev/null +++ b/config/modules/qcrh.sql @@ -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} diff --git a/config/modules/qcri.json b/config/modules/qcri.json new file mode 100644 index 0000000..9481918 --- /dev/null +++ b/config/modules/qcri.json @@ -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": [] +} diff --git a/config/modules/qcri.sql b/config/modules/qcri.sql new file mode 100644 index 0000000..e8b8327 --- /dev/null +++ b/config/modules/qcri.sql @@ -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} diff --git a/config/modules/qtnote.json b/config/modules/qtnote.json new file mode 100644 index 0000000..730acd8 --- /dev/null +++ b/config/modules/qtnote.json @@ -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": [] +} diff --git a/config/modules/qtnote.sql b/config/modules/qtnote.sql new file mode 100644 index 0000000..eb23744 --- /dev/null +++ b/config/modules/qtnote.sql @@ -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}'