diff --git a/SPEC.md b/SPEC.md index b884068..fc6311f 100644 --- a/SPEC.md +++ b/SPEC.md @@ -115,6 +115,52 @@ User was uneasy about losing filesystem browsing. Resolution: the **TUI is the file browser**. Inspecting a module feels like `cat`, editing opens `$EDITOR`, the module list feels like `ls`. For raw access, `sqlite3 pipekit.db` works. +## Config as code (export / apply) + +The SQLite file is **runtime state**; the pipeline *definitions* it holds are +**config** and belong in version control. Without this split there is no diff, +no review, no rollback, and no DR for the definitions — a bad web-UI edit (or a +one-off script) mutates operating state with only an `updated_at` to show for +it, and `pipekit.db` is gitignored (it's ~90 MB, mostly `run_log`). + +Two CLI commands bridge the gap (`pipekit/config_io.py`): + +- `pipekit export` — serialise the definitions to a text tree under `config/`. +- `pipekit apply [--dry-run] [--prune]` — rehydrate the DB from that tree. + +Layout (`config/`, committed to git): + +``` +drivers.json # driver registry +connections.json # connections — passwords are $ENV refs, not secrets +groups.json # groups + members + schedules +modules/.json # one module: def + columns[] + watermarks + hooks +modules/.sql # that module's source_query (sidecar → clean diffs) +``` + +Principles: + +- **Config only.** Run history (`run_log`, `group_run`, `settings`) and per-run + state columns (`running`, `running_pid`, `running_since`, + `next_resolved_query`, timestamps) are excluded. Those go to DB backups, not + git. +- **Name-keyed, not id-keyed.** Every cross-reference (driver, connection, + module) is by natural name, so the tree is portable across databases. +- **`columns` is a real JSON array**, not the stored `columns_json` blob — so a + column-map change diffs line-by-line. SQL lives in a `.sql` sidecar for the + same reason. +- **Newlines are normalised to LF** on both sides; CRLF-vs-LF never reads as a + change. +- **`apply` is safe by default.** It creates/updates top-level rows by name and + fully syncs child collections (watermarks by name; hooks and schedules + rebuilt). Top-level rows present in the DB but absent from the files are left + alone unless `--prune` is passed. `--dry-run` prints the plan and writes + nothing. + +The DB stays the source of truth for *operation*; `config/` is the source of +truth for *definition*. Round-trip is identity: `export` then `apply --dry-run` +reports "nothing to do". + ## Module model A module = one sync job. Fields: @@ -672,6 +718,7 @@ behavior. | Decision | Choice | |---|---| | Storage | SQLite, single file | +| Config vs state | Definitions are version-controlled via `pipekit export`/`apply` (text tree under `config/`); `pipekit.db` holds runtime state only | | Where SQL lives | In the database (text blobs), not files | | Source query shape | Free text with `{watermark}` placeholders | | Columns | Parsed from query; not separate rows; wizard auto-introspects on create | diff --git a/config/connections.json b/config/connections.json new file mode 100644 index 0000000..d2198c0 --- /dev/null +++ b/config/connections.json @@ -0,0 +1,32 @@ +[ + { + "name": "S78030956", + "driver": "db2-jt400", + "jdbc_url": "jdbc:as400://S7830956;libraries=RLARP,LGDAT,LGPGM", + "username": "ptrowbridg", + "password": "$DB2PW", + "default_dest_connection": "usmidsap02", + "default_dest_schema": "cms", + "notes": "None" + }, + { + "name": "sqlserver", + "driver": "mssql-jdbc", + "jdbc_url": "jdbc:sqlserver://usmidsql01:1433;databaseName=Fanalysis;encrypt=false", + "username": "Pricing", + "password": "$SQLCMDPASSWORD", + "default_dest_connection": "usmidsap02", + "default_dest_schema": null, + "notes": null + }, + { + "name": "usmidsap02", + "driver": "postgresql", + "jdbc_url": "jdbc:postgresql://10.0.10.40:5432/ubm", + "username": "ptrowbridge", + "password": "$PGPW", + "default_dest_connection": null, + "default_dest_schema": "None", + "notes": "None" + } +] diff --git a/config/drivers.json b/config/drivers.json new file mode 100644 index 0000000..8cb9867 --- /dev/null +++ b/config/drivers.json @@ -0,0 +1,23 @@ +[ + { + "name": "db2-jt400", + "kind": "db2", + "jar_file": "/opt/jrunner/jrunner/build/install/jrunner/bin/../lib/jt400-11.0.jar", + "class_name": "com.ibm.as400.access.AS400JDBCDriver", + "url_template": null + }, + { + "name": "mssql-jdbc", + "kind": "mssql", + "jar_file": "/opt/jrunner/jrunner/build/install/jrunner/bin/../lib/mssql-jdbc-9.2.0.jre8.jar", + "class_name": "com.microsoft.sqlserver.jdbc.SQLServerDriver", + "url_template": null + }, + { + "name": "postgresql", + "kind": "pg", + "jar_file": "/opt/jrunner/jrunner/build/install/jrunner/bin/../lib/postgresql-42.5.0.jar", + "class_name": "org.postgresql.Driver", + "url_template": null + } +] diff --git a/config/groups.json b/config/groups.json new file mode 100644 index 0000000..a2fba5e --- /dev/null +++ b/config/groups.json @@ -0,0 +1,324 @@ +[ + { + "name": "Accounts Receivable", + "members": [ + { + "module": "aroht", + "run_order": 0 + }, + { + "module": "arop", + "run_order": 0 + }, + { + "module": "artrn", + "run_order": 0 + }, + { + "module": "rm20101", + "run_order": 0 + }, + { + "module": "rm30101", + "run_order": 0 + } + ], + "schedules": [] + }, + { + "name": "Codes", + "members": [ + { + "module": "code", + "run_order": 0 + }, + { + "module": "ffcret", + "run_order": 0 + }, + { + "module": "name", + "run_order": 0 + }, + { + "module": "sy03300", + "run_order": 0 + }, + { + "module": "terms", + "run_order": 0 + } + ], + "schedules": [] + }, + { + "name": "Customer", + "members": [ + { + "module": "cust", + "run_order": 0 + }, + { + "module": "rm00101", + "run_order": 1 + }, + { + "module": "rm00301", + "run_order": 2 + } + ], + "schedules": [ + { + "cron_expr": "0 2 * * *", + "enabled": 1 + } + ] + }, + { + "name": "Fiscal", + "members": [ + { + "module": "coa_map", + "run_order": 0 + }, + { + "module": "gl00100", + "run_order": 0 + }, + { + "module": "gl10110", + "run_order": 0 + }, + { + "module": "gl10111", + "run_order": 0 + }, + { + "module": "gl20000", + "run_order": 0 + }, + { + "module": "gl30000", + "run_order": 0 + }, + { + "module": "gtran", + "run_order": 0 + }, + { + "module": "sy40100", + "run_order": 0 + }, + { + "module": "tb_addbacks", + "run_order": 0 + }, + { + "module": "fgrp", + "run_order": 1 + }, + { + "module": "ggtp", + "run_order": 2 + }, + { + "module": "gldate", + "run_order": 3 + }, + { + "module": "gldatref", + "run_order": 4 + }, + { + "module": "glmt", + "run_order": 5 + }, + { + "module": "ffsbglr1", + "run_order": 6 + }, + { + "module": "mast", + "run_order": 7 + } + ], + "schedules": [ + { + "cron_expr": "0 1 * * *", + "enabled": 1 + } + ] + }, + { + "name": "Inventory Master", + "members": [ + { + "module": "itemm", + "run_order": 0 + }, + { + "module": "marktable", + "run_order": 0 + }, + { + "module": "mkptgroup", + "run_order": 0 + }, + { + "module": "moldmast", + "run_order": 0 + }, + { + "module": "stnote", + "run_order": 0 + }, + { + "module": "uqf", + "run_order": 0 + }, + { + "module": "iv00101", + "run_order": 1 + } + ], + "schedules": [ + { + "cron_expr": "0 1 * * *", + "enabled": 1 + } + ] + }, + { + "name": "Inventory On Hand", + "members": [ + { + "module": "binb", + "run_order": 0 + }, + { + "module": "iv00102", + "run_order": 0 + }, + { + "module": "stkb", + "run_order": 0 + } + ], + "schedules": [ + { + "cron_expr": "50 * * * *", + "enabled": 1 + } + ] + }, + { + "name": "Quote Review", + "members": [ + { + "module": "live_quotes", + "run_order": 0 + } + ], + "schedules": [ + { + "cron_expr": "*/15 * * * *", + "enabled": 1 + } + ] + }, + { + "name": "Sales Matrix", + "members": [ + { + "module": "_custom_sales_line_connector", + "run_order": 0 + } + ], + "schedules": [ + { + "cron_expr": "20 2 * * *", + "enabled": 1 + } + ] + }, + { + "name": "Sales Transactions", + "members": [ + { + "module": "sop10100", + "run_order": 0 + }, + { + "module": "sop10200", + "run_order": 0 + }, + { + "module": "sop30200", + "run_order": 0 + }, + { + "module": "sop30300", + "run_order": 0 + }, + { + "module": "bolh", + "run_order": 1 + }, + { + "module": "ocrh", + "run_order": 1 + }, + { + "module": "oih", + "run_order": 1 + }, + { + "module": "bold", + "run_order": 2 + }, + { + "module": "ocri", + "run_order": 2 + }, + { + "module": "oid", + "run_order": 2 + }, + { + "module": "ocrs", + "run_order": 3 + }, + { + "module": "ois", + "run_order": 3 + } + ], + "schedules": [] + }, + { + "name": "Surcharges", + "members": [ + { + "module": "dsdisc", + "run_order": 0 + }, + { + "module": "surcharge", + "run_order": 0 + }, + { + "module": "surchargep", + "run_order": 0 + }, + { + "module": "surchgexc", + "run_order": 0 + }, + { + "module": "usrc", + "run_order": 0 + } + ], + "schedules": [] + } +] diff --git a/config/modules/_custom_sales_line_connector.json b/config/modules/_custom_sales_line_connector.json new file mode 100644 index 0000000..3eca0df --- /dev/null +++ b/config/modules/_custom_sales_line_connector.json @@ -0,0 +1,260 @@ +{ + "name": "_custom_sales_line_connector", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp._custom_sales_line_connector", + "staging_table": "pipekit_staging._custom_sales_line_connector", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "Doctype", + "source_type": "VARCHAR(25)", + "dest_name": "doctype", + "dest_type": "text", + "description": null + }, + { + "source_name": "Doc Num", + "source_type": "VARCHAR(21)", + "dest_name": "doc_num", + "dest_type": "text", + "description": null + }, + { + "source_name": "Original Doc", + "source_type": "VARCHAR(21)", + "dest_name": "original_doc", + "dest_type": "text", + "description": null + }, + { + "source_name": "Doc Date", + "source_type": "DATE", + "dest_name": "doc_date", + "dest_type": "date", + "description": null + }, + { + "source_name": "Order Date", + "source_type": "DATE", + "dest_name": "order_date", + "dest_type": "date", + "description": null + }, + { + "source_name": "Req Date", + "source_type": "DATE", + "dest_name": "req_date", + "dest_type": "date", + "description": null + }, + { + "source_name": "Prom Date", + "source_type": "DATE", + "dest_name": "prom_date", + "dest_type": "date", + "description": null + }, + { + "source_name": "Cust Num", + "source_type": "VARCHAR(15)", + "dest_name": "cust_num", + "dest_type": "text", + "description": null + }, + { + "source_name": "Cust Name", + "source_type": "VARCHAR(65)", + "dest_name": "cust_name", + "dest_type": "text", + "description": null + }, + { + "source_name": "Rep ID", + "source_type": "VARCHAR(15)", + "dest_name": "rep_id", + "dest_type": "text", + "description": null + }, + { + "source_name": "Rep Name", + "source_type": "VARCHAR(21)", + "dest_name": "rep_name", + "dest_type": "text", + "description": null + }, + { + "source_name": "Cust PO", + "source_type": "VARCHAR(21)", + "dest_name": "cust_po", + "dest_type": "text", + "description": null + }, + { + "source_name": "_HD_Grower", + "source_type": "VARCHAR(5)", + "dest_name": "_hd_grower", + "dest_type": "text", + "description": null + }, + { + "source_name": "Origin", + "source_type": "CHAR(11)", + "dest_name": "origin", + "dest_type": "text", + "description": null + }, + { + "source_name": "Address Code", + "source_type": "VARCHAR(15)", + "dest_name": "address_code", + "dest_type": "text", + "description": null + }, + { + "source_name": "State", + "source_type": "VARCHAR(29)", + "dest_name": "state", + "dest_type": "text", + "description": null + }, + { + "source_name": "City", + "source_type": "VARCHAR(35)", + "dest_name": "city", + "dest_type": "text", + "description": null + }, + { + "source_name": "Cust Channel", + "source_type": "VARCHAR(20)", + "dest_name": "cust_channel", + "dest_type": "text", + "description": null + }, + { + "source_name": "Mold ID", + "source_type": "VARCHAR(8000)", + "dest_name": "mold_id", + "dest_type": "text", + "description": null + }, + { + "source_name": "Item Num", + "source_type": "VARCHAR(31)", + "dest_name": "item_num", + "dest_type": "text", + "description": null + }, + { + "source_name": "Item Description", + "source_type": "VARCHAR(101)", + "dest_name": "item_description", + "dest_type": "text", + "description": null + }, + { + "source_name": "Quantity", + "source_type": "NUMERIC(19,5)", + "dest_name": "quantity", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "Collection", + "source_type": "VARCHAR(100)", + "dest_name": "collection", + "dest_type": "text", + "description": null + }, + { + "source_name": "Segment", + "source_type": "VARCHAR(32)", + "dest_name": "segment", + "dest_type": "text", + "description": null + }, + { + "source_name": "Unit Price", + "source_type": "NUMERIC(21,5)", + "dest_name": "unit_price", + "dest_type": "numeric(21,5)", + "description": null + }, + { + "source_name": "Ext. Price", + "source_type": "NUMERIC(38,7)", + "dest_name": "ext._price", + "dest_type": "numeric(38,7)", + "description": null + }, + { + "source_name": "Unit Cost", + "source_type": "NUMERIC(19,5)", + "dest_name": "unit_cost", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "Ext. Cost", + "source_type": "NUMERIC(38,9)", + "dest_name": "ext._cost", + "dest_type": "numeric(38,9)", + "description": null + }, + { + "source_name": "Margin Dollar", + "source_type": "NUMERIC(22,5)", + "dest_name": "margin_dollar", + "dest_type": "numeric(22,5)", + "description": null + }, + { + "source_name": "Ext. Margin Dollar", + "source_type": "NUMERIC(38,7)", + "dest_name": "ext._margin_dollar", + "dest_type": "numeric(38,7)", + "description": null + }, + { + "source_name": "Margin %", + "source_type": "NVARCHAR(4000)", + "dest_name": "margin__", + "dest_type": "text", + "description": null + }, + { + "source_name": "Job Number", + "source_type": "VARCHAR(25)", + "dest_name": "job_number", + "dest_type": "text", + "description": null + }, + { + "source_name": "Program", + "source_type": "VARCHAR(100)", + "dest_name": "program", + "dest_type": "text", + "description": null + }, + { + "source_name": "Container", + "source_type": "VARCHAR(25)", + "dest_name": "container", + "dest_type": "text", + "description": null + }, + { + "source_name": "AOP Rep", + "source_type": "VARCHAR(10)", + "dest_name": "aop_rep", + "dest_type": "text", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/_custom_sales_line_connector.sql b/config/modules/_custom_sales_line_connector.sql new file mode 100644 index 0000000..b5461d0 --- /dev/null +++ b/config/modules/_custom_sales_line_connector.sql @@ -0,0 +1,37 @@ +SELECT + RTRIM([Doctype]) AS [doctype], + RTRIM([Doc Num]) AS [doc_num], + RTRIM([Original Doc]) AS [original_doc], + [Doc Date] AS [doc_date], + [Order Date] AS [order_date], + [Req Date] AS [req_date], + [Prom Date] AS [prom_date], + RTRIM([Cust Num]) AS [cust_num], + RTRIM([Cust Name]) AS [cust_name], + RTRIM([Rep ID]) AS [rep_id], + RTRIM([Rep Name]) AS [rep_name], + RTRIM([Cust PO]) AS [cust_po], + RTRIM([_HD_Grower]) AS [hd_grower], + RTRIM([Origin]) AS [origin], + RTRIM([Address Code]) AS [address_code], + RTRIM([State]) AS [state], + RTRIM([City]) AS [city], + RTRIM([Cust Channel]) AS [cust_channel], + RTRIM([Mold ID]) AS [mold_id], + RTRIM([Item Num]) AS [item_num], + RTRIM([Item Description]) AS [item_description], + [Quantity] AS [quantity], + RTRIM([Collection]) AS [collection], + RTRIM([Segment]) AS [segment], + [Unit Price] AS [unit_price], + [Ext. Price] AS [ext_price], + [Unit Cost] AS [unit_cost], + [Ext. Cost] AS [ext_cost], + [Margin Dollar] AS [margin_dollar], + [Ext. Margin Dollar] AS [ext_margin_dollar], + RTRIM([Margin %]) AS [margin_pct], + RTRIM([Job Number]) AS [job_number], + RTRIM([Program]) AS [program], + RTRIM([Container]) AS [container], + RTRIM([AOP Rep]) AS [aop_rep] +FROM [GPSERVER].[CHG].[dbo].[_custom_sales_line_connector] diff --git a/config/modules/ab.json b/config/modules/ab.json new file mode 100644 index 0000000..01f6267 --- /dev/null +++ b/config/modules/ab.json @@ -0,0 +1,85 @@ +{ + "name": "ab", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gs.ab", + "staging_table": "pipekit_staging.ab", + "merge_strategy": "full", + "merge_key": null, + "enabled": 0, + "dest_description": null, + "columns": [ + { + "source_name": "Origin", + "source_type": "VARCHAR(3)", + "dest_name": "origin", + "dest_type": "text", + "description": null + }, + { + "source_name": "Account", + "source_type": "VARCHAR(12)", + "dest_name": "account", + "dest_type": "text", + "description": null + }, + { + "source_name": "FSPR", + "source_type": "VARCHAR(4)", + "dest_name": "fspr", + "dest_type": "text", + "description": null + }, + { + "source_name": "TDATE", + "source_type": "VARCHAR(10)", + "dest_name": "tdate", + "dest_type": "text", + "description": null + }, + { + "source_name": "Party", + "source_type": "VARCHAR(76)", + "dest_name": "party", + "dest_type": "text", + "description": null + }, + { + "source_name": "Amount", + "source_type": "DECIMAL(18,2)", + "dest_name": "amount", + "dest_type": "numeric(18,2)", + "description": null + }, + { + "source_name": "EBITDA", + "source_type": "VARCHAR(30)", + "dest_name": "ebitda", + "dest_type": "text", + "description": null + }, + { + "source_name": "Project", + "source_type": "VARCHAR(53)", + "dest_name": "project", + "dest_type": "text", + "description": null + }, + { + "source_name": "Clause", + "source_type": "VARCHAR(27)", + "dest_name": "clause", + "dest_type": "text", + "description": null + }, + { + "source_name": "flag", + "source_type": "NVARCHAR(255)", + "dest_name": "flag", + "dest_type": "text", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/ab.sql b/config/modules/ab.sql new file mode 100644 index 0000000..d1a76f6 --- /dev/null +++ b/config/modules/ab.sql @@ -0,0 +1,12 @@ +SELECT + RTRIM([Origin]) AS [origin], + RTRIM([Account]) AS [account], + RTRIM([FSPR]) AS [fspr], + RTRIM([TDATE]) AS [tdate], + RTRIM([Party]) AS [party], + [Amount] AS [amount], + RTRIM([EBITDA]) AS [ebitda], + RTRIM([Project]) AS [project], + RTRIM([Clause]) AS [clause], + RTRIM([flag]) AS [flag] +FROM [FANALYSIS].[GS].[AB] diff --git a/config/modules/aroht.json b/config/modules/aroht.json new file mode 100644 index 0000000..5405b21 --- /dev/null +++ b/config/modules/aroht.json @@ -0,0 +1,505 @@ +{ + "name": "aroht", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.aroht", + "staging_table": "pipekit_staging.aroht", + "merge_strategy": "incremental", + "merge_key": "ascom#, ascust, asinv#", + "enabled": 1, + "dest_description": "A/R Open Receivables 6.1", + "columns": [ + { + "source_name": "ASCOMP", + "source_type": "CHAR(2)", + "dest_name": "ascomp", + "dest_type": "text", + "description": "Company Code Alpha" + }, + { + "source_name": "ASCUST", + "source_type": "CHAR(8)", + "dest_name": "ascust", + "dest_type": "text", + "description": "Customer Code" + }, + { + "source_name": "ASINV#", + "source_type": "CHAR(15)", + "dest_name": "asinv#", + "dest_type": "text", + "description": "Invoice Number" + }, + { + "source_name": "ASITYP", + "source_type": "CHAR(2)", + "dest_name": "asityp", + "dest_type": "text", + "description": "Invoice Typ" + }, + { + "source_name": "ASIDAT", + "source_type": "DATE", + "dest_name": "asidat", + "dest_type": "date", + "description": "Invoice Date" + }, + { + "source_name": "ASTDAT", + "source_type": "DATE", + "dest_name": "astdat", + "dest_type": "date", + "description": "Transaction Date" + }, + { + "source_name": "ASDDAT", + "source_type": "DATE", + "dest_name": "asddat", + "dest_type": "date", + "description": "Due Date" + }, + { + "source_name": "ASTRTP", + "source_type": "CHAR(3)", + "dest_name": "astrtp", + "dest_type": "text", + "description": "Transaction Type" + }, + { + "source_name": "ASINAM", + "source_type": "NUMERIC(11,2)", + "dest_name": "asinam", + "dest_type": "numeric(11,2)", + "description": "Invoice Amount" + }, + { + "source_name": "ASDIS", + "source_type": "NUMERIC(11,2)", + "dest_name": "asdis", + "dest_type": "numeric(11,2)", + "description": "Discount Amount" + }, + { + "source_name": "ASADJ", + "source_type": "NUMERIC(11,2)", + "dest_name": "asadj", + "dest_type": "numeric(11,2)", + "description": "Adjustnt Amount" + }, + { + "source_name": "ASPAY", + "source_type": "NUMERIC(11,2)", + "dest_name": "aspay", + "dest_type": "numeric(11,2)", + "description": "Payment Amount" + }, + { + "source_name": "ASDUAM", + "source_type": "NUMERIC(11,2)", + "dest_name": "asduam", + "dest_type": "numeric(11,2)", + "description": "Invoice Balance" + }, + { + "source_name": "ASDWO", + "source_type": "NUMERIC(11,2)", + "dest_name": "asdwo", + "dest_type": "numeric(11,2)", + "description": "Total Write-off" + }, + { + "source_name": "ASDED", + "source_type": "NUMERIC(11,2)", + "dest_name": "asded", + "dest_type": "numeric(11,2)", + "description": "Total Deductions" + }, + { + "source_name": "ASHLD", + "source_type": "NUMERIC(11,2)", + "dest_name": "ashld", + "dest_type": "numeric(11,2)", + "description": "Total Term Discount" + }, + { + "source_name": "ASHDAT", + "source_type": "DATE", + "dest_name": "ashdat", + "dest_type": "date", + "description": "Term Discount Due date" + }, + { + "source_name": "ASPDAT", + "source_type": "DATE", + "dest_name": "aspdat", + "dest_type": "date", + "description": "Last Payment Date" + }, + { + "source_name": "ASCHQ#", + "source_type": "CHAR(15)", + "dest_name": "aschq#", + "dest_type": "text", + "description": "Last Cheque #" + }, + { + "source_name": "ASCPAM", + "source_type": "NUMERIC(11,2)", + "dest_name": "ascpam", + "dest_type": "numeric(11,2)", + "description": "Last Payment $" + }, + { + "source_name": "ASCURA", + "source_type": "CHAR(2)", + "dest_name": "ascura", + "dest_type": "text", + "description": "Currency Code" + }, + { + "source_name": "ASEXRT", + "source_type": "NUMERIC(11,6)", + "dest_name": "asexrt", + "dest_type": "numeric(11,6)", + "description": "Exchange Rate" + }, + { + "source_name": "ASFSYR", + "source_type": "NUMERIC(2,0)", + "dest_name": "asfsyr", + "dest_type": "numeric(2,0)", + "description": "Fiscal Year" + }, + { + "source_name": "ASFSPR", + "source_type": "NUMERIC(2,0)", + "dest_name": "asfspr", + "dest_type": "numeric(2,0)", + "description": "Fiscal Period" + }, + { + "source_name": "ASBCHQ", + "source_type": "CHAR(6)", + "dest_name": "asbchq", + "dest_type": "text", + "description": "Reference Number" + }, + { + "source_name": "ASTRDS", + "source_type": "CHAR(30)", + "dest_name": "astrds", + "dest_type": "text", + "description": "Transaction Description" + }, + { + "source_name": "ASCOM#", + "source_type": "CHAR(2)", + "dest_name": "ascom#", + "dest_type": "text", + "description": "G/L Company Code" + }, + { + "source_name": "ASARAC", + "source_type": "CHAR(10)", + "dest_name": "asarac", + "dest_type": "text", + "description": "G/L Account" + }, + { + "source_name": "ASSLMN", + "source_type": "CHAR(5)", + "dest_name": "asslmn", + "dest_type": "text", + "description": "Salesman Code" + }, + { + "source_name": "ASTERR", + "source_type": "CHAR(4)", + "dest_name": "asterr", + "dest_type": "text", + "description": "Territory Code" + }, + { + "source_name": "ASBTCH", + "source_type": "NUMERIC(2,0)", + "dest_name": "asbtch", + "dest_type": "numeric(2,0)", + "description": "A/R Cash Batch Number" + }, + { + "source_name": "ASBTAM", + "source_type": "NUMERIC(11,2)", + "dest_name": "asbtam", + "dest_type": "numeric(11,2)", + "description": "Batch Amount" + }, + { + "source_name": "ASTPST", + "source_type": "NUMERIC(11,2)", + "dest_name": "astpst", + "dest_type": "numeric(11,2)", + "description": "Total Tax" + }, + { + "source_name": "ASTFST", + "source_type": "NUMERIC(11,2)", + "dest_name": "astfst", + "dest_type": "numeric(11,2)", + "description": "Total First Level" + }, + { + "source_name": "ASTCST", + "source_type": "NUMERIC(11,2)", + "dest_name": "astcst", + "dest_type": "numeric(11,2)", + "description": "Total Cost" + }, + { + "source_name": "ASODIS", + "source_type": "NUMERIC(11,2)", + "dest_name": "asodis", + "dest_type": "numeric(11,2)", + "description": "Order Discount" + }, + { + "source_name": "ASORIN", + "source_type": "CHAR(9)", + "dest_name": "asorin", + "dest_type": "text", + "description": "Original Invoice #" + }, + { + "source_name": "ASBOL#", + "source_type": "CHAR(9)", + "dest_name": "asbol#", + "dest_type": "text", + "description": "OBSOLETE" + }, + { + "source_name": "ASINVN", + "source_type": "NUMERIC(9,0)", + "dest_name": "asinvn", + "dest_type": "numeric(9,0)", + "description": "Invoice Number" + }, + { + "source_name": "ASBOLN", + "source_type": "NUMERIC(9,0)", + "dest_name": "asboln", + "dest_type": "numeric(9,0)", + "description": "Original BOL Number" + }, + { + "source_name": "ASHQCO", + "source_type": "NUMERIC(2,0)", + "dest_name": "ashqco", + "dest_type": "numeric(2,0)", + "description": "HQ Company" + }, + { + "source_name": "ASHQBT", + "source_type": "NUMERIC(2,0)", + "dest_name": "ashqbt", + "dest_type": "numeric(2,0)", + "description": "HQ Batch" + }, + { + "source_name": "ASFUT1", + "source_type": "CHAR(3)", + "dest_name": "asfut1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT2", + "source_type": "CHAR(10)", + "dest_name": "asfut2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT3", + "source_type": "CHAR(10)", + "dest_name": "asfut3", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT4", + "source_type": "CHAR(10)", + "dest_name": "asfut4", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT5", + "source_type": "CHAR(20)", + "dest_name": "asfut5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT6", + "source_type": "NUMERIC(15,5)", + "dest_name": "asfut6", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "ASFLG1", + "source_type": "CHAR(1)", + "dest_name": "asflg1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFLG2", + "source_type": "CHAR(1)", + "dest_name": "asflg2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFLG3", + "source_type": "CHAR(1)", + "dest_name": "asflg3", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFLG4", + "source_type": "CHAR(1)", + "dest_name": "asflg4", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFLG5", + "source_type": "CHAR(1)", + "dest_name": "asflg5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASWTCN", + "source_type": "NUMERIC(9,0)", + "dest_name": "aswtcn", + "dest_type": "numeric(9,0)", + "description": "Warranty Claim Number" + }, + { + "source_name": "ASWTCD", + "source_type": "NUMERIC(3,0)", + "dest_name": "aswtcd", + "dest_type": "numeric(3,0)", + "description": "Warranty Claim Detail" + }, + { + "source_name": "ASCPON", + "source_type": "CHAR(30)", + "dest_name": "ascpon", + "dest_type": "text", + "description": "Customer Purchase Order" + }, + { + "source_name": "ASCRTY", + "source_type": "CHAR(1)", + "dest_name": "ascrty", + "dest_type": "text", + "description": "Use Credit Card" + }, + { + "source_name": "ASSTTM", + "source_type": "NUMERIC(11,2)", + "dest_name": "assttm", + "dest_type": "numeric(11,2)", + "description": "Settle Amount" + }, + { + "source_name": "ASSTTD", + "source_type": "DATE", + "dest_name": "assttd", + "dest_type": "date", + "description": "Settle Date" + }, + { + "source_name": "ASTRMP", + "source_type": "NUMERIC(3,0)", + "dest_name": "astrmp", + "dest_type": "numeric(3,0)", + "description": "Terms Percentage" + }, + { + "source_name": "ASSREF", + "source_type": "CHAR(30)", + "dest_name": "assref", + "dest_type": "text", + "description": "Invoice Shipment Reference" + }, + { + "source_name": "ASPJNM", + "source_type": "CHAR(20)", + "dest_name": "aspjnm", + "dest_type": "text", + "description": "Project Number" + }, + { + "source_name": "ASDSPR", + "source_type": "NUMERIC(15,5)", + "dest_name": "asdspr", + "dest_type": "numeric(15,5)", + "description": "Discount Percent" + }, + { + "source_name": "ASFUT7", + "source_type": "CHAR(10)", + "dest_name": "asfut7", + "dest_type": "text", + "description": "Fiscal Century+ Year+Period" + }, + { + "source_name": "ASFUT8", + "source_type": "CHAR(10)", + "dest_name": "asfut8", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT9", + "source_type": "CHAR(20)", + "dest_name": "asfut9", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT10", + "source_type": "CHAR(30)", + "dest_name": "asfut10", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT11", + "source_type": "CHAR(30)", + "dest_name": "asfut11", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "RRN", + "source_type": "BIGINT", + "dest_name": "src_rrn", + "dest_type": "bigint", + "description": "Source relative record number (incremental watermark)" + } + ], + "watermarks": [ + { + "name": "aroht_rrn", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(src_rrn), 0) FROM cms.aroht", + "default_value": "0" + } + ], + "hooks": [] +} diff --git a/config/modules/aroht.sql b/config/modules/aroht.sql new file mode 100644 index 0000000..a4ff6a6 --- /dev/null +++ b/config/modules/aroht.sql @@ -0,0 +1,72 @@ +SELECT + RTRIM(ASCOMP) AS ascomp, + RTRIM(ASCUST) AS ascust, + RTRIM("ASINV#") AS "asinv#", + RTRIM(ASITYP) AS asityp, + CASE WHEN ASIDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASIDAT END AS asidat, + CASE WHEN ASTDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASTDAT END AS astdat, + CASE WHEN ASDDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASDDAT END AS asddat, + RTRIM(ASTRTP) AS astrtp, + ASINAM AS asinam, + ASDIS AS asdis, + ASADJ AS asadj, + ASPAY AS aspay, + ASDUAM AS asduam, + ASDWO AS asdwo, + ASDED AS asded, + ASHLD AS ashld, + CASE WHEN ASHDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASHDAT END AS ashdat, + CASE WHEN ASPDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASPDAT END AS aspdat, + RTRIM("ASCHQ#") AS "aschq#", + ASCPAM AS ascpam, + RTRIM(ASCURA) AS ascura, + ASEXRT AS asexrt, + ASFSYR AS asfsyr, + ASFSPR AS asfspr, + RTRIM(ASBCHQ) AS asbchq, + RTRIM(ASTRDS) AS astrds, + RTRIM("ASCOM#") AS "ascom#", + RTRIM(ASARAC) AS asarac, + RTRIM(ASSLMN) AS asslmn, + RTRIM(ASTERR) AS asterr, + ASBTCH AS asbtch, + ASBTAM AS asbtam, + ASTPST AS astpst, + ASTFST AS astfst, + ASTCST AS astcst, + ASODIS AS asodis, + RTRIM(ASORIN) AS asorin, + RTRIM("ASBOL#") AS "asbol#", + ASINVN AS asinvn, + ASBOLN AS asboln, + ASHQCO AS ashqco, + ASHQBT AS ashqbt, + RTRIM(ASFUT1) AS asfut1, + RTRIM(ASFUT2) AS asfut2, + RTRIM(ASFUT3) AS asfut3, + RTRIM(ASFUT4) AS asfut4, + RTRIM(ASFUT5) AS asfut5, + ASFUT6 AS asfut6, + RTRIM(ASFLG1) AS asflg1, + RTRIM(ASFLG2) AS asflg2, + RTRIM(ASFLG3) AS asflg3, + RTRIM(ASFLG4) AS asflg4, + RTRIM(ASFLG5) AS asflg5, + ASWTCN AS aswtcn, + ASWTCD AS aswtcd, + RTRIM(ASCPON) AS ascpon, + RTRIM(ASCRTY) AS ascrty, + ASSTTM AS assttm, + CASE WHEN ASSTTD IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASSTTD END AS assttd, + ASTRMP AS astrmp, + RTRIM(ASSREF) AS assref, + RTRIM(ASPJNM) AS aspjnm, + ASDSPR AS asdspr, + RTRIM(ASFUT7) AS asfut7, + RTRIM(ASFUT8) AS asfut8, + RTRIM(ASFUT9) AS asfut9, + RTRIM(ASFUT10) AS asfut10, + RTRIM(ASFUT11) AS asfut11, + RRN(T) AS src_rrn +FROM LGDAT.AROHT T +WHERE RRN(T) > {aroht_rrn} diff --git a/config/modules/arop.json b/config/modules/arop.json new file mode 100644 index 0000000..bc57cd3 --- /dev/null +++ b/config/modules/arop.json @@ -0,0 +1,491 @@ +{ + "name": "arop", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.arop", + "staging_table": "pipekit_staging.arop", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "A/R Open Receivables 6.1", + "columns": [ + { + "source_name": "ASCOMP", + "source_type": "CHAR(2)", + "dest_name": "ascomp", + "dest_type": "text", + "description": "Company Code Alpha" + }, + { + "source_name": "ASCUST", + "source_type": "CHAR(8)", + "dest_name": "ascust", + "dest_type": "text", + "description": "Customer Code" + }, + { + "source_name": "ASINV#", + "source_type": "CHAR(15)", + "dest_name": "asinv#", + "dest_type": "text", + "description": "Invoice Number" + }, + { + "source_name": "ASITYP", + "source_type": "CHAR(2)", + "dest_name": "asityp", + "dest_type": "text", + "description": "Invoice Typ" + }, + { + "source_name": "ASIDAT", + "source_type": "DATE", + "dest_name": "asidat", + "dest_type": "date", + "description": "Invoice Date" + }, + { + "source_name": "ASTDAT", + "source_type": "DATE", + "dest_name": "astdat", + "dest_type": "date", + "description": "Transaction Date" + }, + { + "source_name": "ASDDAT", + "source_type": "DATE", + "dest_name": "asddat", + "dest_type": "date", + "description": "Due Date" + }, + { + "source_name": "ASTRTP", + "source_type": "CHAR(3)", + "dest_name": "astrtp", + "dest_type": "text", + "description": "Transaction Type" + }, + { + "source_name": "ASINAM", + "source_type": "NUMERIC(11,2)", + "dest_name": "asinam", + "dest_type": "numeric(11,2)", + "description": "Invoice Amount" + }, + { + "source_name": "ASDIS", + "source_type": "NUMERIC(11,2)", + "dest_name": "asdis", + "dest_type": "numeric(11,2)", + "description": "Discount Amount" + }, + { + "source_name": "ASADJ", + "source_type": "NUMERIC(11,2)", + "dest_name": "asadj", + "dest_type": "numeric(11,2)", + "description": "Adjustnt Amount" + }, + { + "source_name": "ASPAY", + "source_type": "NUMERIC(11,2)", + "dest_name": "aspay", + "dest_type": "numeric(11,2)", + "description": "Payment Amount" + }, + { + "source_name": "ASDUAM", + "source_type": "NUMERIC(11,2)", + "dest_name": "asduam", + "dest_type": "numeric(11,2)", + "description": "Invoice Balance" + }, + { + "source_name": "ASDWO", + "source_type": "NUMERIC(11,2)", + "dest_name": "asdwo", + "dest_type": "numeric(11,2)", + "description": "Total Write-off" + }, + { + "source_name": "ASDED", + "source_type": "NUMERIC(11,2)", + "dest_name": "asded", + "dest_type": "numeric(11,2)", + "description": "Total Deductions" + }, + { + "source_name": "ASHLD", + "source_type": "NUMERIC(11,2)", + "dest_name": "ashld", + "dest_type": "numeric(11,2)", + "description": "Total Term Discount" + }, + { + "source_name": "ASHDAT", + "source_type": "DATE", + "dest_name": "ashdat", + "dest_type": "date", + "description": "Term Discount Due date" + }, + { + "source_name": "ASPDAT", + "source_type": "DATE", + "dest_name": "aspdat", + "dest_type": "date", + "description": "Last Payment Date" + }, + { + "source_name": "ASCHQ#", + "source_type": "CHAR(15)", + "dest_name": "aschq#", + "dest_type": "text", + "description": "Last Cheque #" + }, + { + "source_name": "ASCPAM", + "source_type": "NUMERIC(11,2)", + "dest_name": "ascpam", + "dest_type": "numeric(11,2)", + "description": "Last Payment $" + }, + { + "source_name": "ASCURA", + "source_type": "CHAR(2)", + "dest_name": "ascura", + "dest_type": "text", + "description": "Currency Code" + }, + { + "source_name": "ASEXRT", + "source_type": "NUMERIC(11,6)", + "dest_name": "asexrt", + "dest_type": "numeric(11,6)", + "description": "Exchange Rate" + }, + { + "source_name": "ASFSYR", + "source_type": "NUMERIC(2,0)", + "dest_name": "asfsyr", + "dest_type": "numeric(2,0)", + "description": "Fiscal Year" + }, + { + "source_name": "ASFSPR", + "source_type": "NUMERIC(2,0)", + "dest_name": "asfspr", + "dest_type": "numeric(2,0)", + "description": "Fiscal Period" + }, + { + "source_name": "ASBCHQ", + "source_type": "CHAR(6)", + "dest_name": "asbchq", + "dest_type": "text", + "description": "Reference Number" + }, + { + "source_name": "ASTRDS", + "source_type": "CHAR(30)", + "dest_name": "astrds", + "dest_type": "text", + "description": "Transaction Description" + }, + { + "source_name": "ASCOM#", + "source_type": "CHAR(2)", + "dest_name": "ascom#", + "dest_type": "text", + "description": "G/L Company Code" + }, + { + "source_name": "ASARAC", + "source_type": "CHAR(10)", + "dest_name": "asarac", + "dest_type": "text", + "description": "G/L Account" + }, + { + "source_name": "ASSLMN", + "source_type": "CHAR(5)", + "dest_name": "asslmn", + "dest_type": "text", + "description": "Salesman Code" + }, + { + "source_name": "ASTERR", + "source_type": "CHAR(4)", + "dest_name": "asterr", + "dest_type": "text", + "description": "Territory Code" + }, + { + "source_name": "ASBTCH", + "source_type": "NUMERIC(2,0)", + "dest_name": "asbtch", + "dest_type": "numeric(2,0)", + "description": "A/R Cash Batch Number" + }, + { + "source_name": "ASBTAM", + "source_type": "NUMERIC(11,2)", + "dest_name": "asbtam", + "dest_type": "numeric(11,2)", + "description": "Batch Amount" + }, + { + "source_name": "ASTPST", + "source_type": "NUMERIC(11,2)", + "dest_name": "astpst", + "dest_type": "numeric(11,2)", + "description": "Total Tax" + }, + { + "source_name": "ASTFST", + "source_type": "NUMERIC(11,2)", + "dest_name": "astfst", + "dest_type": "numeric(11,2)", + "description": "Total First Level" + }, + { + "source_name": "ASTCST", + "source_type": "NUMERIC(11,2)", + "dest_name": "astcst", + "dest_type": "numeric(11,2)", + "description": "Total Cost" + }, + { + "source_name": "ASODIS", + "source_type": "NUMERIC(11,2)", + "dest_name": "asodis", + "dest_type": "numeric(11,2)", + "description": "Order Discount" + }, + { + "source_name": "ASORIN", + "source_type": "CHAR(9)", + "dest_name": "asorin", + "dest_type": "text", + "description": "Original Invoice #" + }, + { + "source_name": "ASBOL#", + "source_type": "CHAR(9)", + "dest_name": "asbol#", + "dest_type": "text", + "description": "OBSOLETE" + }, + { + "source_name": "ASINVN", + "source_type": "NUMERIC(9,0)", + "dest_name": "asinvn", + "dest_type": "numeric(9,0)", + "description": "Invoice Number" + }, + { + "source_name": "ASBOLN", + "source_type": "NUMERIC(9,0)", + "dest_name": "asboln", + "dest_type": "numeric(9,0)", + "description": "Original BOL Number" + }, + { + "source_name": "ASHQCO", + "source_type": "NUMERIC(2,0)", + "dest_name": "ashqco", + "dest_type": "numeric(2,0)", + "description": "HQ Company" + }, + { + "source_name": "ASHQBT", + "source_type": "NUMERIC(2,0)", + "dest_name": "ashqbt", + "dest_type": "numeric(2,0)", + "description": "HQ Batch" + }, + { + "source_name": "ASFUT1", + "source_type": "CHAR(3)", + "dest_name": "asfut1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT2", + "source_type": "CHAR(10)", + "dest_name": "asfut2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT3", + "source_type": "CHAR(10)", + "dest_name": "asfut3", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT4", + "source_type": "CHAR(10)", + "dest_name": "asfut4", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT5", + "source_type": "CHAR(20)", + "dest_name": "asfut5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT6", + "source_type": "NUMERIC(15,5)", + "dest_name": "asfut6", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "ASFLG1", + "source_type": "CHAR(1)", + "dest_name": "asflg1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFLG2", + "source_type": "CHAR(1)", + "dest_name": "asflg2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFLG3", + "source_type": "CHAR(1)", + "dest_name": "asflg3", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFLG4", + "source_type": "CHAR(1)", + "dest_name": "asflg4", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFLG5", + "source_type": "CHAR(1)", + "dest_name": "asflg5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASWTCN", + "source_type": "NUMERIC(9,0)", + "dest_name": "aswtcn", + "dest_type": "numeric(9,0)", + "description": "Warranty Claim Number" + }, + { + "source_name": "ASWTCD", + "source_type": "NUMERIC(3,0)", + "dest_name": "aswtcd", + "dest_type": "numeric(3,0)", + "description": "Warranty Claim Detail" + }, + { + "source_name": "ASCPON", + "source_type": "CHAR(30)", + "dest_name": "ascpon", + "dest_type": "text", + "description": "Customer Purchase Order" + }, + { + "source_name": "ASCRTY", + "source_type": "CHAR(1)", + "dest_name": "ascrty", + "dest_type": "text", + "description": "Use Credit Card" + }, + { + "source_name": "ASSTTM", + "source_type": "NUMERIC(11,2)", + "dest_name": "assttm", + "dest_type": "numeric(11,2)", + "description": "Settle Amount" + }, + { + "source_name": "ASSTTD", + "source_type": "DATE", + "dest_name": "assttd", + "dest_type": "date", + "description": "Settle Date" + }, + { + "source_name": "ASTRMP", + "source_type": "NUMERIC(3,0)", + "dest_name": "astrmp", + "dest_type": "numeric(3,0)", + "description": "Terms Percentage" + }, + { + "source_name": "ASSREF", + "source_type": "CHAR(30)", + "dest_name": "assref", + "dest_type": "text", + "description": "Invoice Shipment Reference" + }, + { + "source_name": "ASPJNM", + "source_type": "CHAR(20)", + "dest_name": "aspjnm", + "dest_type": "text", + "description": "Project Number" + }, + { + "source_name": "ASDSPR", + "source_type": "NUMERIC(15,5)", + "dest_name": "asdspr", + "dest_type": "numeric(15,5)", + "description": "Discount Percent" + }, + { + "source_name": "ASFUT7", + "source_type": "CHAR(10)", + "dest_name": "asfut7", + "dest_type": "text", + "description": "Fiscal Century+ Year+Period" + }, + { + "source_name": "ASFUT8", + "source_type": "CHAR(10)", + "dest_name": "asfut8", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT9", + "source_type": "CHAR(20)", + "dest_name": "asfut9", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT10", + "source_type": "CHAR(30)", + "dest_name": "asfut10", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "ASFUT11", + "source_type": "CHAR(30)", + "dest_name": "asfut11", + "dest_type": "text", + "description": "Future Use" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/arop.sql b/config/modules/arop.sql new file mode 100644 index 0000000..e74767e --- /dev/null +++ b/config/modules/arop.sql @@ -0,0 +1,70 @@ +SELECT + RTRIM(ASCOMP) AS ascomp, + RTRIM(ASCUST) AS ascust, + RTRIM("ASINV#") AS "asinv#", + RTRIM(ASITYP) AS asityp, + CASE WHEN ASIDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASIDAT END AS asidat, + CASE WHEN ASTDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASTDAT END AS astdat, + CASE WHEN ASDDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASDDAT END AS asddat, + RTRIM(ASTRTP) AS astrtp, + ASINAM AS asinam, + ASDIS AS asdis, + ASADJ AS asadj, + ASPAY AS aspay, + ASDUAM AS asduam, + ASDWO AS asdwo, + ASDED AS asded, + ASHLD AS ashld, + CASE WHEN ASHDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASHDAT END AS ashdat, + CASE WHEN ASPDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASPDAT END AS aspdat, + RTRIM("ASCHQ#") AS "aschq#", + ASCPAM AS ascpam, + RTRIM(ASCURA) AS ascura, + ASEXRT AS asexrt, + ASFSYR AS asfsyr, + ASFSPR AS asfspr, + RTRIM(ASBCHQ) AS asbchq, + RTRIM(ASTRDS) AS astrds, + RTRIM("ASCOM#") AS "ascom#", + RTRIM(ASARAC) AS asarac, + RTRIM(ASSLMN) AS asslmn, + RTRIM(ASTERR) AS asterr, + ASBTCH AS asbtch, + ASBTAM AS asbtam, + ASTPST AS astpst, + ASTFST AS astfst, + ASTCST AS astcst, + ASODIS AS asodis, + RTRIM(ASORIN) AS asorin, + RTRIM("ASBOL#") AS "asbol#", + ASINVN AS asinvn, + ASBOLN AS asboln, + ASHQCO AS ashqco, + ASHQBT AS ashqbt, + RTRIM(ASFUT1) AS asfut1, + RTRIM(ASFUT2) AS asfut2, + RTRIM(ASFUT3) AS asfut3, + RTRIM(ASFUT4) AS asfut4, + RTRIM(ASFUT5) AS asfut5, + ASFUT6 AS asfut6, + RTRIM(ASFLG1) AS asflg1, + RTRIM(ASFLG2) AS asflg2, + RTRIM(ASFLG3) AS asflg3, + RTRIM(ASFLG4) AS asflg4, + RTRIM(ASFLG5) AS asflg5, + ASWTCN AS aswtcn, + ASWTCD AS aswtcd, + RTRIM(ASCPON) AS ascpon, + RTRIM(ASCRTY) AS ascrty, + ASSTTM AS assttm, + CASE WHEN ASSTTD IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE ASSTTD END AS assttd, + ASTRMP AS astrmp, + RTRIM(ASSREF) AS assref, + RTRIM(ASPJNM) AS aspjnm, + ASDSPR AS asdspr, + RTRIM(ASFUT7) AS asfut7, + RTRIM(ASFUT8) AS asfut8, + RTRIM(ASFUT9) AS asfut9, + RTRIM(ASFUT10) AS asfut10, + RTRIM(ASFUT11) AS asfut11 +FROM LGDAT.AROP diff --git a/config/modules/artrn.json b/config/modules/artrn.json new file mode 100644 index 0000000..a9f3e81 --- /dev/null +++ b/config/modules/artrn.json @@ -0,0 +1,239 @@ +{ + "name": "artrn", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.artrn", + "staging_table": "pipekit_staging.artrn", + "merge_strategy": "incremental", + "merge_key": "lotnx", + "enabled": 1, + "dest_description": "A/R Payment Transactions 6.0", + "columns": [ + { + "source_name": "LOCOMP", + "source_type": "CHAR(2)", + "dest_name": "locomp", + "dest_type": "text", + "description": "Company Code Alpha" + }, + { + "source_name": "LOCUST", + "source_type": "CHAR(8)", + "dest_name": "locust", + "dest_type": "text", + "description": "Customer Code" + }, + { + "source_name": "LOINV#", + "source_type": "CHAR(15)", + "dest_name": "loinv#", + "dest_type": "text", + "description": "Invoice Number" + }, + { + "source_name": "LOTTYP", + "source_type": "CHAR(2)", + "dest_name": "lottyp", + "dest_type": "text", + "description": "Trans Typ" + }, + { + "source_name": "LOIDAT", + "source_type": "DATE", + "dest_name": "loidat", + "dest_type": "date", + "description": "Invoice Date" + }, + { + "source_name": "LOTDAT", + "source_type": "DATE", + "dest_name": "lotdat", + "dest_type": "date", + "description": "Transaction Date" + }, + { + "source_name": "LOTRTP", + "source_type": "CHAR(3)", + "dest_name": "lotrtp", + "dest_type": "text", + "description": "Transaction Type" + }, + { + "source_name": "LOAMT", + "source_type": "NUMERIC(11,2)", + "dest_name": "loamt", + "dest_type": "numeric(11,2)", + "description": "Amount" + }, + { + "source_name": "LOCURR", + "source_type": "CHAR(2)", + "dest_name": "locurr", + "dest_type": "text", + "description": "Currency Code" + }, + { + "source_name": "LOCHQ#", + "source_type": "CHAR(15)", + "dest_name": "lochq#", + "dest_type": "text", + "description": "Cheque #" + }, + { + "source_name": "LOTRDS", + "source_type": "CHAR(30)", + "dest_name": "lotrds", + "dest_type": "text", + "description": "Transaction Description" + }, + { + "source_name": "LOCOM#", + "source_type": "CHAR(2)", + "dest_name": "locom#", + "dest_type": "text", + "description": "G/L Company Code" + }, + { + "source_name": "LOARAC", + "source_type": "CHAR(10)", + "dest_name": "loarac", + "dest_type": "text", + "description": "G/L Account" + }, + { + "source_name": "A1", + "source_type": "CHAR(12)", + "dest_name": "a1", + "dest_type": "text", + "description": "A1" + }, + { + "source_name": "LOFSYR", + "source_type": "NUMERIC(2,0)", + "dest_name": "lofsyr", + "dest_type": "numeric(2,0)", + "description": "Fiscal Year" + }, + { + "source_name": "LOFSPR", + "source_type": "NUMERIC(2,0)", + "dest_name": "lofspr", + "dest_type": "numeric(2,0)", + "description": "Fiscal Period" + }, + { + "source_name": "A2", + "source_type": "CHAR(14)", + "dest_name": "a2", + "dest_type": "text", + "description": "A2" + }, + { + "source_name": "LOPCUS", + "source_type": "CHAR(8)", + "dest_name": "lopcus", + "dest_type": "text", + "description": "Chq Paid by Cust #" + }, + { + "source_name": "LOCHDT", + "source_type": "DATE", + "dest_name": "lochdt", + "dest_type": "date", + "description": "Cheque Date" + }, + { + "source_name": "LOMAJR", + "source_type": "CHAR(3)", + "dest_name": "lomajr", + "dest_type": "text", + "description": "Major Sales Code" + }, + { + "source_name": "LOMINR", + "source_type": "CHAR(3)", + "dest_name": "lominr", + "dest_type": "text", + "description": "Minor Sales Code" + }, + { + "source_name": "LOTERY", + "source_type": "CHAR(3)", + "dest_name": "lotery", + "dest_type": "text", + "description": "Territory Code" + }, + { + "source_name": "LOCUSR", + "source_type": "CHAR(8)", + "dest_name": "locusr", + "dest_type": "text", + "description": "Customer Ref" + }, + { + "source_name": "LOARBC", + "source_type": "CHAR(3)", + "dest_name": "loarbc", + "dest_type": "text", + "description": "A/R Bank Code" + }, + { + "source_name": "LOPYBC", + "source_type": "CHAR(3)", + "dest_name": "lopybc", + "dest_type": "text", + "description": "Payment Bank code" + }, + { + "source_name": "LOCRID", + "source_type": "NUMERIC(9,0)", + "dest_name": "locrid", + "dest_type": "numeric(9,0)", + "description": "Cheque RecordID" + }, + { + "source_name": "LOCUEX", + "source_type": "NUMERIC(11,6)", + "dest_name": "locuex", + "dest_type": "numeric(11,6)", + "description": "Currency Exchange Rate" + }, + { + "source_name": "LOTNX", + "source_type": "NUMERIC(9,0)", + "dest_name": "lotnx", + "dest_type": "numeric(9,0)", + "description": "Transaction Number" + }, + { + "source_name": "LOABTH", + "source_type": "NUMERIC(2,0)", + "dest_name": "loabth", + "dest_type": "numeric(2,0)", + "description": "Adjustment Batch Number" + }, + { + "source_name": "LOCBTH", + "source_type": "NUMERIC(2,0)", + "dest_name": "locbth", + "dest_type": "numeric(2,0)", + "description": "Cash Entry Batch Number" + }, + { + "source_name": "LOVAMT", + "source_type": "NUMERIC(11,2)", + "dest_name": "lovamt", + "dest_type": "numeric(11,2)", + "description": "Voided Amount" + } + ], + "watermarks": [ + { + "name": "lotnx", + "connection": "usmidsap02", + "resolver_sql": "select max(lotnx) from cms.artrn", + "default_value": "1" + } + ], + "hooks": [] +} diff --git a/config/modules/artrn.sql b/config/modules/artrn.sql new file mode 100644 index 0000000..25d69c8 --- /dev/null +++ b/config/modules/artrn.sql @@ -0,0 +1,34 @@ +SELECT + RTRIM(LOCOMP) AS locomp, + RTRIM(LOCUST) AS locust, + RTRIM("LOINV#") AS "loinv#", + RTRIM(LOTTYP) AS lottyp, + CASE WHEN LOIDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE LOIDAT END AS loidat, + CASE WHEN LOTDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE LOTDAT END AS lotdat, + RTRIM(LOTRTP) AS lotrtp, + LOAMT AS loamt, + RTRIM(LOCURR) AS locurr, + RTRIM("LOCHQ#") AS "lochq#", + RTRIM(LOTRDS) AS lotrds, + RTRIM("LOCOM#") AS "locom#", + RTRIM(LOARAC) AS loarac, + RTRIM(A1) AS a1, + LOFSYR AS lofsyr, + LOFSPR AS lofspr, + RTRIM(A2) AS a2, + RTRIM(LOPCUS) AS lopcus, + CASE WHEN LOCHDT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE LOCHDT END AS lochdt, + RTRIM(LOMAJR) AS lomajr, + RTRIM(LOMINR) AS lominr, + RTRIM(LOTERY) AS lotery, + RTRIM(LOCUSR) AS locusr, + RTRIM(LOARBC) AS loarbc, + RTRIM(LOPYBC) AS lopybc, + LOCRID AS locrid, + LOCUEX AS locuex, + LOTNX AS lotnx, + LOABTH AS loabth, + LOCBTH AS locbth, + LOVAMT AS lovamt +FROM LGDAT.ARTRN +WHERE LOTNX >= {lotnx} diff --git a/config/modules/binb.json b/config/modules/binb.json new file mode 100644 index 0000000..b0cf099 --- /dev/null +++ b/config/modules/binb.json @@ -0,0 +1,120 @@ +{ + "name": "binb", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.binb", + "staging_table": "pipekit_staging.binb", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Bin Balances 6.0", + "columns": [ + { + "source_name": "LQSTKL", + "source_type": "CHAR(6)", + "dest_name": "lqstkl", + "dest_type": "text", + "description": "Stock Location" + }, + { + "source_name": "LQBIN#", + "source_type": "CHAR(10)", + "dest_name": "lqbin#", + "dest_type": "text", + "description": "Bin Code" + }, + { + "source_name": "LQPART", + "source_type": "CHAR(20)", + "dest_name": "lqpart", + "dest_type": "text", + "description": "Part Number" + }, + { + "source_name": "LQLOT#", + "source_type": "CHAR(15)", + "dest_name": "lqlot#", + "dest_type": "text", + "description": "Lot Number" + }, + { + "source_name": "LQQTYH", + "source_type": "NUMERIC(15,5)", + "dest_name": "lqqtyh", + "dest_type": "numeric(15,5)", + "description": "Qty on hand in base unit" + }, + { + "source_name": "LQBTC#", + "source_type": "NUMERIC(5,0)", + "dest_name": "lqbtc#", + "dest_type": "numeric(5,0)", + "description": "Physical Inventory Batch Number" + }, + { + "source_name": "LQRDAT", + "source_type": "DATE", + "dest_name": "lqrdat", + "dest_type": "date", + "description": "Last Receipt Date" + }, + { + "source_name": "LQIDAT", + "source_type": "DATE", + "dest_name": "lqidat", + "dest_type": "date", + "description": "Last Issue Date" + }, + { + "source_name": "LQQTY", + "source_type": "NUMERIC(15,5)", + "dest_name": "lqqty", + "dest_type": "numeric(15,5)", + "description": "Qty on hand" + }, + { + "source_name": "LQUNIT", + "source_type": "CHAR(3)", + "dest_name": "lqunit", + "dest_type": "text", + "description": "Unit of Measure" + }, + { + "source_name": "LQPLNT", + "source_type": "CHAR(3)", + "dest_name": "lqplnt", + "dest_type": "text", + "description": "Plant Code" + }, + { + "source_name": "LQMINQ", + "source_type": "NUMERIC(15,5)", + "dest_name": "lqminq", + "dest_type": "numeric(15,5)", + "description": "Minimum Quantity" + }, + { + "source_name": "LQMAXQ", + "source_type": "NUMERIC(15,5)", + "dest_name": "lqmaxq", + "dest_type": "numeric(15,5)", + "description": "Maximum Quantity" + }, + { + "source_name": "LQRPLQ", + "source_type": "NUMERIC(15,5)", + "dest_name": "lqrplq", + "dest_type": "numeric(15,5)", + "description": "Replenishment Multiplier" + }, + { + "source_name": "LQLEXP", + "source_type": "DATE", + "dest_name": "lqlexp", + "dest_type": "date", + "description": "Lot Expiry Date" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/binb.sql b/config/modules/binb.sql new file mode 100644 index 0000000..8e14a3c --- /dev/null +++ b/config/modules/binb.sql @@ -0,0 +1,19 @@ +SELECT + RTRIM(LQSTKL) AS lqstkl, + RTRIM("LQBIN#") AS "lqbin#", + RTRIM(LQPART) AS lqpart, + RTRIM("LQLOT#") AS "lqlot#", + LQQTYH AS lqqtyh, + "LQBTC#" AS "lqbtc#", + CASE WHEN LQRDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE LQRDAT END AS lqrdat, + CASE WHEN LQIDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE LQIDAT END AS lqidat, + LQQTY AS lqqty, + RTRIM(LQUNIT) AS lqunit, + RTRIM(LQPLNT) AS lqplnt, + LQMINQ AS lqminq, + LQMAXQ AS lqmaxq, + LQRPLQ AS lqrplq, + CASE WHEN LQLEXP IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE LQLEXP END AS lqlexp +FROM LGDAT.BINB +WHERE + LQQTY <> 0 diff --git a/config/modules/bold.json b/config/modules/bold.json new file mode 100644 index 0000000..1bb85e4 --- /dev/null +++ b/config/modules/bold.json @@ -0,0 +1,631 @@ +{ + "name": "bold", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.bold", + "staging_table": "pipekit_staging.bold", + "merge_strategy": "incremental", + "merge_key": "fgbol#", + "enabled": 1, + "dest_description": "Bill of Lading Detail 6.1", + "columns": [ + { + "source_name": "FGBOL#", + "source_type": "NUMERIC(9,0)", + "dest_name": "fgbol#", + "dest_type": "numeric(9,0)", + "description": "BOL Number" + }, + { + "source_name": "FGENT#", + "source_type": "NUMERIC(3,0)", + "dest_name": "fgent#", + "dest_type": "numeric(3,0)", + "description": "BOL Detail Number" + }, + { + "source_name": "FGORD#", + "source_type": "NUMERIC(9,0)", + "dest_name": "fgord#", + "dest_type": "numeric(9,0)", + "description": "Customer Order Number" + }, + { + "source_name": "FGITEM", + "source_type": "NUMERIC(3,0)", + "dest_name": "fgitem", + "dest_type": "numeric(3,0)", + "description": "Item Number" + }, + { + "source_name": "FGPO#", + "source_type": "NUMERIC(9,0)", + "dest_name": "fgpo#", + "dest_type": "numeric(9,0)", + "description": "P/O #" + }, + { + "source_name": "FGPREL", + "source_type": "NUMERIC(4,0)", + "dest_name": "fgprel", + "dest_type": "numeric(4,0)", + "description": "P/O Release #" + }, + { + "source_name": "FGPITM", + "source_type": "NUMERIC(3,0)", + "dest_name": "fgpitm", + "dest_type": "numeric(3,0)", + "description": "P/O Item #" + }, + { + "source_name": "FGQSHP", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgqshp", + "dest_type": "numeric(15,5)", + "description": "Shipping Quantity Base" + }, + { + "source_name": "FGQSHO", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgqsho", + "dest_type": "numeric(15,5)", + "description": "Shipping Quantity OE" + }, + { + "source_name": "FGCTNC", + "source_type": "CHAR(3)", + "dest_name": "fgctnc", + "dest_type": "text", + "description": "Container Code" + }, + { + "source_name": "FGCTNN", + "source_type": "NUMERIC(5,0)", + "dest_name": "fgctnn", + "dest_type": "numeric(5,0)", + "description": "# of Containers" + }, + { + "source_name": "FGPLTN", + "source_type": "NUMERIC(3,0)", + "dest_name": "fgpltn", + "dest_type": "numeric(3,0)", + "description": "# of Pallets" + }, + { + "source_name": "FGNTWC", + "source_type": "NUMERIC(8,2)", + "dest_name": "fgntwc", + "dest_type": "numeric(8,2)", + "description": "Net Weight / Container" + }, + { + "source_name": "FGGRSC", + "source_type": "NUMERIC(8,2)", + "dest_name": "fggrsc", + "dest_type": "numeric(8,2)", + "description": "Gross Weight / Container" + }, + { + "source_name": "FGTARC", + "source_type": "NUMERIC(8,2)", + "dest_name": "fgtarc", + "dest_type": "numeric(8,2)", + "description": "Tare Weight / Container" + }, + { + "source_name": "FGVOLC", + "source_type": "NUMERIC(8,2)", + "dest_name": "fgvolc", + "dest_type": "numeric(8,2)", + "description": "Volume per Container" + }, + { + "source_name": "FGQTYC", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgqtyc", + "dest_type": "numeric(15,5)", + "description": "Quantity /Container" + }, + { + "source_name": "FGWGTP", + "source_type": "NUMERIC(8,2)", + "dest_name": "fgwgtp", + "dest_type": "numeric(8,2)", + "description": "Weight of shipment" + }, + { + "source_name": "FGVOLP", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgvolp", + "dest_type": "numeric(15,5)", + "description": "Volume of shipment" + }, + { + "source_name": "FGLSTS", + "source_type": "CHAR(1)", + "dest_name": "fglsts", + "dest_type": "text", + "description": "Status" + }, + { + "source_name": "FGPART", + "source_type": "CHAR(20)", + "dest_name": "fgpart", + "dest_type": "text", + "description": "Part Number" + }, + { + "source_name": "FGRLNO", + "source_type": "CHAR(8)", + "dest_name": "fgrlno", + "dest_type": "text", + "description": "Release Number" + }, + { + "source_name": "FGINV#", + "source_type": "NUMERIC(9,0)", + "dest_name": "fginv#", + "dest_type": "numeric(9,0)", + "description": "Invoice Number" + }, + { + "source_name": "FGLIN#", + "source_type": "NUMERIC(3,0)", + "dest_name": "fglin#", + "dest_type": "numeric(3,0)", + "description": "Detail Number" + }, + { + "source_name": "FGORUN", + "source_type": "CHAR(3)", + "dest_name": "fgorun", + "dest_type": "text", + "description": "Order Unit" + }, + { + "source_name": "FGFTAM", + "source_type": "NUMERIC(10,2)", + "dest_name": "fgftam", + "dest_type": "numeric(10,2)", + "description": "Freight Amount" + }, + { + "source_name": "FGSTKL", + "source_type": "CHAR(6)", + "dest_name": "fgstkl", + "dest_type": "text", + "description": "Stock Location" + }, + { + "source_name": "FGRAN#", + "source_type": "CHAR(20)", + "dest_name": "fgran#", + "dest_type": "text", + "description": "RAN Number" + }, + { + "source_name": "FGCPT#", + "source_type": "CHAR(30)", + "dest_name": "fgcpt#", + "dest_type": "text", + "description": "Customer Part Number" + }, + { + "source_name": "FGCNID", + "source_type": "CHAR(30)", + "dest_name": "fgcnid", + "dest_type": "text", + "description": "Shipping Container" + }, + { + "source_name": "FGECHG", + "source_type": "CHAR(30)", + "dest_name": "fgechg", + "dest_type": "text", + "description": "Eng. Change Number" + }, + { + "source_name": "FGCCUM", + "source_type": "NUMERIC(12,0)", + "dest_name": "fgccum", + "dest_type": "numeric(12,0)", + "description": "Current Cum Quantity" + }, + { + "source_name": "FGPCUM", + "source_type": "NUMERIC(12,0)", + "dest_name": "fgpcum", + "dest_type": "numeric(12,0)", + "description": "Previous Cum Quantity" + }, + { + "source_name": "FGCPO#", + "source_type": "CHAR(25)", + "dest_name": "fgcpo#", + "dest_type": "text", + "description": "Customer P/O" + }, + { + "source_name": "FGCMPR", + "source_type": "CHAR(2)", + "dest_name": "fgcmpr", + "dest_type": "text", + "description": "Complete Partial" + }, + { + "source_name": "FGDOCK", + "source_type": "CHAR(30)", + "dest_name": "fgdock", + "dest_type": "text", + "description": "Dock Code" + }, + { + "source_name": "FGISTS", + "source_type": "CHAR(1)", + "dest_name": "fgists", + "dest_type": "text", + "description": "ASN Item Status" + }, + { + "source_name": "FGSREF", + "source_type": "CHAR(20)", + "dest_name": "fgsref", + "dest_type": "text", + "description": "Shipment Reference" + }, + { + "source_name": "FGCRCM", + "source_type": "CHAR(1)", + "dest_name": "fgcrcm", + "dest_type": "text", + "description": "Current/ Complete" + }, + { + "source_name": "FGUSR1", + "source_type": "CHAR(20)", + "dest_name": "fgusr1", + "dest_type": "text", + "description": "Discrepancy Code" + }, + { + "source_name": "FGUSR2", + "source_type": "CHAR(20)", + "dest_name": "fgusr2", + "dest_type": "text", + "description": "User Field 2" + }, + { + "source_name": "FGUSR3", + "source_type": "CHAR(20)", + "dest_name": "fgusr3", + "dest_type": "text", + "description": "User Field 3" + }, + { + "source_name": "FGREQ#", + "source_type": "NUMERIC(9,0)", + "dest_name": "fgreq#", + "dest_type": "numeric(9,0)", + "description": "Transfer Request#" + }, + { + "source_name": "FGDREQ", + "source_type": "NUMERIC(3,0)", + "dest_name": "fgdreq", + "dest_type": "numeric(3,0)", + "description": "Transfer Req Detail#" + }, + { + "source_name": "FGJITD", + "source_type": "NUMERIC(8,0)", + "dest_name": "fgjitd", + "dest_type": "numeric(8,0)", + "description": "JITDX2 Key" + }, + { + "source_name": "FGUSR4", + "source_type": "CHAR(20)", + "dest_name": "fgusr4", + "dest_type": "text", + "description": "User Field 4" + }, + { + "source_name": "FGUSR5", + "source_type": "CHAR(20)", + "dest_name": "fgusr5", + "dest_type": "text", + "description": "User Field 5" + }, + { + "source_name": "FGFUT1", + "source_type": "CHAR(10)", + "dest_name": "fgfut1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUT2", + "source_type": "CHAR(10)", + "dest_name": "fgfut2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUT3", + "source_type": "CHAR(20)", + "dest_name": "fgfut3", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUT4", + "source_type": "CHAR(20)", + "dest_name": "fgfut4", + "dest_type": "text", + "description": "Link IASND" + }, + { + "source_name": "FGFUT5", + "source_type": "CHAR(30)", + "dest_name": "fgfut5", + "dest_type": "text", + "description": "SBI Shipment ID" + }, + { + "source_name": "FGFUTA", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgfuta", + "dest_type": "numeric(15,5)", + "description": "Original Qty Shipped" + }, + { + "source_name": "FGFUTB", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgfutb", + "dest_type": "numeric(15,5)", + "description": "1st Level BLWT Component Line #" + }, + { + "source_name": "FGFUTC", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgfutc", + "dest_type": "numeric(15,5)", + "description": "Per Unit Freight in Order Unit" + }, + { + "source_name": "FGFUTD", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgfutd", + "dest_type": "numeric(15,5)", + "description": "Handling Fee Percentage" + }, + { + "source_name": "FGFUTE", + "source_type": "CHAR(3)", + "dest_name": "fgfute", + "dest_type": "text", + "description": "Toyota Manifest Shipment Counter" + }, + { + "source_name": "FGFUTF", + "source_type": "CHAR(3)", + "dest_name": "fgfutf", + "dest_type": "text", + "description": "Receiving Log Line #" + }, + { + "source_name": "FGFUTG", + "source_type": "CHAR(10)", + "dest_name": "fgfutg", + "dest_type": "text", + "description": "Receiving Log #" + }, + { + "source_name": "FGFUTH", + "source_type": "CHAR(10)", + "dest_name": "fgfuth", + "dest_type": "text", + "description": "Toyota Manifest Shipment Truck ID" + }, + { + "source_name": "FGFUTI", + "source_type": "CHAR(10)", + "dest_name": "fgfuti", + "dest_type": "text", + "description": "ATS Pick Group" + }, + { + "source_name": "FGFUTJ", + "source_type": "CHAR(10)", + "dest_name": "fgfutj", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUTK", + "source_type": "CHAR(20)", + "dest_name": "fgfutk", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUTL", + "source_type": "CHAR(20)", + "dest_name": "fgfutl", + "dest_type": "text", + "description": "Toyota Kanban Number" + }, + { + "source_name": "FGFUTM", + "source_type": "CHAR(20)", + "dest_name": "fgfutm", + "dest_type": "text", + "description": "Toyota Manifest Shipment Invoice #" + }, + { + "source_name": "FGFUTN", + "source_type": "CHAR(20)", + "dest_name": "fgfutn", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUTO", + "source_type": "CHAR(20)", + "dest_name": "fgfuto", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUTP", + "source_type": "CHAR(1)", + "dest_name": "fgfutp", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUTQ", + "source_type": "CHAR(1)", + "dest_name": "fgfutq", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUTR", + "source_type": "CHAR(1)", + "dest_name": "fgfutr", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUTS", + "source_type": "CHAR(1)", + "dest_name": "fgfuts", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUTT", + "source_type": "CHAR(1)", + "dest_name": "fgfutt", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGPLNT", + "source_type": "CHAR(3)", + "dest_name": "fgplnt", + "dest_type": "text", + "description": "Plant Code" + }, + { + "source_name": "FGBUNT", + "source_type": "CHAR(3)", + "dest_name": "fgbunt", + "dest_type": "text", + "description": "Base Unit" + }, + { + "source_name": "FGRPBR", + "source_type": "CHAR(10)", + "dest_name": "fgrpbr", + "dest_type": "text", + "description": "Remit Paid by RAN" + }, + { + "source_name": "FGNWFP", + "source_type": "NUMERIC(8,2)", + "dest_name": "fgnwfp", + "dest_type": "numeric(8,2)", + "description": "Net Weight" + }, + { + "source_name": "FGCREL", + "source_type": "CHAR(20)", + "dest_name": "fgcrel", + "dest_type": "text", + "description": "Current Rel/Ref" + }, + { + "source_name": "FGPSLP", + "source_type": "CHAR(30)", + "dest_name": "fgpslp", + "dest_type": "text", + "description": "Packing Slip" + }, + { + "source_name": "FGRMID", + "source_type": "CHAR(30)", + "dest_name": "fgrmid", + "dest_type": "text", + "description": "Remit ID" + }, + { + "source_name": "FGCREV", + "source_type": "CHAR(30)", + "dest_name": "fgcrev", + "dest_type": "text", + "description": "Cust Rev Number" + }, + { + "source_name": "FGREFF", + "source_type": "CHAR(30)", + "dest_name": "fgreff", + "dest_type": "text", + "description": "Reference Field" + }, + { + "source_name": "FGFUT6", + "source_type": "CHAR(30)", + "dest_name": "fgfut6", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUT7", + "source_type": "CHAR(30)", + "dest_name": "fgfut7", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUT8", + "source_type": "CHAR(30)", + "dest_name": "fgfut8", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FGFUT9", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgfut9", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "FGFUT10", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgfut10", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "FGFUT11", + "source_type": "NUMERIC(15,5)", + "dest_name": "fgfut11", + "dest_type": "numeric(15,5)", + "description": "Future Use" + } + ], + "watermarks": [ + { + "name": "bold_wm", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(fecdat), DATE '1900-01-01') - 21 FROM cms.bolh", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/bold.sql b/config/modules/bold.sql new file mode 100644 index 0000000..59a3462 --- /dev/null +++ b/config/modules/bold.sql @@ -0,0 +1,97 @@ +WITH changed AS ( + SELECT "FEBOL#" FROM lgdat.bolh + WHERE (FECDAT BETWEEN '{bold_wm}' AND CURRENT_DATE) + OR (FEPDAT BETWEEN '{bold_wm}' AND CURRENT_DATE) + OR (FEDDAT BETWEEN '{bold_wm}' AND CURRENT_DATE) + OR (FEPDAT IS NULL AND FEDDAT IS NULL AND FECDAT >= CURRENT_DATE - 90 DAYS) +) +SELECT + "FGBOL#" AS "fgbol#", + "FGENT#" AS "fgent#", + "FGORD#" AS "fgord#", + FGITEM AS fgitem, + "FGPO#" AS "fgpo#", + FGPREL AS fgprel, + FGPITM AS fgpitm, + FGQSHP AS fgqshp, + FGQSHO AS fgqsho, + RTRIM(FGCTNC) AS fgctnc, + FGCTNN AS fgctnn, + FGPLTN AS fgpltn, + FGNTWC AS fgntwc, + FGGRSC AS fggrsc, + FGTARC AS fgtarc, + FGVOLC AS fgvolc, + FGQTYC AS fgqtyc, + FGWGTP AS fgwgtp, + FGVOLP AS fgvolp, + RTRIM(FGLSTS) AS fglsts, + RTRIM(FGPART) AS fgpart, + RTRIM(FGRLNO) AS fgrlno, + "FGINV#" AS "fginv#", + "FGLIN#" AS "fglin#", + RTRIM(FGORUN) AS fgorun, + FGFTAM AS fgftam, + RTRIM(FGSTKL) AS fgstkl, + RTRIM("FGRAN#") AS "fgran#", + RTRIM("FGCPT#") AS "fgcpt#", + RTRIM(FGCNID) AS fgcnid, + RTRIM(FGECHG) AS fgechg, + FGCCUM AS fgccum, + FGPCUM AS fgpcum, + RTRIM("FGCPO#") AS "fgcpo#", + RTRIM(FGCMPR) AS fgcmpr, + RTRIM(FGDOCK) AS fgdock, + RTRIM(FGISTS) AS fgists, + RTRIM(FGSREF) AS fgsref, + RTRIM(FGCRCM) AS fgcrcm, + RTRIM(FGUSR1) AS fgusr1, + RTRIM(FGUSR2) AS fgusr2, + RTRIM(FGUSR3) AS fgusr3, + "FGREQ#" AS "fgreq#", + FGDREQ AS fgdreq, + FGJITD AS fgjitd, + RTRIM(FGUSR4) AS fgusr4, + RTRIM(FGUSR5) AS fgusr5, + RTRIM(FGFUT1) AS fgfut1, + RTRIM(FGFUT2) AS fgfut2, + RTRIM(FGFUT3) AS fgfut3, + RTRIM(FGFUT4) AS fgfut4, + RTRIM(FGFUT5) AS fgfut5, + FGFUTA AS fgfuta, + FGFUTB AS fgfutb, + FGFUTC AS fgfutc, + FGFUTD AS fgfutd, + RTRIM(FGFUTE) AS fgfute, + RTRIM(FGFUTF) AS fgfutf, + RTRIM(FGFUTG) AS fgfutg, + RTRIM(FGFUTH) AS fgfuth, + RTRIM(FGFUTI) AS fgfuti, + RTRIM(FGFUTJ) AS fgfutj, + RTRIM(FGFUTK) AS fgfutk, + RTRIM(FGFUTL) AS fgfutl, + RTRIM(FGFUTM) AS fgfutm, + RTRIM(FGFUTN) AS fgfutn, + RTRIM(FGFUTO) AS fgfuto, + RTRIM(FGFUTP) AS fgfutp, + RTRIM(FGFUTQ) AS fgfutq, + RTRIM(FGFUTR) AS fgfutr, + RTRIM(FGFUTS) AS fgfuts, + RTRIM(FGFUTT) AS fgfutt, + RTRIM(FGPLNT) AS fgplnt, + RTRIM(FGBUNT) AS fgbunt, + RTRIM(FGRPBR) AS fgrpbr, + FGNWFP AS fgnwfp, + RTRIM(FGCREL) AS fgcrel, + RTRIM(FGPSLP) AS fgpslp, + RTRIM(FGRMID) AS fgrmid, + RTRIM(FGCREV) AS fgcrev, + RTRIM(FGREFF) AS fgreff, + RTRIM(FGFUT6) AS fgfut6, + RTRIM(FGFUT7) AS fgfut7, + RTRIM(FGFUT8) AS fgfut8, + FGFUT9 AS fgfut9, + FGFUT10 AS fgfut10, + FGFUT11 AS fgfut11 +FROM LGDAT.BOLD +WHERE "FGBOL#" IN (SELECT "FEBOL#" FROM changed) diff --git a/config/modules/bolh.json b/config/modules/bolh.json new file mode 100644 index 0000000..7cc9660 --- /dev/null +++ b/config/modules/bolh.json @@ -0,0 +1,1296 @@ +{ + "name": "bolh", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.bolh", + "staging_table": "pipekit_staging.bolh", + "merge_strategy": "incremental", + "merge_key": "febol#", + "enabled": 1, + "dest_description": "Bill of Lading Header 6.1", + "columns": [ + { + "source_name": "FEBOL#", + "source_type": "NUMERIC(9,0)", + "dest_name": "febol#", + "dest_type": "numeric(9,0)", + "description": "BOL Number" + }, + { + "source_name": "FEBTYP", + "source_type": "CHAR(1)", + "dest_name": "febtyp", + "dest_type": "text", + "description": "BOL Type" + }, + { + "source_name": "FECDAT", + "source_type": "DATE", + "dest_name": "fecdat", + "dest_type": "date", + "description": "Date Created" + }, + { + "source_name": "FEPIND", + "source_type": "CHAR(1)", + "dest_name": "fepind", + "dest_type": "text", + "description": "Print Ind." + }, + { + "source_name": "FESIND", + "source_type": "CHAR(1)", + "dest_name": "fesind", + "dest_type": "text", + "description": "Shipped Ind" + }, + { + "source_name": "FEBCS#", + "source_type": "CHAR(8)", + "dest_name": "febcs#", + "dest_type": "text", + "description": "Bill To Cust # /Ship To Whse" + }, + { + "source_name": "FESCS#", + "source_type": "CHAR(8)", + "dest_name": "fescs#", + "dest_type": "text", + "description": "Ship To Cust # /Ship From Whse" + }, + { + "source_name": "FESVND", + "source_type": "CHAR(10)", + "dest_name": "fesvnd", + "dest_type": "text", + "description": "Ship To Vendor #" + }, + { + "source_name": "FERVND", + "source_type": "CHAR(10)", + "dest_name": "fervnd", + "dest_type": "text", + "description": "Remit To Vendor #" + }, + { + "source_name": "FEBNME", + "source_type": "CHAR(30)", + "dest_name": "febnme", + "dest_type": "text", + "description": "Bill To Name /Ship To Whse Name" + }, + { + "source_name": "FEBPTC", + "source_type": "CHAR(30)", + "dest_name": "febptc", + "dest_type": "text", + "description": "Bill To Postal /Ship Frm Whs Postal" + }, + { + "source_name": "FEATTN", + "source_type": "CHAR(25)", + "dest_name": "feattn", + "dest_type": "text", + "description": "Attention" + }, + { + "source_name": "FESNME", + "source_type": "CHAR(30)", + "dest_name": "fesnme", + "dest_type": "text", + "description": "Ship To Name /Ship From Whse Name" + }, + { + "source_name": "FESAD1", + "source_type": "CHAR(35)", + "dest_name": "fesad1", + "dest_type": "text", + "description": "Ship To Add1" + }, + { + "source_name": "FESAD2", + "source_type": "CHAR(35)", + "dest_name": "fesad2", + "dest_type": "text", + "description": "Ship To Add2" + }, + { + "source_name": "FESAD3", + "source_type": "CHAR(35)", + "dest_name": "fesad3", + "dest_type": "text", + "description": "Ship To Add3" + }, + { + "source_name": "FESAD4", + "source_type": "CHAR(35)", + "dest_name": "fesad4", + "dest_type": "text", + "description": "Ship To Add4" + }, + { + "source_name": "FESAD5", + "source_type": "CHAR(35)", + "dest_name": "fesad5", + "dest_type": "text", + "description": "Ship To Add5" + }, + { + "source_name": "FESAD6", + "source_type": "CHAR(35)", + "dest_name": "fesad6", + "dest_type": "text", + "description": "Ship To Add6" + }, + { + "source_name": "FESAD7", + "source_type": "CHAR(35)", + "dest_name": "fesad7", + "dest_type": "text", + "description": "Ship To Add7" + }, + { + "source_name": "FESAD8", + "source_type": "CHAR(35)", + "dest_name": "fesad8", + "dest_type": "text", + "description": "Ship To Add8" + }, + { + "source_name": "FESAD9", + "source_type": "CHAR(35)", + "dest_name": "fesad9", + "dest_type": "text", + "description": "Ship To Add9" + }, + { + "source_name": "FESAD10", + "source_type": "CHAR(35)", + "dest_name": "fesad10", + "dest_type": "text", + "description": "Ship To Add10" + }, + { + "source_name": "FESPTC", + "source_type": "CHAR(30)", + "dest_name": "fesptc", + "dest_type": "text", + "description": "Ship To Postal" + }, + { + "source_name": "FESCTY", + "source_type": "CHAR(30)", + "dest_name": "fescty", + "dest_type": "text", + "description": "Shipto City" + }, + { + "source_name": "FESPOV", + "source_type": "CHAR(3)", + "dest_name": "fespov", + "dest_type": "text", + "description": "Shipto State/ Province Code" + }, + { + "source_name": "FESCRY", + "source_type": "CHAR(3)", + "dest_name": "fescry", + "dest_type": "text", + "description": "Shipto Country Code" + }, + { + "source_name": "FESDAT", + "source_type": "DATE", + "dest_name": "fesdat", + "dest_type": "date", + "description": "Shipping Date" + }, + { + "source_name": "FESVIA", + "source_type": "CHAR(30)", + "dest_name": "fesvia", + "dest_type": "text", + "description": "Ship Via" + }, + { + "source_name": "FETKID", + "source_type": "CHAR(10)", + "dest_name": "fetkid", + "dest_type": "text", + "description": "Truck ID" + }, + { + "source_name": "FENCTN", + "source_type": "NUMERIC(10,0)", + "dest_name": "fenctn", + "dest_type": "numeric(10,0)", + "description": "Number of Containers" + }, + { + "source_name": "FENETW", + "source_type": "NUMERIC(10,0)", + "dest_name": "fenetw", + "dest_type": "numeric(10,0)", + "description": "Net Weight" + }, + { + "source_name": "FEGROW", + "source_type": "NUMERIC(10,0)", + "dest_name": "fegrow", + "dest_type": "numeric(10,0)", + "description": "Gross Weight" + }, + { + "source_name": "FETARW", + "source_type": "NUMERIC(10,0)", + "dest_name": "fetarw", + "dest_type": "numeric(10,0)", + "description": "Tare Weight" + }, + { + "source_name": "FEWTUN", + "source_type": "CHAR(3)", + "dest_name": "fewtun", + "dest_type": "text", + "description": "Weight Unit" + }, + { + "source_name": "FEDOCD", + "source_type": "CHAR(10)", + "dest_name": "fedocd", + "dest_type": "text", + "description": "Dock Code" + }, + { + "source_name": "FEFTCD", + "source_type": "CHAR(1)", + "dest_name": "feftcd", + "dest_type": "text", + "description": "Freight Code" + }, + { + "source_name": "FEORD#", + "source_type": "NUMERIC(9,0)", + "dest_name": "feord#", + "dest_type": "numeric(9,0)", + "description": "Customer Order Number" + }, + { + "source_name": "FESTKL", + "source_type": "CHAR(6)", + "dest_name": "festkl", + "dest_type": "text", + "description": "Stock Location" + }, + { + "source_name": "FEFTAM", + "source_type": "NUMERIC(10,2)", + "dest_name": "feftam", + "dest_type": "numeric(10,2)", + "description": "Freight Amount" + }, + { + "source_name": "FEFOB", + "source_type": "CHAR(3)", + "dest_name": "fefob", + "dest_type": "text", + "description": "FOB Code" + }, + { + "source_name": "FECARC", + "source_type": "CHAR(17)", + "dest_name": "fecarc", + "dest_type": "text", + "description": "Carrier Code" + }, + { + "source_name": "FESERC", + "source_type": "CHAR(3)", + "dest_name": "feserc", + "dest_type": "text", + "description": "Service Code" + }, + { + "source_name": "FESTME", + "source_type": "NUMERIC(4,0)", + "dest_name": "festme", + "dest_type": "numeric(4,0)", + "description": "Ship Time HHMM" + }, + { + "source_name": "FEJITF", + "source_type": "CHAR(1)", + "dest_name": "fejitf", + "dest_type": "text", + "description": "JIT Delivery Flag" + }, + { + "source_name": "FESID#", + "source_type": "CHAR(12)", + "dest_name": "fesid#", + "dest_type": "text", + "description": "Shipment I.D." + }, + { + "source_name": "FETRPT", + "source_type": "CHAR(12)", + "dest_name": "fetrpt", + "dest_type": "text", + "description": "Trading Partner" + }, + { + "source_name": "FEBID", + "source_type": "CHAR(17)", + "dest_name": "febid", + "dest_type": "text", + "description": "Billto I.D." + }, + { + "source_name": "FESID", + "source_type": "CHAR(17)", + "dest_name": "fesid", + "dest_type": "text", + "description": "Shipto I.D." + }, + { + "source_name": "FESFID", + "source_type": "CHAR(17)", + "dest_name": "fesfid", + "dest_type": "text", + "description": "Shipfrom I.D." + }, + { + "source_name": "FEPLNT", + "source_type": "CHAR(17)", + "dest_name": "feplnt", + "dest_type": "text", + "description": "Plant I.D." + }, + { + "source_name": "FEITMC", + "source_type": "CHAR(17)", + "dest_name": "feitmc", + "dest_type": "text", + "description": "Intermed Consignee" + }, + { + "source_name": "FESUPP", + "source_type": "CHAR(17)", + "dest_name": "fesupp", + "dest_type": "text", + "description": "Supplier Code" + }, + { + "source_name": "FEULTD", + "source_type": "CHAR(17)", + "dest_name": "feultd", + "dest_type": "text", + "description": "Ultimate Destination" + }, + { + "source_name": "FEEDAT", + "source_type": "DATE", + "dest_name": "feedat", + "dest_type": "date", + "description": "Expected Date YMD" + }, + { + "source_name": "FEETIM", + "source_type": "NUMERIC(4,0)", + "dest_name": "feetim", + "dest_type": "numeric(4,0)", + "description": "Expected Time" + }, + { + "source_name": "FEADAT", + "source_type": "DATE", + "dest_name": "feadat", + "dest_type": "date", + "description": "ASN Date YMD" + }, + { + "source_name": "FEATIM", + "source_type": "NUMERIC(4,0)", + "dest_name": "featim", + "dest_type": "numeric(4,0)", + "description": "ASN Time" + }, + { + "source_name": "FETRNM", + "source_type": "CHAR(3)", + "dest_name": "fetrnm", + "dest_type": "text", + "description": "Transportation Mode TD504" + }, + { + "source_name": "FERTEG", + "source_type": "CHAR(35)", + "dest_name": "ferteg", + "dest_type": "text", + "description": "Routing TD505" + }, + { + "source_name": "FEPLPT", + "source_type": "CHAR(3)", + "dest_name": "feplpt", + "dest_type": "text", + "description": "Pool Point TD507" + }, + { + "source_name": "FEPLOC", + "source_type": "CHAR(25)", + "dest_name": "feploc", + "dest_type": "text", + "description": "Pool Location TD508" + }, + { + "source_name": "FEEQPD", + "source_type": "CHAR(3)", + "dest_name": "feeqpd", + "dest_type": "text", + "description": "Equipment Desc TD301" + }, + { + "source_name": "FEEQPI", + "source_type": "CHAR(4)", + "dest_name": "feeqpi", + "dest_type": "text", + "description": "Equipment Initial TD302" + }, + { + "source_name": "FEEQID", + "source_type": "CHAR(10)", + "dest_name": "feeqid", + "dest_type": "text", + "description": "Equipment I.D. TD303" + }, + { + "source_name": "FEMBOL", + "source_type": "NUMERIC(6,0)", + "dest_name": "fembol", + "dest_type": "numeric(6,0)", + "description": "Master B.O.L." + }, + { + "source_name": "FEPSLP", + "source_type": "CHAR(30)", + "dest_name": "fepslp", + "dest_type": "text", + "description": "Packing Slip" + }, + { + "source_name": "FEFRTB", + "source_type": "CHAR(30)", + "dest_name": "fefrtb", + "dest_type": "text", + "description": "Freight Bill" + }, + { + "source_name": "FEAIRB", + "source_type": "CHAR(30)", + "dest_name": "feairb", + "dest_type": "text", + "description": "Air Bill" + }, + { + "source_name": "FETSPR", + "source_type": "CHAR(2)", + "dest_name": "fetspr", + "dest_type": "text", + "description": "Transaction Purpose" + }, + { + "source_name": "FEETRR", + "source_type": "CHAR(2)", + "dest_name": "feetrr", + "dest_type": "text", + "description": "Excess Trans. Reason Code ETD01" + }, + { + "source_name": "FEEXTR", + "source_type": "CHAR(2)", + "dest_name": "feextr", + "dest_type": "text", + "description": "Excess Trans. Responsibility ETD02" + }, + { + "source_name": "FEAETC", + "source_type": "CHAR(30)", + "dest_name": "feaetc", + "dest_type": "text", + "description": "AETC Number ETD04" + }, + { + "source_name": "FEMTHP", + "source_type": "CHAR(2)", + "dest_name": "femthp", + "dest_type": "text", + "description": "Method Payment FOB01" + }, + { + "source_name": "FETRNT", + "source_type": "CHAR(6)", + "dest_name": "fetrnt", + "dest_type": "text", + "description": "Transport Terms FOB05" + }, + { + "source_name": "FETRLQ", + "source_type": "CHAR(2)", + "dest_name": "fetrlq", + "dest_type": "text", + "description": "Location Qual FOB06" + }, + { + "source_name": "FECCT", + "source_type": "CHAR(1)", + "dest_name": "fecct", + "dest_type": "text", + "description": "Commodity Type TD103" + }, + { + "source_name": "FECCDE", + "source_type": "CHAR(16)", + "dest_name": "feccde", + "dest_type": "text", + "description": "Commodity Code TD104" + }, + { + "source_name": "FESASN", + "source_type": "CHAR(1)", + "dest_name": "fesasn", + "dest_type": "text", + "description": "Send ASN" + }, + { + "source_name": "FESNTF", + "source_type": "CHAR(1)", + "dest_name": "fesntf", + "dest_type": "text", + "description": "ASN Sent Y/N/R" + }, + { + "source_name": "FESTS", + "source_type": "CHAR(1)", + "dest_name": "fests", + "dest_type": "text", + "description": "ASN Ack. Status" + }, + { + "source_name": "FEXMOD", + "source_type": "CHAR(1)", + "dest_name": "fexmod", + "dest_type": "text", + "description": "ASN Translate Mode" + }, + { + "source_name": "FEATYP", + "source_type": "CHAR(1)", + "dest_name": "featyp", + "dest_type": "text", + "description": "ASN Type" + }, + { + "source_name": "FEFLD1", + "source_type": "CHAR(30)", + "dest_name": "fefld1", + "dest_type": "text", + "description": "Carrier PRO/Invoice" + }, + { + "source_name": "FEFLD2", + "source_type": "CHAR(2)", + "dest_name": "fefld2", + "dest_type": "text", + "description": "Honda Flags" + }, + { + "source_name": "FEFLD3", + "source_type": "CHAR(30)", + "dest_name": "fefld3", + "dest_type": "text", + "description": "Field 3" + }, + { + "source_name": "FEFLD4", + "source_type": "CHAR(1)", + "dest_name": "fefld4", + "dest_type": "text", + "description": "R/F Verified" + }, + { + "source_name": "FEFLD5", + "source_type": "CHAR(30)", + "dest_name": "fefld5", + "dest_type": "text", + "description": "Incoming BOL Log/Entry #" + }, + { + "source_name": "FEFLD6", + "source_type": "CHAR(30)", + "dest_name": "fefld6", + "dest_type": "text", + "description": "Number of Ship Labels" + }, + { + "source_name": "FEMANW", + "source_type": "CHAR(1)", + "dest_name": "femanw", + "dest_type": "text", + "description": "Manual Weight Change" + }, + { + "source_name": "FES204", + "source_type": "CHAR(1)", + "dest_name": "fes204", + "dest_type": "text", + "description": "Send BOL 204" + }, + { + "source_name": "FEBTRP", + "source_type": "CHAR(12)", + "dest_name": "febtrp", + "dest_type": "text", + "description": "BOL Trading Partner" + }, + { + "source_name": "FEBSTS", + "source_type": "CHAR(1)", + "dest_name": "febsts", + "dest_type": "text", + "description": "BOL Sent Flag" + }, + { + "source_name": "FEBACK", + "source_type": "CHAR(1)", + "dest_name": "feback", + "dest_type": "text", + "description": "BOL Acknowledgment Status" + }, + { + "source_name": "FEBSET", + "source_type": "CHAR(2)", + "dest_name": "febset", + "dest_type": "text", + "description": "BOL EDI Set Purpose" + }, + { + "source_name": "FEBMOD", + "source_type": "CHAR(1)", + "dest_name": "febmod", + "dest_type": "text", + "description": "BOL Translation Mode" + }, + { + "source_name": "FESKDQ", + "source_type": "NUMERIC(5,0)", + "dest_name": "feskdq", + "dest_type": "numeric(5,0)", + "description": "Number of Skids" + }, + { + "source_name": "FESKDT", + "source_type": "CHAR(3)", + "dest_name": "feskdt", + "dest_type": "text", + "description": "Skid Container Code" + }, + { + "source_name": "FELOSQ", + "source_type": "NUMERIC(5,0)", + "dest_name": "felosq", + "dest_type": "numeric(5,0)", + "description": "Number of loose Containers" + }, + { + "source_name": "FELOST", + "source_type": "CHAR(3)", + "dest_name": "felost", + "dest_type": "text", + "description": "Container Code" + }, + { + "source_name": "FECRCM", + "source_type": "CHAR(1)", + "dest_name": "fecrcm", + "dest_type": "text", + "description": "Current/ Complete" + }, + { + "source_name": "FEUSE", + "source_type": "CHAR(1)", + "dest_name": "feuse", + "dest_type": "text", + "description": "Inuse Flag" + }, + { + "source_name": "FESLCS", + "source_type": "CHAR(8)", + "dest_name": "feslcs", + "dest_type": "text", + "description": "Sold from Customer" + }, + { + "source_name": "FECRTY", + "source_type": "CHAR(1)", + "dest_name": "fecrty", + "dest_type": "text", + "description": "Pay By Credit card" + }, + { + "source_name": "FECRDT", + "source_type": "CHAR(2)", + "dest_name": "fecrdt", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "FECRD#", + "source_type": "CHAR(16)", + "dest_name": "fecrd#", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "FEEXPR", + "source_type": "CHAR(8)", + "dest_name": "feexpr", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "FEHODR", + "source_type": "CHAR(30)", + "dest_name": "fehodr", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "FECRNM", + "source_type": "NUMERIC(10,2)", + "dest_name": "fecrnm", + "dest_type": "numeric(10,2)", + "description": "Need Authorized Amount" + }, + { + "source_name": "FESHBF", + "source_type": "CHAR(1)", + "dest_name": "feshbf", + "dest_type": "text", + "description": "Shipment Processed By" + }, + { + "source_name": "FECLEN", + "source_type": "CHAR(20)", + "dest_name": "feclen", + "dest_type": "text", + "description": "Customer Client Number" + }, + { + "source_name": "FEPLTC", + "source_type": "CHAR(3)", + "dest_name": "fepltc", + "dest_type": "text", + "description": "Plant Code" + }, + { + "source_name": "FEFUT1", + "source_type": "CHAR(1)", + "dest_name": "fefut1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT2", + "source_type": "CHAR(1)", + "dest_name": "fefut2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT3", + "source_type": "CHAR(1)", + "dest_name": "fefut3", + "dest_type": "text", + "description": "Ever Maintain" + }, + { + "source_name": "FEFUT4", + "source_type": "CHAR(1)", + "dest_name": "fefut4", + "dest_type": "text", + "description": "OE631R Printed" + }, + { + "source_name": "FEFUT5", + "source_type": "CHAR(1)", + "dest_name": "fefut5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT6", + "source_type": "CHAR(3)", + "dest_name": "fefut6", + "dest_type": "text", + "description": "Volume UOM" + }, + { + "source_name": "FEFUT7", + "source_type": "CHAR(10)", + "dest_name": "fefut7", + "dest_type": "text", + "description": "Receiving Log #" + }, + { + "source_name": "FEFUT8", + "source_type": "CHAR(10)", + "dest_name": "fefut8", + "dest_type": "text", + "description": "Toyota Manifest Shipment Truck ID" + }, + { + "source_name": "FEFUT9", + "source_type": "CHAR(10)", + "dest_name": "fefut9", + "dest_type": "text", + "description": "Overrided Freight" + }, + { + "source_name": "FEFUTA", + "source_type": "CHAR(20)", + "dest_name": "fefuta", + "dest_type": "text", + "description": "Address Number" + }, + { + "source_name": "FEFUTB", + "source_type": "CHAR(20)", + "dest_name": "fefutb", + "dest_type": "text", + "description": "Estimate Number of Containers" + }, + { + "source_name": "FEFUTC", + "source_type": "NUMERIC(15,5)", + "dest_name": "fefutc", + "dest_type": "numeric(15,5)", + "description": "Estimate Net Weight" + }, + { + "source_name": "FEFUTD", + "source_type": "CHAR(1)", + "dest_name": "fefutd", + "dest_type": "text", + "description": "Toyota Manifest Shipment" + }, + { + "source_name": "FEFUTE", + "source_type": "CHAR(1)", + "dest_name": "fefute", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "FEFUTF", + "source_type": "CHAR(1)", + "dest_name": "fefutf", + "dest_type": "text", + "description": "Scan Pick List Lbl Flag" + }, + { + "source_name": "FEFUTG", + "source_type": "CHAR(1)", + "dest_name": "fefutg", + "dest_type": "text", + "description": "Rtn. Container Exploded" + }, + { + "source_name": "FELDTY", + "source_type": "CHAR(1)", + "dest_name": "feldty", + "dest_type": "text", + "description": "Load Type" + }, + { + "source_name": "FETKST", + "source_type": "CHAR(1)", + "dest_name": "fetkst", + "dest_type": "text", + "description": "Truck Status" + }, + { + "source_name": "FERTS", + "source_type": "CHAR(1)", + "dest_name": "ferts", + "dest_type": "text", + "description": "Default BOL Status" + }, + { + "source_name": "FEFUTH", + "source_type": "CHAR(6)", + "dest_name": "fefuth", + "dest_type": "text", + "description": "Estimate Maximum Loading Lead Time" + }, + { + "source_name": "FEFUTI", + "source_type": "CHAR(6)", + "dest_name": "fefuti", + "dest_type": "text", + "description": "Last Automatic Acknowledgment of ASN" + }, + { + "source_name": "FEFUTJ", + "source_type": "CHAR(6)", + "dest_name": "fefutj", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUTK", + "source_type": "CHAR(6)", + "dest_name": "fefutk", + "dest_type": "text", + "description": "Number Of Skid Spot" + }, + { + "source_name": "FEFUTL", + "source_type": "CHAR(10)", + "dest_name": "fefutl", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUTM", + "source_type": "CHAR(10)", + "dest_name": "fefutm", + "dest_type": "text", + "description": "Laste Verified User ID" + }, + { + "source_name": "FEFUTN", + "source_type": "CHAR(10)", + "dest_name": "fefutn", + "dest_type": "text", + "description": "Laste Verified Date" + }, + { + "source_name": "FEFUTO", + "source_type": "CHAR(10)", + "dest_name": "fefuto", + "dest_type": "text", + "description": "Laste Verified Time" + }, + { + "source_name": "FEFUTP", + "source_type": "CHAR(20)", + "dest_name": "fefutp", + "dest_type": "text", + "description": "Shipping Sequence" + }, + { + "source_name": "FEFUTQ", + "source_type": "CHAR(20)", + "dest_name": "fefutq", + "dest_type": "text", + "description": "Transport Identifier" + }, + { + "source_name": "FEFUTR", + "source_type": "CHAR(20)", + "dest_name": "fefutr", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUTS", + "source_type": "CHAR(20)", + "dest_name": "fefuts", + "dest_type": "text", + "description": "Alternate Ship Location" + }, + { + "source_name": "FEFUTT", + "source_type": "CHAR(30)", + "dest_name": "fefutt", + "dest_type": "text", + "description": "Shipment Late Reason Code" + }, + { + "source_name": "FEFUTU", + "source_type": "CHAR(30)", + "dest_name": "fefutu", + "dest_type": "text", + "description": "Created By User" + }, + { + "source_name": "FEFUTV", + "source_type": "CHAR(30)", + "dest_name": "fefutv", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUTW", + "source_type": "CHAR(30)", + "dest_name": "fefutw", + "dest_type": "text", + "description": "Toyota Manifest Shipment DockKey" + }, + { + "source_name": "FEFUTX", + "source_type": "NUMERIC(15,5)", + "dest_name": "fefutx", + "dest_type": "numeric(15,5)", + "description": "Estimate Tare Weight" + }, + { + "source_name": "FEFUTY", + "source_type": "NUMERIC(15,5)", + "dest_name": "fefuty", + "dest_type": "numeric(15,5)", + "description": "Estimate Gross Weight" + }, + { + "source_name": "FEFUTZ", + "source_type": "NUMERIC(15,5)", + "dest_name": "fefutz", + "dest_type": "numeric(15,5)", + "description": "Estimate Volume" + }, + { + "source_name": "FESCNC", + "source_type": "NUMERIC(5,0)", + "dest_name": "fescnc", + "dest_type": "numeric(5,0)", + "description": "Label Scan Counter" + }, + { + "source_name": "FEDDAT", + "source_type": "DATE", + "dest_name": "feddat", + "dest_type": "date", + "description": "Date Deleted" + }, + { + "source_name": "FEDTME", + "source_type": "TIME", + "dest_name": "fedtme", + "dest_type": "time", + "description": "Time Deleted" + }, + { + "source_name": "FEDCMT", + "source_type": "CHAR(30)", + "dest_name": "fedcmt", + "dest_type": "text", + "description": "Deletion Comment" + }, + { + "source_name": "FEMBL#", + "source_type": "CHAR(15)", + "dest_name": "fembl#", + "dest_type": "text", + "description": "Manual BOL Number" + }, + { + "source_name": "FEATMZ", + "source_type": "CHAR(4)", + "dest_name": "featmz", + "dest_type": "text", + "description": "ASN Date Time Zone" + }, + { + "source_name": "FEETMZ", + "source_type": "CHAR(4)", + "dest_name": "feetmz", + "dest_type": "text", + "description": "Expected Date Time Zone" + }, + { + "source_name": "FESTMZ", + "source_type": "CHAR(4)", + "dest_name": "festmz", + "dest_type": "text", + "description": "Shipping Date Time Zone" + }, + { + "source_name": "FECTMZ", + "source_type": "CHAR(4)", + "dest_name": "fectmz", + "dest_type": "text", + "description": "Create Date Time Zone" + }, + { + "source_name": "FEPSTS", + "source_type": "CHAR(1)", + "dest_name": "fepsts", + "dest_type": "text", + "description": "Pick Status" + }, + { + "source_name": "FETENT", + "source_type": "CHAR(3)", + "dest_name": "fetent", + "dest_type": "text", + "description": "Total Entries #" + }, + { + "source_name": "FEPQN", + "source_type": "CHAR(10)", + "dest_name": "fepqn", + "dest_type": "text", + "description": "BOL Pick Queue #" + }, + { + "source_name": "FETAMT", + "source_type": "CHAR(10)", + "dest_name": "fetamt", + "dest_type": "text", + "description": "Total Amount" + }, + { + "source_name": "FEIBN", + "source_type": "CHAR(20)", + "dest_name": "feibn", + "dest_type": "text", + "description": "Internal Batch #" + }, + { + "source_name": "FESTTP", + "source_type": "CHAR(1)", + "dest_name": "festtp", + "dest_type": "text", + "description": "Ship-To Type" + }, + { + "source_name": "FESTCN", + "source_type": "CHAR(8)", + "dest_name": "festcn", + "dest_type": "text", + "description": "Ship-To Consumer" + }, + { + "source_name": "FEEXPDT", + "source_type": "CHAR(1)", + "dest_name": "feexpdt", + "dest_type": "text", + "description": "Expedited" + }, + { + "source_name": "FEDLTB", + "source_type": "CHAR(10)", + "dest_name": "fedltb", + "dest_type": "text", + "description": "Deleted By User ID" + }, + { + "source_name": "FEPUSR", + "source_type": "CHAR(10)", + "dest_name": "fepusr", + "dest_type": "text", + "description": "Posted By" + }, + { + "source_name": "FEPDAT", + "source_type": "DATE", + "dest_name": "fepdat", + "dest_type": "date", + "description": "Posted Date" + }, + { + "source_name": "FEPTIM", + "source_type": "NUMERIC(6,0)", + "dest_name": "feptim", + "dest_type": "numeric(6,0)", + "description": "Posted Time" + }, + { + "source_name": "FEFUT10", + "source_type": "CHAR(1)", + "dest_name": "fefut10", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT11", + "source_type": "CHAR(1)", + "dest_name": "fefut11", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT12", + "source_type": "CHAR(10)", + "dest_name": "fefut12", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT13", + "source_type": "CHAR(10)", + "dest_name": "fefut13", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT14", + "source_type": "CHAR(10)", + "dest_name": "fefut14", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT15", + "source_type": "CHAR(20)", + "dest_name": "fefut15", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT16", + "source_type": "CHAR(20)", + "dest_name": "fefut16", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT17", + "source_type": "CHAR(30)", + "dest_name": "fefut17", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "FEFUT18", + "source_type": "NUMERIC(15,5)", + "dest_name": "fefut18", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "FEFUT19", + "source_type": "NUMERIC(15,5)", + "dest_name": "fefut19", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "FEFUT20", + "source_type": "NUMERIC(15,5)", + "dest_name": "fefut20", + "dest_type": "numeric(15,5)", + "description": "Future Use" + } + ], + "watermarks": [ + { + "name": "bolh_wm", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(fecdat), DATE '1900-01-01') - 21 FROM cms.bolh", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/bolh.sql b/config/modules/bolh.sql new file mode 100644 index 0000000..e90249a --- /dev/null +++ b/config/modules/bolh.sql @@ -0,0 +1,190 @@ +SELECT + "FEBOL#" AS "febol#", + RTRIM(FEBTYP) AS febtyp, + CASE WHEN FECDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE FECDAT END AS fecdat, + RTRIM(FEPIND) AS fepind, + RTRIM(FESIND) AS fesind, + RTRIM("FEBCS#") AS "febcs#", + RTRIM("FESCS#") AS "fescs#", + RTRIM(FESVND) AS fesvnd, + RTRIM(FERVND) AS fervnd, + RTRIM(FEBNME) AS febnme, + RTRIM(FEBPTC) AS febptc, + RTRIM(FEATTN) AS feattn, + RTRIM(FESNME) AS fesnme, + RTRIM(FESAD1) AS fesad1, + RTRIM(FESAD2) AS fesad2, + RTRIM(FESAD3) AS fesad3, + RTRIM(FESAD4) AS fesad4, + RTRIM(FESAD5) AS fesad5, + RTRIM(FESAD6) AS fesad6, + RTRIM(FESAD7) AS fesad7, + RTRIM(FESAD8) AS fesad8, + RTRIM(FESAD9) AS fesad9, + RTRIM(FESAD10) AS fesad10, + RTRIM(FESPTC) AS fesptc, + RTRIM(FESCTY) AS fescty, + RTRIM(FESPOV) AS fespov, + RTRIM(FESCRY) AS fescry, + CASE WHEN FESDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE FESDAT END AS fesdat, + RTRIM(FESVIA) AS fesvia, + RTRIM(FETKID) AS fetkid, + FENCTN AS fenctn, + FENETW AS fenetw, + FEGROW AS fegrow, + FETARW AS fetarw, + RTRIM(FEWTUN) AS fewtun, + RTRIM(FEDOCD) AS fedocd, + RTRIM(FEFTCD) AS feftcd, + "FEORD#" AS "feord#", + RTRIM(FESTKL) AS festkl, + FEFTAM AS feftam, + RTRIM(FEFOB) AS fefob, + RTRIM(FECARC) AS fecarc, + RTRIM(FESERC) AS feserc, + FESTME AS festme, + RTRIM(FEJITF) AS fejitf, + RTRIM("FESID#") AS "fesid#", + RTRIM(FETRPT) AS fetrpt, + RTRIM(FEBID) AS febid, + RTRIM(FESID) AS fesid, + RTRIM(FESFID) AS fesfid, + RTRIM(FEPLNT) AS feplnt, + RTRIM(FEITMC) AS feitmc, + RTRIM(FESUPP) AS fesupp, + RTRIM(FEULTD) AS feultd, + CASE WHEN FEEDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE FEEDAT END AS feedat, + FEETIM AS feetim, + CASE WHEN FEADAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE FEADAT END AS feadat, + FEATIM AS featim, + RTRIM(FETRNM) AS fetrnm, + RTRIM(FERTEG) AS ferteg, + RTRIM(FEPLPT) AS feplpt, + RTRIM(FEPLOC) AS feploc, + RTRIM(FEEQPD) AS feeqpd, + RTRIM(FEEQPI) AS feeqpi, + RTRIM(FEEQID) AS feeqid, + FEMBOL AS fembol, + RTRIM(FEPSLP) AS fepslp, + RTRIM(FEFRTB) AS fefrtb, + RTRIM(FEAIRB) AS feairb, + RTRIM(FETSPR) AS fetspr, + RTRIM(FEETRR) AS feetrr, + RTRIM(FEEXTR) AS feextr, + RTRIM(FEAETC) AS feaetc, + RTRIM(FEMTHP) AS femthp, + RTRIM(FETRNT) AS fetrnt, + RTRIM(FETRLQ) AS fetrlq, + RTRIM(FECCT) AS fecct, + RTRIM(FECCDE) AS feccde, + RTRIM(FESASN) AS fesasn, + RTRIM(FESNTF) AS fesntf, + RTRIM(FESTS) AS fests, + RTRIM(FEXMOD) AS fexmod, + RTRIM(FEATYP) AS featyp, + RTRIM(FEFLD1) AS fefld1, + RTRIM(FEFLD2) AS fefld2, + RTRIM(FEFLD3) AS fefld3, + RTRIM(FEFLD4) AS fefld4, + RTRIM(FEFLD5) AS fefld5, + RTRIM(FEFLD6) AS fefld6, + RTRIM(FEMANW) AS femanw, + RTRIM(FES204) AS fes204, + RTRIM(FEBTRP) AS febtrp, + RTRIM(FEBSTS) AS febsts, + RTRIM(FEBACK) AS feback, + RTRIM(FEBSET) AS febset, + RTRIM(FEBMOD) AS febmod, + FESKDQ AS feskdq, + RTRIM(FESKDT) AS feskdt, + FELOSQ AS felosq, + RTRIM(FELOST) AS felost, + RTRIM(FECRCM) AS fecrcm, + RTRIM(FEUSE) AS feuse, + RTRIM(FESLCS) AS feslcs, + RTRIM(FECRTY) AS fecrty, + RTRIM(FECRDT) AS fecrdt, + RTRIM("FECRD#") AS "fecrd#", + RTRIM(FEEXPR) AS feexpr, + RTRIM(FEHODR) AS fehodr, + FECRNM AS fecrnm, + RTRIM(FESHBF) AS feshbf, + RTRIM(FECLEN) AS feclen, + RTRIM(FEPLTC) AS fepltc, + RTRIM(FEFUT1) AS fefut1, + RTRIM(FEFUT2) AS fefut2, + RTRIM(FEFUT3) AS fefut3, + RTRIM(FEFUT4) AS fefut4, + RTRIM(FEFUT5) AS fefut5, + RTRIM(FEFUT6) AS fefut6, + RTRIM(FEFUT7) AS fefut7, + RTRIM(FEFUT8) AS fefut8, + RTRIM(FEFUT9) AS fefut9, + RTRIM(FEFUTA) AS fefuta, + RTRIM(FEFUTB) AS fefutb, + FEFUTC AS fefutc, + RTRIM(FEFUTD) AS fefutd, + RTRIM(FEFUTE) AS fefute, + RTRIM(FEFUTF) AS fefutf, + RTRIM(FEFUTG) AS fefutg, + RTRIM(FELDTY) AS feldty, + RTRIM(FETKST) AS fetkst, + RTRIM(FERTS) AS ferts, + RTRIM(FEFUTH) AS fefuth, + RTRIM(FEFUTI) AS fefuti, + RTRIM(FEFUTJ) AS fefutj, + RTRIM(FEFUTK) AS fefutk, + RTRIM(FEFUTL) AS fefutl, + RTRIM(FEFUTM) AS fefutm, + RTRIM(FEFUTN) AS fefutn, + RTRIM(FEFUTO) AS fefuto, + RTRIM(FEFUTP) AS fefutp, + RTRIM(FEFUTQ) AS fefutq, + RTRIM(FEFUTR) AS fefutr, + RTRIM(FEFUTS) AS fefuts, + RTRIM(FEFUTT) AS fefutt, + RTRIM(FEFUTU) AS fefutu, + RTRIM(FEFUTV) AS fefutv, + RTRIM(FEFUTW) AS fefutw, + FEFUTX AS fefutx, + FEFUTY AS fefuty, + FEFUTZ AS fefutz, + FESCNC AS fescnc, + CASE WHEN FEDDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE FEDDAT END AS feddat, + FEDTME AS fedtme, + RTRIM(FEDCMT) AS fedcmt, + RTRIM("FEMBL#") AS "fembl#", + RTRIM(FEATMZ) AS featmz, + RTRIM(FEETMZ) AS feetmz, + RTRIM(FESTMZ) AS festmz, + RTRIM(FECTMZ) AS fectmz, + RTRIM(FEPSTS) AS fepsts, + RTRIM(FETENT) AS fetent, + RTRIM(FEPQN) AS fepqn, + RTRIM(FETAMT) AS fetamt, + RTRIM(FEIBN) AS feibn, + RTRIM(FESTTP) AS festtp, + RTRIM(FESTCN) AS festcn, + RTRIM(FEEXPDT) AS feexpdt, + RTRIM(FEDLTB) AS fedltb, + RTRIM(FEPUSR) AS fepusr, + CASE WHEN FEPDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE FEPDAT END AS fepdat, + FEPTIM AS feptim, + RTRIM(FEFUT10) AS fefut10, + RTRIM(FEFUT11) AS fefut11, + RTRIM(FEFUT12) AS fefut12, + RTRIM(FEFUT13) AS fefut13, + RTRIM(FEFUT14) AS fefut14, + RTRIM(FEFUT15) AS fefut15, + RTRIM(FEFUT16) AS fefut16, + RTRIM(FEFUT17) AS fefut17, + FEFUT18 AS fefut18, + FEFUT19 AS fefut19, + FEFUT20 AS fefut20 +FROM LGDAT.BOLH +WHERE + (fecdat BETWEEN '{bolh_wm}' AND CURRENT_DATE) -- new + recently-created edits + OR (fepdat BETWEEN '{bolh_wm}' AND CURRENT_DATE) -- unposted → posted flip + OR (feddat BETWEEN '{bolh_wm}' AND CURRENT_DATE) -- cancellations (Date Deleted) + OR (fepdat IS NULL AND feddat IS NULL -- live pending tail, not cancelled + AND fecdat >= CURRENT_DATE - 90 DAYS) -- ~1k rows diff --git a/config/modules/coa_map.json b/config/modules/coa_map.json new file mode 100644 index 0000000..ded0da2 --- /dev/null +++ b/config/modules/coa_map.json @@ -0,0 +1,246 @@ +{ + "name": "coa_map", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gs.coa_map", + "staging_table": "pipekit_staging.coa_map", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "Entity", + "source_type": "VARCHAR(3)", + "dest_name": "entity", + "dest_type": "text", + "description": null + }, + { + "source_name": "Company", + "source_type": "VARCHAR(2)", + "dest_name": "company", + "dest_type": "text", + "description": null + }, + { + "source_name": "Company Name", + "source_type": "VARCHAR(14)", + "dest_name": "company_name", + "dest_type": "text", + "description": null + }, + { + "source_name": "Account#", + "source_type": "VARCHAR(12)", + "dest_name": "account#", + "dest_type": "text", + "description": null + }, + { + "source_name": "AZTITL CHG Description", + "source_type": "VARCHAR(39)", + "dest_name": "aztitl__chg_description", + "dest_type": "text", + "description": null + }, + { + "source_name": "FGRP", + "source_type": "VARCHAR(39)", + "dest_name": "fgrp", + "dest_type": "text", + "description": null + }, + { + "source_name": "Department", + "source_type": "VARCHAR(24)", + "dest_name": "department", + "dest_type": "text", + "description": null + }, + { + "source_name": "Department Name", + "source_type": "VARCHAR(27)", + "dest_name": "department_name", + "dest_type": "text", + "description": null + }, + { + "source_name": "STMT", + "source_type": "VARCHAR(16)", + "dest_name": "stmt", + "dest_type": "text", + "description": null + }, + { + "source_name": "LVL0", + "source_type": "VARCHAR(60)", + "dest_name": "lvl0", + "dest_type": "text", + "description": null + }, + { + "source_name": "LVL1", + "source_type": "VARCHAR(60)", + "dest_name": "lvl1", + "dest_type": "text", + "description": null + }, + { + "source_name": "LVL2", + "source_type": "VARCHAR(60)", + "dest_name": "lvl2", + "dest_type": "text", + "description": null + }, + { + "source_name": "LVL3", + "source_type": "VARCHAR(35)", + "dest_name": "lvl3", + "dest_type": "text", + "description": null + }, + { + "source_name": "Summary Acct", + "source_type": "VARCHAR(28)", + "dest_name": "summary_acct", + "dest_type": "text", + "description": null + }, + { + "source_name": "CF Mapping", + "source_type": "VARCHAR(23)", + "dest_name": "cf_mapping", + "dest_type": "text", + "description": null + }, + { + "source_name": "FS", + "source_type": "VARCHAR(2)", + "dest_name": "fs", + "dest_type": "text", + "description": null + }, + { + "source_name": "Level 1", + "source_type": "VARCHAR(60)", + "dest_name": "level_1", + "dest_type": "text", + "description": null + }, + { + "source_name": "Level 2", + "source_type": "VARCHAR(60)", + "dest_name": "level_2", + "dest_type": "text", + "description": null + }, + { + "source_name": "Level 3", + "source_type": "VARCHAR(60)", + "dest_name": "level_3", + "dest_type": "text", + "description": null + }, + { + "source_name": "Level 4", + "source_type": "VARCHAR(60)", + "dest_name": "level_4", + "dest_type": "text", + "description": null + }, + { + "source_name": "D&A", + "source_type": "VARCHAR(19)", + "dest_name": "d_a", + "dest_type": "text", + "description": null + }, + { + "source_name": "Addback", + "source_type": "VARCHAR(1)", + "dest_name": "addback", + "dest_type": "text", + "description": null + }, + { + "source_name": "Anaplan Mapping", + "source_type": "VARCHAR(1)", + "dest_name": "anaplan_mapping", + "dest_type": "text", + "description": null + }, + { + "source_name": "Anaplan D&A PE Exp.", + "source_type": "VARCHAR(1)", + "dest_name": "anaplan_d_a__pe_exp.", + "dest_type": "text", + "description": null + }, + { + "source_name": "Mapping.Completion.Check", + "source_type": "VARCHAR(1)", + "dest_name": "mapping.completion.check", + "dest_type": "text", + "description": null + }, + { + "source_name": "FS (Audit format)", + "source_type": "VARCHAR(2)", + "dest_name": "fs__audit_format_", + "dest_type": "text", + "description": null + }, + { + "source_name": "Level 1 (Audit format)", + "source_type": "VARCHAR(41)", + "dest_name": "level_1__audit_format_", + "dest_type": "text", + "description": null + }, + { + "source_name": "Level 2 (BS)", + "source_type": "VARCHAR(22)", + "dest_name": "level_2__bs_", + "dest_type": "text", + "description": null + }, + { + "source_name": "IS Mapping (Audit)", + "source_type": "VARCHAR(22)", + "dest_name": "is_mapping__audit_", + "dest_type": "text", + "description": null + }, + { + "source_name": "Manual Adjustment to Shua File", + "source_type": "VARCHAR(1)", + "dest_name": "manual_adjustment_to_shua_file", + "dest_type": "text", + "description": null + }, + { + "source_name": "Difference in Mapping", + "source_type": "VARCHAR(1)", + "dest_name": "difference_in_mapping", + "dest_type": "text", + "description": null + }, + { + "source_name": "EBITDA", + "source_type": "NVARCHAR(255)", + "dest_name": "ebitda", + "dest_type": "text", + "description": null + }, + { + "source_name": "ELIM", + "source_type": "NVARCHAR(255)", + "dest_name": "elim", + "dest_type": "text", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/coa_map.sql b/config/modules/coa_map.sql new file mode 100644 index 0000000..aafce79 --- /dev/null +++ b/config/modules/coa_map.sql @@ -0,0 +1,35 @@ +SELECT + RTRIM([Entity]) AS entity, + RTRIM([Company]) AS company, + RTRIM([Company Name]) AS company_name, + RTRIM([Account#]) AS "account#", + RTRIM([AZTITL CHG Description]) AS aztitl__chg_description, + RTRIM([FGRP]) AS fgrp, + RTRIM([Department]) AS department, + RTRIM([Department Name]) AS department_name, + RTRIM([STMT]) AS stmt, + RTRIM([LVL0]) AS lvl0, + RTRIM([LVL1]) AS lvl1, + RTRIM([LVL2]) AS lvl2, + RTRIM([LVL3]) AS lvl3, + RTRIM([Summary Acct]) AS summary_acct, + RTRIM([CF Mapping]) AS cf_mapping, + RTRIM([FS]) AS fs, + RTRIM([Level 1]) AS level_1, + RTRIM([Level 2]) AS level_2, + RTRIM([Level 3]) AS level_3, + RTRIM([Level 4]) AS level_4, + RTRIM([D&A]) AS d_a, + RTRIM([Addback]) AS addback, + RTRIM([Anaplan Mapping]) AS anaplan_mapping, + RTRIM([Anaplan D&A PE Exp.]) AS "anaplan_d_a__pe_exp.", + RTRIM([Mapping.Completion.Check]) AS "mapping.completion.check", + RTRIM([FS (Audit format)]) AS fs__audit_format_, + RTRIM([Level 1 (Audit format)]) AS level_1__audit_format_, + RTRIM([Level 2 (BS)]) AS level_2__bs_, + RTRIM([IS Mapping (Audit)]) AS is_mapping__audit_, + RTRIM([Manual Adjustment to Shua File]) AS manual_adjustment_to_shua_file, + RTRIM([Difference in Mapping]) AS difference_in_mapping, + RTRIM([EBITDA]) AS ebitda, + RTRIM([ELIM]) AS elim +FROM [FANALYSIS].[GS].[coa_map] diff --git a/config/modules/code.json b/config/modules/code.json new file mode 100644 index 0000000..e56c873 --- /dev/null +++ b/config/modules/code.json @@ -0,0 +1,43 @@ +{ + "name": "code", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.code", + "staging_table": "pipekit_staging.code", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "System Codes Master 6.1", + "columns": [ + { + "source_name": "A2", + "source_type": "CHAR(2)", + "dest_name": "a2", + "dest_type": "text", + "description": "Record Type" + }, + { + "source_name": "A9", + "source_type": "CHAR(9)", + "dest_name": "a9", + "dest_type": "text", + "description": "Key Data" + }, + { + "source_name": "A30", + "source_type": "CHAR(30)", + "dest_name": "a30", + "dest_type": "text", + "description": "Description Usually" + }, + { + "source_name": "A215", + "source_type": "CHAR(215)", + "dest_name": "a215", + "dest_type": "text", + "description": "Other Data" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/code.sql b/config/modules/code.sql new file mode 100644 index 0000000..7a72309 --- /dev/null +++ b/config/modules/code.sql @@ -0,0 +1,6 @@ +SELECT + RTRIM(A2) AS a2, + RTRIM(A9) AS a9, + RTRIM(A30) AS a30, + RTRIM(A215) AS a215 +FROM LGDAT.CODE diff --git a/config/modules/cust.json b/config/modules/cust.json new file mode 100644 index 0000000..7b506c0 --- /dev/null +++ b/config/modules/cust.json @@ -0,0 +1,1611 @@ +{ + "name": "cust", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.cust", + "staging_table": "pipekit_staging.cust", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Customer Master File 6.0", + "columns": [ + { + "source_name": "BVCOMP", + "source_type": "NUMERIC(2,0)", + "dest_name": "bvcomp", + "dest_type": "numeric(2,0)", + "description": "Company Number" + }, + { + "source_name": "BVCUST", + "source_type": "CHAR(8)", + "dest_name": "bvcust", + "dest_type": "text", + "description": "Customer Code" + }, + { + "source_name": "BVNAME", + "source_type": "CHAR(30)", + "dest_name": "bvname", + "dest_type": "text", + "description": "Customer Name" + }, + { + "source_name": "BVADR1", + "source_type": "CHAR(35)", + "dest_name": "bvadr1", + "dest_type": "text", + "description": "Customer Address 1" + }, + { + "source_name": "BVADR2", + "source_type": "CHAR(35)", + "dest_name": "bvadr2", + "dest_type": "text", + "description": "Customer Address 2" + }, + { + "source_name": "BVADR3", + "source_type": "CHAR(35)", + "dest_name": "bvadr3", + "dest_type": "text", + "description": "Customer Address 3" + }, + { + "source_name": "BVADR4", + "source_type": "CHAR(35)", + "dest_name": "bvadr4", + "dest_type": "text", + "description": "Customer Address 4" + }, + { + "source_name": "BVADR5", + "source_type": "CHAR(35)", + "dest_name": "bvadr5", + "dest_type": "text", + "description": "Customer Address 5" + }, + { + "source_name": "BVADR6", + "source_type": "CHAR(35)", + "dest_name": "bvadr6", + "dest_type": "text", + "description": "Customer Address 6" + }, + { + "source_name": "BVADR7", + "source_type": "CHAR(35)", + "dest_name": "bvadr7", + "dest_type": "text", + "description": "Customer Address 7" + }, + { + "source_name": "BVADR8", + "source_type": "CHAR(35)", + "dest_name": "bvadr8", + "dest_type": "text", + "description": "Customer Address 8" + }, + { + "source_name": "BVADR9", + "source_type": "CHAR(35)", + "dest_name": "bvadr9", + "dest_type": "text", + "description": "Customer Address 9" + }, + { + "source_name": "BVADR10", + "source_type": "CHAR(35)", + "dest_name": "bvadr10", + "dest_type": "text", + "description": "Customer Address 10" + }, + { + "source_name": "BVPOST", + "source_type": "CHAR(10)", + "dest_name": "bvpost", + "dest_type": "text", + "description": "Postal Code/ZIP" + }, + { + "source_name": "BVCITY", + "source_type": "CHAR(30)", + "dest_name": "bvcity", + "dest_type": "text", + "description": "City" + }, + { + "source_name": "BVPROV", + "source_type": "CHAR(3)", + "dest_name": "bvprov", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BVCTRY", + "source_type": "CHAR(3)", + "dest_name": "bvctry", + "dest_type": "text", + "description": "Country Code" + }, + { + "source_name": "BVTELP", + "source_type": "CHAR(25)", + "dest_name": "bvtelp", + "dest_type": "text", + "description": "Customer Phone No" + }, + { + "source_name": "BVBORD", + "source_type": "CHAR(1)", + "dest_name": "bvbord", + "dest_type": "text", + "description": "Allow Backorders (Y/N)" + }, + { + "source_name": "BVPRAR", + "source_type": "CHAR(1)", + "dest_name": "bvprar", + "dest_type": "text", + "description": "Print A/R Statements (Y/N)" + }, + { + "source_name": "BVPSTE", + "source_type": "CHAR(1)", + "dest_name": "bvpste", + "dest_type": "text", + "description": "PST Exempt Not Used" + }, + { + "source_name": "BVPRCD", + "source_type": "CHAR(3)", + "dest_name": "bvprcd", + "dest_type": "text", + "description": "Province Code" + }, + { + "source_name": "BVPSTL", + "source_type": "CHAR(20)", + "dest_name": "bvpstl", + "dest_type": "text", + "description": "PST Exempt Licence Number" + }, + { + "source_name": "BVFSTE", + "source_type": "CHAR(1)", + "dest_name": "bvfste", + "dest_type": "text", + "description": "FST Exempt Not Used" + }, + { + "source_name": "BVTXGR", + "source_type": "CHAR(3)", + "dest_name": "bvtxgr", + "dest_type": "text", + "description": "Tax Group Code" + }, + { + "source_name": "BVTXRT", + "source_type": "CHAR(1)", + "dest_name": "bvtxrt", + "dest_type": "text", + "description": "Tax Group Rate" + }, + { + "source_name": "BVPACK", + "source_type": "CHAR(1)", + "dest_name": "bvpack", + "dest_type": "text", + "description": "Use Standard Pack" + }, + { + "source_name": "BVNU10", + "source_type": "CHAR(10)", + "dest_name": "bvnu10", + "dest_type": "text", + "description": "Not Used" + }, + { + "source_name": "BVSALM", + "source_type": "CHAR(5)", + "dest_name": "bvsalm", + "dest_type": "text", + "description": "Salesman Code" + }, + { + "source_name": "BVTERR", + "source_type": "CHAR(4)", + "dest_name": "bvterr", + "dest_type": "text", + "description": "Territory Code" + }, + { + "source_name": "BVSNOT", + "source_type": "CHAR(30)", + "dest_name": "bvsnot", + "dest_type": "text", + "description": "Shipping Note for O/E" + }, + { + "source_name": "BVCURR", + "source_type": "CHAR(2)", + "dest_name": "bvcurr", + "dest_type": "text", + "description": "Currency Code" + }, + { + "source_name": "BVSCOM", + "source_type": "CHAR(1)", + "dest_name": "bvscom", + "dest_type": "text", + "description": "Ship Complete Code (Y/N)" + }, + { + "source_name": "BVTYPE", + "source_type": "CHAR(1)", + "dest_name": "bvtype", + "dest_type": "text", + "description": "Type: Ship/Bill/Either" + }, + { + "source_name": "BVCRLE", + "source_type": "CHAR(1)", + "dest_name": "bvcrle", + "dest_type": "text", + "description": "Credit Limit Exceeded" + }, + { + "source_name": "BVGSTE", + "source_type": "CHAR(1)", + "dest_name": "bvgste", + "dest_type": "text", + "description": "GST Exempt Not Used" + }, + { + "source_name": "BVCREL", + "source_type": "DECIMAL(13,2)", + "dest_name": "bvcrel", + "dest_type": "numeric(13,2)", + "description": "Credit Limit" + }, + { + "source_name": "BVOEM", + "source_type": "CHAR(1)", + "dest_name": "bvoem", + "dest_type": "text", + "description": "OEM Code" + }, + { + "source_name": "BVLANG", + "source_type": "CHAR(2)", + "dest_name": "bvlang", + "dest_type": "text", + "description": "Language Code" + }, + { + "source_name": "BVSHLT", + "source_type": "NUMERIC(3,0)", + "dest_name": "bvshlt", + "dest_type": "numeric(3,0)", + "description": "Shipping Lead Time (OBSOLETE)" + }, + { + "source_name": "BVINPO", + "source_type": "CHAR(1)", + "dest_name": "bvinpo", + "dest_type": "text", + "description": "Create Invoice / PO#" + }, + { + "source_name": "BVTERM", + "source_type": "CHAR(2)", + "dest_name": "bvterm", + "dest_type": "text", + "description": "Terms Code" + }, + { + "source_name": "BVSHCL", + "source_type": "CHAR(5)", + "dest_name": "bvshcl", + "dest_type": "text", + "description": "Shipping Class Code" + }, + { + "source_name": "BV1B", + "source_type": "CHAR(1)", + "dest_name": "bv1b", + "dest_type": "text", + "description": "Create Multi Invoices" + }, + { + "source_name": "BVDISL", + "source_type": "NUMERIC(1,0)", + "dest_name": "bvdisl", + "dest_type": "numeric(1,0)", + "description": "Discount Level" + }, + { + "source_name": "BVARCD", + "source_type": "CHAR(3)", + "dest_name": "bvarcd", + "dest_type": "text", + "description": "A/R Bank Code" + }, + { + "source_name": "BVINT", + "source_type": "CHAR(1)", + "dest_name": "bvint", + "dest_type": "text", + "description": "Interest Charge" + }, + { + "source_name": "BVSDAY", + "source_type": "NUMERIC(1,0)", + "dest_name": "bvsday", + "dest_type": "numeric(1,0)", + "description": "Shipping Day Number" + }, + { + "source_name": "BVPORQ", + "source_type": "CHAR(1)", + "dest_name": "bvporq", + "dest_type": "text", + "description": "P/O Required" + }, + { + "source_name": "BVCLAS", + "source_type": "CHAR(4)", + "dest_name": "bvclas", + "dest_type": "text", + "description": "Customer Class" + }, + { + "source_name": "BVPSTC", + "source_type": "CHAR(1)", + "dest_name": "bvpstc", + "dest_type": "text", + "description": "PST Code" + }, + { + "source_name": "BVLDAT", + "source_type": "DATE", + "dest_name": "bvldat", + "dest_type": "date", + "description": "Last Invoice Date" + }, + { + "source_name": "BVLINA", + "source_type": "DECIMAL(11,2)", + "dest_name": "bvlina", + "dest_type": "numeric(11,2)", + "description": "Last Invoice Amount" + }, + { + "source_name": "BVPDAT", + "source_type": "DATE", + "dest_name": "bvpdat", + "dest_type": "date", + "description": "Last Payment Date" + }, + { + "source_name": "BVLPAA", + "source_type": "DECIMAL(11,2)", + "dest_name": "bvlpaa", + "dest_type": "numeric(11,2)", + "description": "Last Payment Amount" + }, + { + "source_name": "BVYTDS", + "source_type": "DECIMAL(11,2)", + "dest_name": "bvytds", + "dest_type": "numeric(11,2)", + "description": "YTD Sales" + }, + { + "source_name": "BVLYTD", + "source_type": "DECIMAL(11,2)", + "dest_name": "bvlytd", + "dest_type": "numeric(11,2)", + "description": "Last Year Sales Total" + }, + { + "source_name": "BVOUTB", + "source_type": "DECIMAL(11,2)", + "dest_name": "bvoutb", + "dest_type": "numeric(11,2)", + "description": "Outstanding Balance" + }, + { + "source_name": "BV15", + "source_type": "CHAR(15)", + "dest_name": "bv15", + "dest_type": "text", + "description": "Prepaid Exceed Limit" + }, + { + "source_name": "BVDUNN", + "source_type": "CHAR(1)", + "dest_name": "bvdunn", + "dest_type": "text", + "description": "Allow Dunning Message (Y/N)" + }, + { + "source_name": "BVFAX", + "source_type": "CHAR(25)", + "dest_name": "bvfax", + "dest_type": "text", + "description": "Fax Number" + }, + { + "source_name": "BVMDAT", + "source_type": "DATE", + "dest_name": "bvmdat", + "dest_type": "date", + "description": "Date Last Maintained" + }, + { + "source_name": "BVBILL", + "source_type": "CHAR(8)", + "dest_name": "bvbill", + "dest_type": "text", + "description": "Bill-to Number" + }, + { + "source_name": "BVGSTL", + "source_type": "CHAR(20)", + "dest_name": "bvgstl", + "dest_type": "text", + "description": "GST Licence" + }, + { + "source_name": "BV3", + "source_type": "CHAR(6)", + "dest_name": "bv3", + "dest_type": "text", + "description": "Customer Ship Location" + }, + { + "source_name": "BVLARA", + "source_type": "DECIMAL(9,2)", + "dest_name": "bvlara", + "dest_type": "numeric(9,2)", + "description": "Late A/R Tolerance" + }, + { + "source_name": "BVCONT", + "source_type": "CHAR(30)", + "dest_name": "bvcont", + "dest_type": "text", + "description": "Contact Person" + }, + { + "source_name": "BVSUPP", + "source_type": "CHAR(15)", + "dest_name": "bvsupp", + "dest_type": "text", + "description": "Supplier Code" + }, + { + "source_name": "BVSFOR", + "source_type": "CHAR(3)", + "dest_name": "bvsfor", + "dest_type": "text", + "description": "Label Shipping Format" + }, + { + "source_name": "BVSFCP", + "source_type": "NUMERIC(3,0)", + "dest_name": "bvsfcp", + "dest_type": "numeric(3,0)", + "description": "Serial Copies" + }, + { + "source_name": "BVMFOR", + "source_type": "CHAR(3)", + "dest_name": "bvmfor", + "dest_type": "text", + "description": "Master Shipping Format" + }, + { + "source_name": "BVMFCP", + "source_type": "NUMERIC(3,0)", + "dest_name": "bvmfcp", + "dest_type": "numeric(3,0)", + "description": "Master Copies" + }, + { + "source_name": "BVXFOR", + "source_type": "CHAR(3)", + "dest_name": "bvxfor", + "dest_type": "text", + "description": "Mixed Load Format" + }, + { + "source_name": "BVXFCP", + "source_type": "NUMERIC(3,0)", + "dest_name": "bvxfcp", + "dest_type": "numeric(3,0)", + "description": "Mixed Load Copies" + }, + { + "source_name": "BVCARC", + "source_type": "CHAR(17)", + "dest_name": "bvcarc", + "dest_type": "text", + "description": "Carrier Code" + }, + { + "source_name": "BVSERC", + "source_type": "CHAR(3)", + "dest_name": "bvserc", + "dest_type": "text", + "description": "Service Code" + }, + { + "source_name": "BVSUPA", + "source_type": "CHAR(12)", + "dest_name": "bvsupa", + "dest_type": "text", + "description": "Supplier Abbreviation Code" + }, + { + "source_name": "BVTRDP", + "source_type": "CHAR(12)", + "dest_name": "bvtrdp", + "dest_type": "text", + "description": "EDI Trading Partner" + }, + { + "source_name": "BVDUNS", + "source_type": "CHAR(17)", + "dest_name": "bvduns", + "dest_type": "text", + "description": "Customer I.D." + }, + { + "source_name": "BVSFID", + "source_type": "CHAR(17)", + "dest_name": "bvsfid", + "dest_type": "text", + "description": "Ship From I.D." + }, + { + "source_name": "BVUSEC", + "source_type": "CHAR(1)", + "dest_name": "bvusec", + "dest_type": "text", + "description": "Ship Using Cum" + }, + { + "source_name": "BVSHPR", + "source_type": "CHAR(1)", + "dest_name": "bvshpr", + "dest_type": "text", + "description": "Ship Using RAN" + }, + { + "source_name": "BVASNY", + "source_type": "CHAR(1)", + "dest_name": "bvasny", + "dest_type": "text", + "description": "Create ASN Y/N" + }, + { + "source_name": "BVINVY", + "source_type": "CHAR(1)", + "dest_name": "bvinvy", + "dest_type": "text", + "description": "Print Invoice Y/N" + }, + { + "source_name": "BVFLG1", + "source_type": "CHAR(1)", + "dest_name": "bvflg1", + "dest_type": "text", + "description": "Consignment Customer Y/N" + }, + { + "source_name": "BVFLG2", + "source_type": "CHAR(1)", + "dest_name": "bvflg2", + "dest_type": "text", + "description": "Invoice Send Mode" + }, + { + "source_name": "BVFLG3", + "source_type": "CHAR(1)", + "dest_name": "bvflg3", + "dest_type": "text", + "description": "Accept Trans. Price" + }, + { + "source_name": "BVFLG4", + "source_type": "CHAR(1)", + "dest_name": "bvflg4", + "dest_type": "text", + "description": "Scanning Required" + }, + { + "source_name": "BVFLG5", + "source_type": "CHAR(1)", + "dest_name": "bvflg5", + "dest_type": "text", + "description": "Container Transmit Mode" + }, + { + "source_name": "BVFLG6", + "source_type": "CHAR(1)", + "dest_name": "bvflg6", + "dest_type": "text", + "description": "ASN Serial Numbers" + }, + { + "source_name": "BVSUMR", + "source_type": "CHAR(1)", + "dest_name": "bvsumr", + "dest_type": "text", + "description": "Summarize Returnable Containers" + }, + { + "source_name": "BVPLNT", + "source_type": "CHAR(17)", + "dest_name": "bvplnt", + "dest_type": "text", + "description": "Plant Code (Default)" + }, + { + "source_name": "BVDOCK", + "source_type": "CHAR(30)", + "dest_name": "bvdock", + "dest_type": "text", + "description": "Dock Code (Default)" + }, + { + "source_name": "BVLINE", + "source_type": "CHAR(30)", + "dest_name": "bvline", + "dest_type": "text", + "description": "Line Code (Default)" + }, + { + "source_name": "BVDROP", + "source_type": "CHAR(30)", + "dest_name": "bvdrop", + "dest_type": "text", + "description": "Drop Code (Default)" + }, + { + "source_name": "BVTMOD", + "source_type": "CHAR(3)", + "dest_name": "bvtmod", + "dest_type": "text", + "description": "Transportation Mode" + }, + { + "source_name": "BVTTYP", + "source_type": "CHAR(3)", + "dest_name": "bvttyp", + "dest_type": "text", + "description": "Equipment Description" + }, + { + "source_name": "BVEQPI", + "source_type": "CHAR(4)", + "dest_name": "bveqpi", + "dest_type": "text", + "description": "Equipment Initial" + }, + { + "source_name": "BVROUT", + "source_type": "CHAR(30)", + "dest_name": "bvrout", + "dest_type": "text", + "description": "Routing" + }, + { + "source_name": "BVPOOL", + "source_type": "CHAR(3)", + "dest_name": "bvpool", + "dest_type": "text", + "description": "Pool Point" + }, + { + "source_name": "BVPOLL", + "source_type": "CHAR(30)", + "dest_name": "bvpoll", + "dest_type": "text", + "description": "Pool Location" + }, + { + "source_name": "BVJITF", + "source_type": "CHAR(1)", + "dest_name": "bvjitf", + "dest_type": "text", + "description": "JIT Delivery Flag" + }, + { + "source_name": "BVAPLG", + "source_type": "CHAR(1)", + "dest_name": "bvaplg", + "dest_type": "text", + "description": "Auto Pick List Create" + }, + { + "source_name": "BVAVER", + "source_type": "CHAR(10)", + "dest_name": "bvaver", + "dest_type": "text", + "description": "ASN Verification Template" + }, + { + "source_name": "BVUVER", + "source_type": "CHAR(10)", + "dest_name": "bvuver", + "dest_type": "text", + "description": "USRDEF Verification Template" + }, + { + "source_name": "BVFOBC", + "source_type": "CHAR(3)", + "dest_name": "bvfobc", + "dest_type": "text", + "description": "FOB Code" + }, + { + "source_name": "BVEMAL", + "source_type": "CHAR(50)", + "dest_name": "bvemal", + "dest_type": "text", + "description": "E-Mail Address" + }, + { + "source_name": "BVWEB", + "source_type": "CHAR(60)", + "dest_name": "bvweb", + "dest_type": "text", + "description": "Web Page Address" + }, + { + "source_name": "BVDDIR", + "source_type": "CHAR(30)", + "dest_name": "bvddir", + "dest_type": "text", + "description": "Document Directory" + }, + { + "source_name": "BVFL01", + "source_type": "CHAR(1)", + "dest_name": "bvfl01", + "dest_type": "text", + "description": "Future Use 01" + }, + { + "source_name": "BVADJC", + "source_type": "CHAR(1)", + "dest_name": "bvadjc", + "dest_type": "text", + "description": "Adjust Cum Flag" + }, + { + "source_name": "BVPPCL", + "source_type": "CHAR(1)", + "dest_name": "bvppcl", + "dest_type": "text", + "description": "Freight Charge Mode" + }, + { + "source_name": "BVCDAT", + "source_type": "DATE", + "dest_name": "bvcdat", + "dest_type": "date", + "description": "Record Creation Date" + }, + { + "source_name": "BVIBRQ", + "source_type": "CHAR(1)", + "dest_name": "bvibrq", + "dest_type": "text", + "description": "Inv#/BOL# Reqd for RANS" + }, + { + "source_name": "BVORSM", + "source_type": "CHAR(1)", + "dest_name": "bvorsm", + "dest_type": "text", + "description": "Order Ack Send Mode" + }, + { + "source_name": "BVFL04", + "source_type": "CHAR(1)", + "dest_name": "bvfl04", + "dest_type": "text", + "description": "Future Use 04" + }, + { + "source_name": "BVSTAT", + "source_type": "CHAR(1)", + "dest_name": "bvstat", + "dest_type": "text", + "description": "Customer Status" + }, + { + "source_name": "BVREAS", + "source_type": "CHAR(2)", + "dest_name": "bvreas", + "dest_type": "text", + "description": "Inactive Reason Code" + }, + { + "source_name": "BVFL05", + "source_type": "CHAR(1)", + "dest_name": "bvfl05", + "dest_type": "text", + "description": "Future Use 05" + }, + { + "source_name": "BVFL06", + "source_type": "CHAR(1)", + "dest_name": "bvfl06", + "dest_type": "text", + "description": "FUTURE USE 06" + }, + { + "source_name": "BVFL07", + "source_type": "CHAR(1)", + "dest_name": "bvfl07", + "dest_type": "text", + "description": "FUTURE USE 07" + }, + { + "source_name": "BVCSERD", + "source_type": "CHAR(10)", + "dest_name": "bvcserd", + "dest_type": "text", + "description": "Custom Serial# Definition" + }, + { + "source_name": "BVFL08", + "source_type": "CHAR(1)", + "dest_name": "bvfl08", + "dest_type": "text", + "description": "Future Use 08" + }, + { + "source_name": "BVFL09", + "source_type": "CHAR(1)", + "dest_name": "bvfl09", + "dest_type": "text", + "description": "EDI Price Warning" + }, + { + "source_name": "BVFL10", + "source_type": "CHAR(1)", + "dest_name": "bvfl10", + "dest_type": "text", + "description": "Future Use 10" + }, + { + "source_name": "BVFL11", + "source_type": "CHAR(10)", + "dest_name": "bvfl11", + "dest_type": "text", + "description": "Future Use 11" + }, + { + "source_name": "BVFL12", + "source_type": "CHAR(10)", + "dest_name": "bvfl12", + "dest_type": "text", + "description": "Future Use 12" + }, + { + "source_name": "BVFL13", + "source_type": "DATE", + "dest_name": "bvfl13", + "dest_type": "date", + "description": "Future Use" + }, + { + "source_name": "BVFL14", + "source_type": "DATE", + "dest_name": "bvfl14", + "dest_type": "date", + "description": "Future Use" + }, + { + "source_name": "BVFL15", + "source_type": "NUMERIC(15,5)", + "dest_name": "bvfl15", + "dest_type": "numeric(15,5)", + "description": "Address Number" + }, + { + "source_name": "BVFL16", + "source_type": "NUMERIC(15,5)", + "dest_name": "bvfl16", + "dest_type": "numeric(15,5)", + "description": "Future Use 16" + }, + { + "source_name": "BVFL17", + "source_type": "CHAR(20)", + "dest_name": "bvfl17", + "dest_type": "text", + "description": "Future Use 17" + }, + { + "source_name": "BVFL18", + "source_type": "CHAR(20)", + "dest_name": "bvfl18", + "dest_type": "text", + "description": "Multiple Flags" + }, + { + "source_name": "BVFL19", + "source_type": "CHAR(3)", + "dest_name": "bvfl19", + "dest_type": "text", + "description": "Future Use 19" + }, + { + "source_name": "BVFL20", + "source_type": "CHAR(3)", + "dest_name": "bvfl20", + "dest_type": "text", + "description": "Skip EDI Inv if No BOL" + }, + { + "source_name": "BVVRFKB", + "source_type": "CHAR(1)", + "dest_name": "bvvrfkb", + "dest_type": "text", + "description": "Verify KanBan" + }, + { + "source_name": "BVGRPCK", + "source_type": "CHAR(1)", + "dest_name": "bvgrpck", + "dest_type": "text", + "description": "EDI Order as Group Pick" + }, + { + "source_name": "BVSWAP", + "source_type": "CHAR(1)", + "dest_name": "bvswap", + "dest_type": "text", + "description": "Real Time Shipping Label Swap" + }, + { + "source_name": "BVICON", + "source_type": "CHAR(1)", + "dest_name": "bvicon", + "dest_type": "text", + "description": "Allow Consolidate Invoices" + }, + { + "source_name": "BVINSP", + "source_type": "CHAR(1)", + "dest_name": "bvinsp", + "dest_type": "text", + "description": "Full Detail Inspection" + }, + { + "source_name": "BVALS", + "source_type": "CHAR(1)", + "dest_name": "bvals", + "dest_type": "text", + "description": "Allow Late Shipment" + }, + { + "source_name": "BVFUT2", + "source_type": "CHAR(1)", + "dest_name": "bvfut2", + "dest_type": "text", + "description": "Extra Future Use 2" + }, + { + "source_name": "BVFUT3", + "source_type": "CHAR(1)", + "dest_name": "bvfut3", + "dest_type": "text", + "description": "Extra Future Use 3" + }, + { + "source_name": "BVFUT4", + "source_type": "CHAR(1)", + "dest_name": "bvfut4", + "dest_type": "text", + "description": "Extra Future Use 4" + }, + { + "source_name": "BVFUT5", + "source_type": "CHAR(1)", + "dest_name": "bvfut5", + "dest_type": "text", + "description": "Extra Future Use 5" + }, + { + "source_name": "BVFUT6", + "source_type": "CHAR(1)", + "dest_name": "bvfut6", + "dest_type": "text", + "description": "Extra Future Use 6" + }, + { + "source_name": "BVFUT7", + "source_type": "CHAR(3)", + "dest_name": "bvfut7", + "dest_type": "text", + "description": "Extra Future Use 7" + }, + { + "source_name": "BVFUT8", + "source_type": "CHAR(3)", + "dest_name": "bvfut8", + "dest_type": "text", + "description": "Extra Future Use 8" + }, + { + "source_name": "BVFUT9", + "source_type": "CHAR(3)", + "dest_name": "bvfut9", + "dest_type": "text", + "description": "Extra Future Use 9" + }, + { + "source_name": "BVFUT10", + "source_type": "CHAR(5)", + "dest_name": "bvfut10", + "dest_type": "text", + "description": "Extra Future Use 10" + }, + { + "source_name": "BVFUT11", + "source_type": "CHAR(5)", + "dest_name": "bvfut11", + "dest_type": "text", + "description": "Extra Future Use 11" + }, + { + "source_name": "BVFUT12", + "source_type": "CHAR(5)", + "dest_name": "bvfut12", + "dest_type": "text", + "description": "Check Min.Order Quantity" + }, + { + "source_name": "BVFUT13", + "source_type": "CHAR(10)", + "dest_name": "bvfut13", + "dest_type": "text", + "description": "Extra Future Use 13" + }, + { + "source_name": "BVFUT14", + "source_type": "CHAR(10)", + "dest_name": "bvfut14", + "dest_type": "text", + "description": "Extra Future Use 14" + }, + { + "source_name": "BVFUT15", + "source_type": "CHAR(10)", + "dest_name": "bvfut15", + "dest_type": "text", + "description": "Extra Future Use 15" + }, + { + "source_name": "BVTMZN", + "source_type": "CHAR(4)", + "dest_name": "bvtmzn", + "dest_type": "text", + "description": "Time Zone Code" + }, + { + "source_name": "BVSLT", + "source_type": "NUMERIC(15,5)", + "dest_name": "bvslt", + "dest_type": "numeric(15,5)", + "description": "Shipping Lead Time in days/hours" + }, + { + "source_name": "BVSLTU", + "source_type": "CHAR(3)", + "dest_name": "bvsltu", + "dest_type": "text", + "description": "Shipping Lead Time Unit" + }, + { + "source_name": "BVUPSC", + "source_type": "CHAR(1)", + "dest_name": "bvupsc", + "dest_type": "text", + "description": "UPS Consignee Billed Flag" + }, + { + "source_name": "BVSEAL", + "source_type": "CHAR(1)", + "dest_name": "bvseal", + "dest_type": "text", + "description": "Seal Required" + }, + { + "source_name": "BVSTRQ", + "source_type": "CHAR(1)", + "dest_name": "bvstrq", + "dest_type": "text", + "description": "Ship Time Required" + }, + { + "source_name": "BVWTPT", + "source_type": "CHAR(1)", + "dest_name": "bvwtpt", + "dest_type": "text", + "description": "Warranty Pay Type" + }, + { + "source_name": "BVINCD", + "source_type": "CHAR(10)", + "dest_name": "bvincd", + "dest_type": "text", + "description": "Industry Code" + }, + { + "source_name": "BVWCAR", + "source_type": "CHAR(1)", + "dest_name": "bvwcar", + "dest_type": "text", + "description": "Consolidate Warranty A/R Credit" + }, + { + "source_name": "BVSVPO", + "source_type": "CHAR(1)", + "dest_name": "bvsvpo", + "dest_type": "text", + "description": "PO Required For Service" + }, + { + "source_name": "BVSVCT", + "source_type": "CHAR(1)", + "dest_name": "bvsvct", + "dest_type": "text", + "description": "Services Tax Group Rate Code" + }, + { + "source_name": "BVFSTR", + "source_type": "CHAR(10)", + "dest_name": "bvfstr", + "dest_type": "text", + "description": "Field Service Territory" + }, + { + "source_name": "BVTRVL", + "source_type": "NUMERIC(5,2)", + "dest_name": "bvtrvl", + "dest_type": "numeric(5,2)", + "description": "Service Travel Hours" + }, + { + "source_name": "BVCTIM", + "source_type": "TIME", + "dest_name": "bvctim", + "dest_type": "time", + "description": "Record Creation Time" + }, + { + "source_name": "BVCUSR", + "source_type": "CHAR(10)", + "dest_name": "bvcusr", + "dest_type": "text", + "description": "Record Created By User Id" + }, + { + "source_name": "BVMTIM", + "source_type": "TIME", + "dest_name": "bvmtim", + "dest_type": "time", + "description": "Time Last Maintained" + }, + { + "source_name": "BVMUSR", + "source_type": "CHAR(10)", + "dest_name": "bvmusr", + "dest_type": "text", + "description": "User Last Maintained" + }, + { + "source_name": "BVSEBP", + "source_type": "CHAR(1)", + "dest_name": "bvsebp", + "dest_type": "text", + "description": "Send Email BOL Posting" + }, + { + "source_name": "BVWESS", + "source_type": "CHAR(1)", + "dest_name": "bvwess", + "dest_type": "text", + "description": "WARN Excluded Ship.Sch." + }, + { + "source_name": "BVFUT16", + "source_type": "CHAR(1)", + "dest_name": "bvfut16", + "dest_type": "text", + "description": "Extra Future Use 16" + }, + { + "source_name": "BVFUT17", + "source_type": "CHAR(1)", + "dest_name": "bvfut17", + "dest_type": "text", + "description": "Extra Future Use 17" + }, + { + "source_name": "BVFUT18", + "source_type": "CHAR(1)", + "dest_name": "bvfut18", + "dest_type": "text", + "description": "Extra Future Use 18" + }, + { + "source_name": "BVFUT19", + "source_type": "CHAR(1)", + "dest_name": "bvfut19", + "dest_type": "text", + "description": "Extra Future Use 19" + }, + { + "source_name": "BVFUT20", + "source_type": "CHAR(1)", + "dest_name": "bvfut20", + "dest_type": "text", + "description": "Extra Future Use 20" + }, + { + "source_name": "BVFUT21", + "source_type": "CHAR(1)", + "dest_name": "bvfut21", + "dest_type": "text", + "description": "Extra Future Use 21" + }, + { + "source_name": "BVFUT22", + "source_type": "CHAR(3)", + "dest_name": "bvfut22", + "dest_type": "text", + "description": "Extra Future Use 22" + }, + { + "source_name": "BVFUT23", + "source_type": "CHAR(3)", + "dest_name": "bvfut23", + "dest_type": "text", + "description": "Extra Future Use 23" + }, + { + "source_name": "BVFUT24", + "source_type": "CHAR(3)", + "dest_name": "bvfut24", + "dest_type": "text", + "description": "Extra Future Use 24" + }, + { + "source_name": "BVFUT25", + "source_type": "CHAR(5)", + "dest_name": "bvfut25", + "dest_type": "text", + "description": "EXTRA FUTURE USE 25" + }, + { + "source_name": "BVFUT26", + "source_type": "CHAR(5)", + "dest_name": "bvfut26", + "dest_type": "text", + "description": "EXTRA FUTURE USE 26" + }, + { + "source_name": "BVFUT27", + "source_type": "CHAR(5)", + "dest_name": "bvfut27", + "dest_type": "text", + "description": "Future Field" + }, + { + "source_name": "BVFUT28", + "source_type": "CHAR(10)", + "dest_name": "bvfut28", + "dest_type": "text", + "description": "Future Field" + }, + { + "source_name": "BVFUT29", + "source_type": "CHAR(10)", + "dest_name": "bvfut29", + "dest_type": "text", + "description": "Future Field" + }, + { + "source_name": "BVFUT30", + "source_type": "CHAR(10)", + "dest_name": "bvfut30", + "dest_type": "text", + "description": "Future Field" + }, + { + "source_name": "BVHIN", + "source_type": "CHAR(9)", + "dest_name": "bvhin", + "dest_type": "text", + "description": "Health Industry Number" + }, + { + "source_name": "BVDOCKF", + "source_type": "CHAR(1)", + "dest_name": "bvdockf", + "dest_type": "text", + "description": "Use Dock Code Flag Default" + }, + { + "source_name": "BVORLNF", + "source_type": "CHAR(1)", + "dest_name": "bvorlnf", + "dest_type": "text", + "description": "Use Order Release Num. Flag Default" + }, + { + "source_name": "BVCLOC", + "source_type": "CHAR(6)", + "dest_name": "bvcloc", + "dest_type": "text", + "description": "Customer Consignment Location" + }, + { + "source_name": "BVDLRD", + "source_type": "CHAR(1)", + "dest_name": "bvdlrd", + "dest_type": "text", + "description": "Dealer Direct" + }, + { + "source_name": "BVSLTT", + "source_type": "CHAR(1)", + "dest_name": "bvsltt", + "dest_type": "text", + "description": "Shipping Lead Time'Turnaround" + }, + { + "source_name": "BVVSM", + "source_type": "CHAR(1)", + "dest_name": "bvvsm", + "dest_type": "text", + "description": "Verify Shipment Mandatory" + }, + { + "source_name": "BVMRWM", + "source_type": "CHAR(1)", + "dest_name": "bvmrwm", + "dest_type": "text", + "description": "Master Required With Mixed Load" + }, + { + "source_name": "BVEDIPW", + "source_type": "CHAR(1)", + "dest_name": "bvedipw", + "dest_type": "text", + "description": "EDI Price Warning" + }, + { + "source_name": "BVSPUF", + "source_type": "CHAR(1)", + "dest_name": "bvspuf", + "dest_type": "text", + "description": "Support Per Unit Freight" + }, + { + "source_name": "BVSLZN", + "source_type": "CHAR(10)", + "dest_name": "bvslzn", + "dest_type": "text", + "description": "Service Location Zone" + }, + { + "source_name": "BVHFEP", + "source_type": "NUMERIC(5,2)", + "dest_name": "bvhfep", + "dest_type": "numeric(5,2)", + "description": "Handling Fee Percentage" + }, + { + "source_name": "BVARGP", + "source_type": "NUMERIC(3,0)", + "dest_name": "bvargp", + "dest_type": "numeric(3,0)", + "description": "Auto Register Grace Period" + }, + { + "source_name": "BVCSPO", + "source_type": "CHAR(1)", + "dest_name": "bvcspo", + "dest_type": "text", + "description": "Confirm SCD PO" + }, + { + "source_name": "BVSHPD", + "source_type": "NUMERIC(1,0)", + "dest_name": "bvshpd", + "dest_type": "numeric(1,0)", + "description": "Shipping Day of Week" + }, + { + "source_name": "BVSHPT", + "source_type": "NUMERIC(4,0)", + "dest_name": "bvshpt", + "dest_type": "numeric(4,0)", + "description": "shipping Time" + }, + { + "source_name": "BVOOSF", + "source_type": "CHAR(1)", + "dest_name": "bvoosf", + "dest_type": "text", + "description": "Open Order Selection" + }, + { + "source_name": "BVSCILC", + "source_type": "CHAR(1)", + "dest_name": "bvscilc", + "dest_type": "text", + "description": "Srv Chrg Inv Line Consolidate Mode" + }, + { + "source_name": "BVSCICI", + "source_type": "CHAR(1)", + "dest_name": "bvscici", + "dest_type": "text", + "description": "Svr Chrg Inv Create Interval" + }, + { + "source_name": "BVSCIGD", + "source_type": "NUMERIC(2,0)", + "dest_name": "bvscigd", + "dest_type": "numeric(2,0)", + "description": "Generation Day" + }, + { + "source_name": "BVSCIGD2", + "source_type": "NUMERIC(2,0)", + "dest_name": "bvscigd2", + "dest_type": "numeric(2,0)", + "description": "Generation Day 2" + }, + { + "source_name": "BVARCOL", + "source_type": "CHAR(5)", + "dest_name": "bvarcol", + "dest_type": "text", + "description": "AR Collector" + }, + { + "source_name": "BVDCLS", + "source_type": "CHAR(10)", + "dest_name": "bvdcls", + "dest_type": "text", + "description": "Customer Dumping Class Code" + }, + { + "source_name": "BVSCHL", + "source_type": "CHAR(10)", + "dest_name": "bvschl", + "dest_type": "text", + "description": "Sales Channel" + }, + { + "source_name": "BVARSP", + "source_type": "CHAR(1)", + "dest_name": "bvarsp", + "dest_type": "text", + "description": "Auto Register As Activated Or Not" + }, + { + "source_name": "BVACBOL", + "source_type": "CHAR(1)", + "dest_name": "bvacbol", + "dest_type": "text", + "description": "Allow Change BOL Quantity" + }, + { + "source_name": "BVSOSO", + "source_type": "CHAR(1)", + "dest_name": "bvsoso", + "dest_type": "text", + "description": "Use Incoming EDI 850 Carrier/Service on Standard O" + }, + { + "source_name": "BVRTXR", + "source_type": "CHAR(1)", + "dest_name": "bvrtxr", + "dest_type": "text", + "description": "Rebate Tax Rate" + }, + { + "source_name": "BVPODCF", + "source_type": "CHAR(1)", + "dest_name": "bvpodcf", + "dest_type": "text", + "description": "Proof of Delivery Default Charge Flag" + }, + { + "source_name": "BVADSSC", + "source_type": "CHAR(1)", + "dest_name": "bvadssc", + "dest_type": "text", + "description": "Apply Drop-ship Surcharge" + }, + { + "source_name": "BVPODCC", + "source_type": "CHAR(3)", + "dest_name": "bvpodcc", + "dest_type": "text", + "description": "Proof of Delivery Default Charge Code" + }, + { + "source_name": "BVATFE", + "source_type": "CHAR(1)", + "dest_name": "bvatfe", + "dest_type": "text", + "description": "ATF-Restricted-Part Exempt" + }, + { + "source_name": "BVVIDO", + "source_type": "CHAR(1)", + "dest_name": "bvvido", + "dest_type": "text", + "description": "Valid State FOID On File" + }, + { + "source_name": "BVUCFS", + "source_type": "CHAR(1)", + "dest_name": "bvucfs", + "dest_type": "text", + "description": "Use Containers From BOL Serials" + }, + { + "source_name": "BVSISR", + "source_type": "CHAR(1)", + "dest_name": "bvsisr", + "dest_type": "text", + "description": "Support Inv Shipment Reference" + }, + { + "source_name": "BVNBBL", + "source_type": "CHAR(1)", + "dest_name": "bvnbbl", + "dest_type": "text", + "description": "New BOL By Lot#" + }, + { + "source_name": "BVSITL", + "source_type": "CHAR(6)", + "dest_name": "bvsitl", + "dest_type": "text", + "description": "Shipment In-Transit Location" + }, + { + "source_name": "BVSIAL", + "source_type": "CHAR(6)", + "dest_name": "bvsial", + "dest_type": "text", + "description": "Shipment In-Transit Adj. Loc" + }, + { + "source_name": "BVSIOE", + "source_type": "CHAR(1)", + "dest_name": "bvsioe", + "dest_type": "text", + "description": "Shipment In-Transit Outgoing EDI" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/cust.sql b/config/modules/cust.sql new file mode 100644 index 0000000..99191ce --- /dev/null +++ b/config/modules/cust.sql @@ -0,0 +1,230 @@ +SELECT + BVCOMP AS bvcomp, + RTRIM(BVCUST) AS bvcust, + RTRIM(BVNAME) AS bvname, + RTRIM(BVADR1) AS bvadr1, + RTRIM(BVADR2) AS bvadr2, + RTRIM(BVADR3) AS bvadr3, + RTRIM(BVADR4) AS bvadr4, + RTRIM(BVADR5) AS bvadr5, + RTRIM(BVADR6) AS bvadr6, + RTRIM(BVADR7) AS bvadr7, + RTRIM(BVADR8) AS bvadr8, + RTRIM(BVADR9) AS bvadr9, + RTRIM(BVADR10) AS bvadr10, + RTRIM(BVPOST) AS bvpost, + RTRIM(BVCITY) AS bvcity, + RTRIM(BVPROV) AS bvprov, + RTRIM(BVCTRY) AS bvctry, + RTRIM(BVTELP) AS bvtelp, + RTRIM(BVBORD) AS bvbord, + RTRIM(BVPRAR) AS bvprar, + RTRIM(BVPSTE) AS bvpste, + RTRIM(BVPRCD) AS bvprcd, + RTRIM(BVPSTL) AS bvpstl, + RTRIM(BVFSTE) AS bvfste, + RTRIM(BVTXGR) AS bvtxgr, + RTRIM(BVTXRT) AS bvtxrt, + RTRIM(BVPACK) AS bvpack, + RTRIM(BVNU10) AS bvnu10, + RTRIM(BVSALM) AS bvsalm, + RTRIM(BVTERR) AS bvterr, + RTRIM(BVSNOT) AS bvsnot, + RTRIM(BVCURR) AS bvcurr, + RTRIM(BVSCOM) AS bvscom, + RTRIM(BVTYPE) AS bvtype, + RTRIM(BVCRLE) AS bvcrle, + RTRIM(BVGSTE) AS bvgste, + BVCREL AS bvcrel, + RTRIM(BVOEM) AS bvoem, + RTRIM(BVLANG) AS bvlang, + BVSHLT AS bvshlt, + RTRIM(BVINPO) AS bvinpo, + RTRIM(BVTERM) AS bvterm, + RTRIM(BVSHCL) AS bvshcl, + RTRIM(BV1B) AS bv1b, + BVDISL AS bvdisl, + RTRIM(BVARCD) AS bvarcd, + RTRIM(BVINT) AS bvint, + BVSDAY AS bvsday, + RTRIM(BVPORQ) AS bvporq, + RTRIM(BVCLAS) AS bvclas, + RTRIM(BVPSTC) AS bvpstc, + CASE WHEN BVLDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE BVLDAT END AS bvldat, + BVLINA AS bvlina, + CASE WHEN BVPDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE BVPDAT END AS bvpdat, + BVLPAA AS bvlpaa, + BVYTDS AS bvytds, + BVLYTD AS bvlytd, + BVOUTB AS bvoutb, + RTRIM(BV15) AS bv15, + RTRIM(BVDUNN) AS bvdunn, + RTRIM(BVFAX) AS bvfax, + CASE WHEN BVMDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE BVMDAT END AS bvmdat, + RTRIM(BVBILL) AS bvbill, + RTRIM(BVGSTL) AS bvgstl, + RTRIM(BV3) AS bv3, + BVLARA AS bvlara, + RTRIM(BVCONT) AS bvcont, + RTRIM(BVSUPP) AS bvsupp, + RTRIM(BVSFOR) AS bvsfor, + BVSFCP AS bvsfcp, + RTRIM(BVMFOR) AS bvmfor, + BVMFCP AS bvmfcp, + RTRIM(BVXFOR) AS bvxfor, + BVXFCP AS bvxfcp, + RTRIM(BVCARC) AS bvcarc, + RTRIM(BVSERC) AS bvserc, + RTRIM(BVSUPA) AS bvsupa, + RTRIM(BVTRDP) AS bvtrdp, + RTRIM(BVDUNS) AS bvduns, + RTRIM(BVSFID) AS bvsfid, + RTRIM(BVUSEC) AS bvusec, + RTRIM(BVSHPR) AS bvshpr, + RTRIM(BVASNY) AS bvasny, + RTRIM(BVINVY) AS bvinvy, + RTRIM(BVFLG1) AS bvflg1, + RTRIM(BVFLG2) AS bvflg2, + RTRIM(BVFLG3) AS bvflg3, + RTRIM(BVFLG4) AS bvflg4, + RTRIM(BVFLG5) AS bvflg5, + RTRIM(BVFLG6) AS bvflg6, + RTRIM(BVSUMR) AS bvsumr, + RTRIM(BVPLNT) AS bvplnt, + RTRIM(BVDOCK) AS bvdock, + RTRIM(BVLINE) AS bvline, + RTRIM(BVDROP) AS bvdrop, + RTRIM(BVTMOD) AS bvtmod, + RTRIM(BVTTYP) AS bvttyp, + RTRIM(BVEQPI) AS bveqpi, + RTRIM(BVROUT) AS bvrout, + RTRIM(BVPOOL) AS bvpool, + RTRIM(BVPOLL) AS bvpoll, + RTRIM(BVJITF) AS bvjitf, + RTRIM(BVAPLG) AS bvaplg, + RTRIM(BVAVER) AS bvaver, + RTRIM(BVUVER) AS bvuver, + RTRIM(BVFOBC) AS bvfobc, + RTRIM(BVEMAL) AS bvemal, + RTRIM(BVWEB) AS bvweb, + RTRIM(BVDDIR) AS bvddir, + RTRIM(BVFL01) AS bvfl01, + RTRIM(BVADJC) AS bvadjc, + RTRIM(BVPPCL) AS bvppcl, + CASE WHEN BVCDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE BVCDAT END AS bvcdat, + RTRIM(BVIBRQ) AS bvibrq, + RTRIM(BVORSM) AS bvorsm, + RTRIM(BVFL04) AS bvfl04, + RTRIM(BVSTAT) AS bvstat, + RTRIM(BVREAS) AS bvreas, + RTRIM(BVFL05) AS bvfl05, + RTRIM(BVFL06) AS bvfl06, + RTRIM(BVFL07) AS bvfl07, + RTRIM(BVCSERD) AS bvcserd, + RTRIM(BVFL08) AS bvfl08, + RTRIM(BVFL09) AS bvfl09, + RTRIM(BVFL10) AS bvfl10, + RTRIM(BVFL11) AS bvfl11, + RTRIM(BVFL12) AS bvfl12, + CASE WHEN BVFL13 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE BVFL13 END AS bvfl13, + CASE WHEN BVFL14 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE BVFL14 END AS bvfl14, + BVFL15 AS bvfl15, + BVFL16 AS bvfl16, + RTRIM(BVFL17) AS bvfl17, + RTRIM(BVFL18) AS bvfl18, + RTRIM(BVFL19) AS bvfl19, + RTRIM(BVFL20) AS bvfl20, + RTRIM(BVVRFKB) AS bvvrfkb, + RTRIM(BVGRPCK) AS bvgrpck, + RTRIM(BVSWAP) AS bvswap, + RTRIM(BVICON) AS bvicon, + RTRIM(BVINSP) AS bvinsp, + RTRIM(BVALS) AS bvals, + RTRIM(BVFUT2) AS bvfut2, + RTRIM(BVFUT3) AS bvfut3, + RTRIM(BVFUT4) AS bvfut4, + RTRIM(BVFUT5) AS bvfut5, + RTRIM(BVFUT6) AS bvfut6, + RTRIM(BVFUT7) AS bvfut7, + RTRIM(BVFUT8) AS bvfut8, + RTRIM(BVFUT9) AS bvfut9, + RTRIM(BVFUT10) AS bvfut10, + RTRIM(BVFUT11) AS bvfut11, + RTRIM(BVFUT12) AS bvfut12, + RTRIM(BVFUT13) AS bvfut13, + RTRIM(BVFUT14) AS bvfut14, + RTRIM(BVFUT15) AS bvfut15, + RTRIM(BVTMZN) AS bvtmzn, + BVSLT AS bvslt, + RTRIM(BVSLTU) AS bvsltu, + RTRIM(BVUPSC) AS bvupsc, + RTRIM(BVSEAL) AS bvseal, + RTRIM(BVSTRQ) AS bvstrq, + RTRIM(BVWTPT) AS bvwtpt, + RTRIM(BVINCD) AS bvincd, + RTRIM(BVWCAR) AS bvwcar, + RTRIM(BVSVPO) AS bvsvpo, + RTRIM(BVSVCT) AS bvsvct, + RTRIM(BVFSTR) AS bvfstr, + BVTRVL AS bvtrvl, + BVCTIM AS bvctim, + RTRIM(BVCUSR) AS bvcusr, + BVMTIM AS bvmtim, + RTRIM(BVMUSR) AS bvmusr, + RTRIM(BVSEBP) AS bvsebp, + RTRIM(BVWESS) AS bvwess, + RTRIM(BVFUT16) AS bvfut16, + RTRIM(BVFUT17) AS bvfut17, + RTRIM(BVFUT18) AS bvfut18, + RTRIM(BVFUT19) AS bvfut19, + RTRIM(BVFUT20) AS bvfut20, + RTRIM(BVFUT21) AS bvfut21, + RTRIM(BVFUT22) AS bvfut22, + RTRIM(BVFUT23) AS bvfut23, + RTRIM(BVFUT24) AS bvfut24, + RTRIM(BVFUT25) AS bvfut25, + RTRIM(BVFUT26) AS bvfut26, + RTRIM(BVFUT27) AS bvfut27, + RTRIM(BVFUT28) AS bvfut28, + RTRIM(BVFUT29) AS bvfut29, + RTRIM(BVFUT30) AS bvfut30, + RTRIM(BVHIN) AS bvhin, + RTRIM(BVDOCKF) AS bvdockf, + RTRIM(BVORLNF) AS bvorlnf, + RTRIM(BVCLOC) AS bvcloc, + RTRIM(BVDLRD) AS bvdlrd, + RTRIM(BVSLTT) AS bvsltt, + RTRIM(BVVSM) AS bvvsm, + RTRIM(BVMRWM) AS bvmrwm, + RTRIM(BVEDIPW) AS bvedipw, + RTRIM(BVSPUF) AS bvspuf, + RTRIM(BVSLZN) AS bvslzn, + BVHFEP AS bvhfep, + BVARGP AS bvargp, + RTRIM(BVCSPO) AS bvcspo, + BVSHPD AS bvshpd, + BVSHPT AS bvshpt, + RTRIM(BVOOSF) AS bvoosf, + RTRIM(BVSCILC) AS bvscilc, + RTRIM(BVSCICI) AS bvscici, + BVSCIGD AS bvscigd, + BVSCIGD2 AS bvscigd2, + RTRIM(BVARCOL) AS bvarcol, + RTRIM(BVDCLS) AS bvdcls, + RTRIM(BVSCHL) AS bvschl, + RTRIM(BVARSP) AS bvarsp, + RTRIM(BVACBOL) AS bvacbol, + RTRIM(BVSOSO) AS bvsoso, + RTRIM(BVRTXR) AS bvrtxr, + RTRIM(BVPODCF) AS bvpodcf, + RTRIM(BVADSSC) AS bvadssc, + RTRIM(BVPODCC) AS bvpodcc, + RTRIM(BVATFE) AS bvatfe, + RTRIM(BVVIDO) AS bvvido, + RTRIM(BVUCFS) AS bvucfs, + RTRIM(BVSISR) AS bvsisr, + RTRIM(BVNBBL) AS bvnbbl, + RTRIM(BVSITL) AS bvsitl, + RTRIM(BVSIAL) AS bvsial, + RTRIM(BVSIOE) AS bvsioe +FROM LGDAT.CUST diff --git a/config/modules/dsdisc.json b/config/modules/dsdisc.json new file mode 100644 index 0000000..727e897 --- /dev/null +++ b/config/modules/dsdisc.json @@ -0,0 +1,113 @@ +{ + "name": "dsdisc", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.dsdisc", + "staging_table": "pipekit_staging.dsdisc", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Discount codes file 6.0", + "columns": [ + { + "source_name": "FADISC", + "source_type": "CHAR(3)", + "dest_name": "fadisc", + "dest_type": "text", + "description": "Discount Code" + }, + { + "source_name": "FADDES", + "source_type": "CHAR(30)", + "dest_name": "faddes", + "dest_type": "text", + "description": "Discount Description" + }, + { + "source_name": "FAPERC", + "source_type": "NUMERIC(8,5)", + "dest_name": "faperc", + "dest_type": "numeric(8,5)", + "description": "Default Rate" + }, + { + "source_name": "FADRCR", + "source_type": "CHAR(1)", + "dest_name": "fadrcr", + "dest_type": "text", + "description": "Debit Credit" + }, + { + "source_name": "FABANT", + "source_type": "CHAR(1)", + "dest_name": "fabant", + "dest_type": "text", + "description": "Rate Base" + }, + { + "source_name": "FADAMT", + "source_type": "NUMERIC(13,5)", + "dest_name": "fadamt", + "dest_type": "numeric(13,5)", + "description": "Default Amount" + }, + { + "source_name": "FAAPER", + "source_type": "CHAR(1)", + "dest_name": "faaper", + "dest_type": "text", + "description": "Fixed or per Unit" + }, + { + "source_name": "FACRAR", + "source_type": "CHAR(1)", + "dest_name": "facrar", + "dest_type": "text", + "description": "Create A/R" + }, + { + "source_name": "FACUST", + "source_type": "CHAR(8)", + "dest_name": "facust", + "dest_type": "text", + "description": "Customer Code" + }, + { + "source_name": "FAARSC", + "source_type": "CHAR(3)", + "dest_name": "faarsc", + "dest_type": "text", + "description": "Sales Code" + }, + { + "source_name": "FADINV", + "source_type": "NUMERIC(9,0)", + "dest_name": "fadinv", + "dest_type": "numeric(9,0)", + "description": "Discount Accumulation Inv#" + }, + { + "source_name": "FAAUNT", + "source_type": "CHAR(3)", + "dest_name": "faaunt", + "dest_type": "text", + "description": "Amount Per-Unit" + }, + { + "source_name": "FARTEF", + "source_type": "CHAR(1)", + "dest_name": "fartef", + "dest_type": "text", + "description": "Rate Flag" + }, + { + "source_name": "FARNDD", + "source_type": "NUMERIC(2,0)", + "dest_name": "farndd", + "dest_type": "numeric(2,0)", + "description": "Rounding # of Decimals" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/dsdisc.sql b/config/modules/dsdisc.sql new file mode 100644 index 0000000..beb276e --- /dev/null +++ b/config/modules/dsdisc.sql @@ -0,0 +1,16 @@ +SELECT + RTRIM(FADISC) AS fadisc, + RTRIM(FADDES) AS faddes, + FAPERC AS faperc, + RTRIM(FADRCR) AS fadrcr, + RTRIM(FABANT) AS fabant, + FADAMT AS fadamt, + RTRIM(FAAPER) AS faaper, + RTRIM(FACRAR) AS facrar, + RTRIM(FACUST) AS facust, + RTRIM(FAARSC) AS faarsc, + FADINV AS fadinv, + RTRIM(FAAUNT) AS faaunt, + RTRIM(FARTEF) AS fartef, + FARNDD AS farndd +FROM LGDAT.DSDISC diff --git a/config/modules/ffcret.json b/config/modules/ffcret.json new file mode 100644 index 0000000..dd4ee93 --- /dev/null +++ b/config/modules/ffcret.json @@ -0,0 +1,50 @@ +{ + "name": "ffcret", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.ffcret", + "staging_table": "pipekit_staging.ffcret", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Master Data - currency translation rates", + "columns": [ + { + "source_name": "FCUR", + "source_type": "VARCHAR(2)", + "dest_name": "fcur", + "dest_type": "text", + "description": "FCUR" + }, + { + "source_name": "TCUR", + "source_type": "VARCHAR(2)", + "dest_name": "tcur", + "dest_type": "text", + "description": "TCUR" + }, + { + "source_name": "RTYP", + "source_type": "VARCHAR(2)", + "dest_name": "rtyp", + "dest_type": "text", + "description": "RTYP" + }, + { + "source_name": "PERD", + "source_type": "VARCHAR(4)", + "dest_name": "perd", + "dest_type": "text", + "description": "PERD" + }, + { + "source_name": "RATE", + "source_type": "FLOAT", + "dest_name": "rate", + "dest_type": "double precision", + "description": "RATE" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/ffcret.sql b/config/modules/ffcret.sql new file mode 100644 index 0000000..e6f86cd --- /dev/null +++ b/config/modules/ffcret.sql @@ -0,0 +1,7 @@ +SELECT + RTRIM(FCUR) AS fcur, + RTRIM(TCUR) AS tcur, + RTRIM(RTYP) AS rtyp, + RTRIM(PERD) AS perd, + RATE AS rate +FROM RLARP.FFCRET diff --git a/config/modules/ffsbglr1.json b/config/modules/ffsbglr1.json new file mode 100644 index 0000000..6145efa --- /dev/null +++ b/config/modules/ffsbglr1.json @@ -0,0 +1,176 @@ +{ + "name": "ffsbglr1", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.ffsbglr1", + "staging_table": "pipekit_staging.ffsbglr1", + "merge_strategy": "incremental", + "merge_key": "perd", + "enabled": 0, + "dest_description": "FFSBGLR1", + "columns": [ + { + "source_name": "MODULE", + "source_type": "CHAR(4)", + "dest_name": "module", + "dest_type": "text", + "description": "Module" + }, + { + "source_name": "BATCH", + "source_type": "CHAR(9)", + "dest_name": "batch", + "dest_type": "text", + "description": "Batch" + }, + { + "source_name": "PERD", + "source_type": "CHAR(4)", + "dest_name": "perd", + "dest_type": "text", + "description": "Perd" + }, + { + "source_name": "TDATE", + "source_type": "CHAR(10)", + "dest_name": "tdate", + "dest_type": "text", + "description": "Tdate" + }, + { + "source_name": "PDATE", + "source_type": "CHAR(10)", + "dest_name": "pdate", + "dest_type": "text", + "description": "Pdate" + }, + { + "source_name": "ACCT", + "source_type": "CHAR(12)", + "dest_name": "acct", + "dest_type": "text", + "description": "Acct" + }, + { + "source_name": "AMT", + "source_type": "DECIMAL(16,6)", + "dest_name": "amt", + "dest_type": "numeric(16,6)", + "description": "Amt" + }, + { + "source_name": "PROJ", + "source_type": "VARCHAR(50)", + "dest_name": "proj", + "dest_type": "text", + "description": "Proj" + }, + { + "source_name": "USRN", + "source_type": "VARCHAR(50)", + "dest_name": "usrn", + "dest_type": "text", + "description": "Usrn" + }, + { + "source_name": "REV", + "source_type": "VARCHAR(2)", + "dest_name": "rev", + "dest_type": "text", + "description": "Rev" + }, + { + "source_name": "CUSMOD", + "source_type": "VARCHAR(50)", + "dest_name": "cusmod", + "dest_type": "text", + "description": "Cusmod" + }, + { + "source_name": "CUSKEY1", + "source_type": "VARCHAR(50)", + "dest_name": "cuskey1", + "dest_type": "text", + "description": "Cuskey1" + }, + { + "source_name": "CUSKEY1D", + "source_type": "VARCHAR(50)", + "dest_name": "cuskey1d", + "dest_type": "text", + "description": "Cuskey1d" + }, + { + "source_name": "CUSKEY2", + "source_type": "VARCHAR(50)", + "dest_name": "cuskey2", + "dest_type": "text", + "description": "Cuskey2" + }, + { + "source_name": "CUSKEY2D", + "source_type": "VARCHAR(50)", + "dest_name": "cuskey2d", + "dest_type": "text", + "description": "Cuskey2d" + }, + { + "source_name": "CUSKEY3", + "source_type": "VARCHAR(50)", + "dest_name": "cuskey3", + "dest_type": "text", + "description": "Cuskey3" + }, + { + "source_name": "CUSKEY3D", + "source_type": "VARCHAR(50)", + "dest_name": "cuskey3d", + "dest_type": "text", + "description": "Cuskey3d" + }, + { + "source_name": "CUSKEY4", + "source_type": "VARCHAR(50)", + "dest_name": "cuskey4", + "dest_type": "text", + "description": "Cuskey4" + }, + { + "source_name": "CUSKEY4D", + "source_type": "VARCHAR(50)", + "dest_name": "cuskey4d", + "dest_type": "text", + "description": "Cuskey4d" + }, + { + "source_name": "CUSVEND", + "source_type": "VARCHAR(50)", + "dest_name": "cusvend", + "dest_type": "text", + "description": "Cusvend" + }, + { + "source_name": "CUSCUST", + "source_type": "VARCHAR(50)", + "dest_name": "cuscust", + "dest_type": "text", + "description": "Cuscust" + }, + { + "source_name": "RECID", + "source_type": "VARCHAR(12)", + "dest_name": "recid", + "dest_type": "text", + "description": "Recid" + } + ], + "watermarks": [ + { + "name": "fspr", + "connection": "usmidsap02", + "resolver_sql": "select max(perd) from cms.ffsbglr1", + "default_value": "2601" + } + ], + "hooks": [] +} diff --git a/config/modules/ffsbglr1.sql b/config/modules/ffsbglr1.sql new file mode 100644 index 0000000..fd1ea44 --- /dev/null +++ b/config/modules/ffsbglr1.sql @@ -0,0 +1,25 @@ +SELECT + MODULE AS module, + BATCH AS batch, + PERD AS perd, + TDATE AS tdate, + PDATE AS pdate, + ACCT AS acct, + AMT AS amt, + PROJ AS proj, + USRN AS usrn, + REV AS rev, + CUSMOD AS cusmod, + CUSKEY1 AS cuskey1, + CUSKEY1D AS cuskey1d, + CUSKEY2 AS cuskey2, + CUSKEY2D AS cuskey2d, + CUSKEY3 AS cuskey3, + CUSKEY3D AS cuskey3d, + CUSKEY4 AS cuskey4, + CUSKEY4D AS cuskey4d, + CUSVEND AS cusvend, + CUSCUST AS cuscust, + RECID AS recid +FROM FANALDEV.FFSBGLR1 +WHERE PERD >= '2702' diff --git a/config/modules/fgrp.json b/config/modules/fgrp.json new file mode 100644 index 0000000..24d19a1 --- /dev/null +++ b/config/modules/fgrp.json @@ -0,0 +1,92 @@ +{ + "name": "fgrp", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.fgrp", + "staging_table": "pipekit_staging.fgrp", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Financial Statement account groups 6.0", + "columns": [ + { + "source_name": "BQ1COMP", + "source_type": "CHAR(2)", + "dest_name": "bq1comp", + "dest_type": "text", + "description": "Company Code Alpha" + }, + { + "source_name": "BQ1LVL", + "source_type": "CHAR(1)", + "dest_name": "bq1lvl", + "dest_type": "text", + "description": "Group Level" + }, + { + "source_name": "BQ1GRP", + "source_type": "CHAR(7)", + "dest_name": "bq1grp", + "dest_type": "text", + "description": "Group Code" + }, + { + "source_name": "BQ1TITL", + "source_type": "CHAR(30)", + "dest_name": "bq1titl", + "dest_type": "text", + "description": "Group Title" + }, + { + "source_name": "BQ1NPAG", + "source_type": "CHAR(1)", + "dest_name": "bq1npag", + "dest_type": "text", + "description": "New Page" + }, + { + "source_name": "BQ1ULIN", + "source_type": "CHAR(1)", + "dest_name": "bq1ulin", + "dest_type": "text", + "description": "Underline" + }, + { + "source_name": "BQ1BLIN", + "source_type": "NUMERIC(2,0)", + "dest_name": "bq1blin", + "dest_type": "numeric(2,0)", + "description": "Skip lines Before" + }, + { + "source_name": "BQ1ALIN", + "source_type": "NUMERIC(2,0)", + "dest_name": "bq1alin", + "dest_type": "numeric(2,0)", + "description": "Skip lines After" + }, + { + "source_name": "A1", + "source_type": "CHAR(1)", + "dest_name": "a1", + "dest_type": "text", + "description": "Old Group Level" + }, + { + "source_name": "A7", + "source_type": "CHAR(7)", + "dest_name": "a7", + "dest_type": "text", + "description": "Old Group Code" + }, + { + "source_name": "A40", + "source_type": "CHAR(40)", + "dest_name": "a40", + "dest_type": "text", + "description": "Old Other Data" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/fgrp.sql b/config/modules/fgrp.sql new file mode 100644 index 0000000..9c70066 --- /dev/null +++ b/config/modules/fgrp.sql @@ -0,0 +1,13 @@ +SELECT + RTRIM(BQ1COMP) AS bq1comp, + RTRIM(BQ1LVL) AS bq1lvl, + RTRIM(BQ1GRP) AS bq1grp, + RTRIM(BQ1TITL) AS bq1titl, + RTRIM(BQ1NPAG) AS bq1npag, + RTRIM(BQ1ULIN) AS bq1ulin, + BQ1BLIN AS bq1blin, + BQ1ALIN AS bq1alin, + RTRIM(A1) AS a1, + RTRIM(A7) AS a7, + RTRIM(A40) AS a40 +FROM LGDAT.FGRP diff --git a/config/modules/ggtp.json b/config/modules/ggtp.json new file mode 100644 index 0000000..4fadc3c --- /dev/null +++ b/config/modules/ggtp.json @@ -0,0 +1,120 @@ +{ + "name": "ggtp", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.ggtp", + "staging_table": "pipekit_staging.ggtp", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "G/L Category Code 5.3", + "columns": [ + { + "source_name": "D35GCDE", + "source_type": "CHAR(10)", + "dest_name": "d35gcde", + "dest_type": "text", + "description": "G/L Category Code" + }, + { + "source_name": "D35DES1", + "source_type": "CHAR(30)", + "dest_name": "d35des1", + "dest_type": "text", + "description": "Description 1" + }, + { + "source_name": "D35DES2", + "source_type": "CHAR(30)", + "dest_name": "d35des2", + "dest_type": "text", + "description": "Description 2" + }, + { + "source_name": "D35DES3", + "source_type": "CHAR(30)", + "dest_name": "d35des3", + "dest_type": "text", + "description": "Description 3" + }, + { + "source_name": "D35USR1", + "source_type": "CHAR(30)", + "dest_name": "d35usr1", + "dest_type": "text", + "description": "User Field 1" + }, + { + "source_name": "D35USR2", + "source_type": "CHAR(30)", + "dest_name": "d35usr2", + "dest_type": "text", + "description": "User Field 2" + }, + { + "source_name": "D35USR3", + "source_type": "CHAR(30)", + "dest_name": "d35usr3", + "dest_type": "text", + "description": "User Field 3" + }, + { + "source_name": "D35USR4", + "source_type": "DECIMAL(15,5)", + "dest_name": "d35usr4", + "dest_type": "numeric(15,5)", + "description": "User Field 4" + }, + { + "source_name": "D35USR5", + "source_type": "DECIMAL(15,5)", + "dest_name": "d35usr5", + "dest_type": "numeric(15,5)", + "description": "User Field 5" + }, + { + "source_name": "D35CUSR", + "source_type": "CHAR(10)", + "dest_name": "d35cusr", + "dest_type": "text", + "description": "Created By User" + }, + { + "source_name": "D35CDAT", + "source_type": "DATE", + "dest_name": "d35cdat", + "dest_type": "date", + "description": "Date Created" + }, + { + "source_name": "D35CTME", + "source_type": "TIME", + "dest_name": "d35ctme", + "dest_type": "time", + "description": "Time Created" + }, + { + "source_name": "D35UUSR", + "source_type": "CHAR(10)", + "dest_name": "d35uusr", + "dest_type": "text", + "description": "Updated By User" + }, + { + "source_name": "D35UDAT", + "source_type": "DATE", + "dest_name": "d35udat", + "dest_type": "date", + "description": "Date Updated" + }, + { + "source_name": "D35UTME", + "source_type": "TIME", + "dest_name": "d35utme", + "dest_type": "time", + "description": "Time Updated" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/ggtp.sql b/config/modules/ggtp.sql new file mode 100644 index 0000000..ebfa09c --- /dev/null +++ b/config/modules/ggtp.sql @@ -0,0 +1,17 @@ +SELECT + RTRIM(D35GCDE) AS d35gcde, + RTRIM(D35DES1) AS d35des1, + RTRIM(D35DES2) AS d35des2, + RTRIM(D35DES3) AS d35des3, + RTRIM(D35USR1) AS d35usr1, + RTRIM(D35USR2) AS d35usr2, + RTRIM(D35USR3) AS d35usr3, + D35USR4 AS d35usr4, + D35USR5 AS d35usr5, + RTRIM(D35CUSR) AS d35cusr, + CASE WHEN D35CDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE D35CDAT END AS d35cdat, + D35CTME AS d35ctme, + RTRIM(D35UUSR) AS d35uusr, + CASE WHEN D35UDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE D35UDAT END AS d35udat, + D35UTME AS d35utme +FROM LGDAT.GGTP diff --git a/config/modules/gl00100.json b/config/modules/gl00100.json new file mode 100644 index 0000000..a7cbff9 --- /dev/null +++ b/config/modules/gl00100.json @@ -0,0 +1,302 @@ +{ + "name": "gl00100", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.gl00100", + "staging_table": "pipekit_staging.gl00100", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "ACTINDX", + "source_type": "INT", + "dest_name": "actindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ACTNUMBR_1", + "source_type": "CHAR(7)", + "dest_name": "actnumbr_1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_2", + "source_type": "CHAR(7)", + "dest_name": "actnumbr_2", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_3", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_3", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_4", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_4", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_5", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_5", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_6", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_6", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_7", + "source_type": "CHAR(11)", + "dest_name": "actnumbr_7", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_8", + "source_type": "CHAR(11)", + "dest_name": "actnumbr_8", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTALIAS", + "source_type": "CHAR(21)", + "dest_name": "actalias", + "dest_type": "text", + "description": null + }, + { + "source_name": "MNACSGMT", + "source_type": "CHAR(67)", + "dest_name": "mnacsgmt", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACCTTYPE", + "source_type": "SMALLINT", + "dest_name": "accttype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ACTDESCR", + "source_type": "CHAR(51)", + "dest_name": "actdescr", + "dest_type": "text", + "description": null + }, + { + "source_name": "PSTNGTYP", + "source_type": "SMALLINT", + "dest_name": "pstngtyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ACCATNUM", + "source_type": "SMALLINT", + "dest_name": "accatnum", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ACTIVE", + "source_type": "TINYINT", + "dest_name": "active", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TPCLBLNC", + "source_type": "SMALLINT", + "dest_name": "tpclblnc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DECPLACS", + "source_type": "SMALLINT", + "dest_name": "decplacs", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FXDORVAR", + "source_type": "SMALLINT", + "dest_name": "fxdorvar", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BALFRCLC", + "source_type": "SMALLINT", + "dest_name": "balfrclc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DSPLKUPS", + "source_type": "BINARY", + "dest_name": "dsplkups", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "CNVRMTHD", + "source_type": "SMALLINT", + "dest_name": "cnvrmthd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "HSTRCLRT", + "source_type": "NUMERIC(19,7)", + "dest_name": "hstrclrt", + "dest_type": "numeric(19,7)", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CREATDDT", + "source_type": "DATETIME", + "dest_name": "creatddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "MODIFDT", + "source_type": "DATETIME", + "dest_name": "modifdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "USERDEF1", + "source_type": "CHAR(21)", + "dest_name": "userdef1", + "dest_type": "text", + "description": null + }, + { + "source_name": "USERDEF2", + "source_type": "CHAR(21)", + "dest_name": "userdef2", + "dest_type": "text", + "description": null + }, + { + "source_name": "PostSlsIn", + "source_type": "SMALLINT", + "dest_name": "postslsin", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PostIvIn", + "source_type": "SMALLINT", + "dest_name": "postivin", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PostPurchIn", + "source_type": "SMALLINT", + "dest_name": "postpurchin", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PostPRIn", + "source_type": "SMALLINT", + "dest_name": "postprin", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ADJINFL", + "source_type": "TINYINT", + "dest_name": "adjinfl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INFLAREV", + "source_type": "INT", + "dest_name": "inflarev", + "dest_type": "integer", + "description": null + }, + { + "source_name": "INFLAEQU", + "source_type": "INT", + "dest_name": "inflaequ", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ACCTENTR", + "source_type": "TINYINT", + "dest_name": "acctentr", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "USRDEFS1", + "source_type": "CHAR(31)", + "dest_name": "usrdefs1", + "dest_type": "text", + "description": null + }, + { + "source_name": "USRDEFS2", + "source_type": "CHAR(31)", + "dest_name": "usrdefs2", + "dest_type": "text", + "description": null + }, + { + "source_name": "Clear_Balance", + "source_type": "TINYINT", + "dest_name": "clear_balance", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/gl00100.sql b/config/modules/gl00100.sql new file mode 100644 index 0000000..275ee84 --- /dev/null +++ b/config/modules/gl00100.sql @@ -0,0 +1,43 @@ +SELECT + [ACTINDX] AS [actindx], + RTRIM([ACTNUMBR_1]) AS [actnumbr_1], + RTRIM([ACTNUMBR_2]) AS [actnumbr_2], + RTRIM([ACTNUMBR_3]) AS [actnumbr_3], + RTRIM([ACTNUMBR_4]) AS [actnumbr_4], + RTRIM([ACTNUMBR_5]) AS [actnumbr_5], + RTRIM([ACTNUMBR_6]) AS [actnumbr_6], + RTRIM([ACTNUMBR_7]) AS [actnumbr_7], + RTRIM([ACTNUMBR_8]) AS [actnumbr_8], + RTRIM([ACTALIAS]) AS [actalias], + RTRIM([MNACSGMT]) AS [mnacsgmt], + [ACCTTYPE] AS [accttype], + RTRIM([ACTDESCR]) AS [actdescr], + [PSTNGTYP] AS [pstngtyp], + [ACCATNUM] AS [accatnum], + [ACTIVE] AS [active], + [TPCLBLNC] AS [tpclblnc], + [DECPLACS] AS [decplacs], + [FXDORVAR] AS [fxdorvar], + [BALFRCLC] AS [balfrclc], + [DSPLKUPS] AS [dsplkups], + [CNVRMTHD] AS [cnvrmthd], + [HSTRCLRT] AS [hstrclrt], + [NOTEINDX] AS [noteindx], + [CREATDDT] AS [creatddt], + [MODIFDT] AS [modifdt], + RTRIM([USERDEF1]) AS [userdef1], + RTRIM([USERDEF2]) AS [userdef2], + [PostSlsIn] AS [postslsin], + [PostIvIn] AS [postivin], + [PostPurchIn] AS [postpurchin], + [PostPRIn] AS [postprin], + [ADJINFL] AS [adjinfl], + [INFLAREV] AS [inflarev], + [INFLAEQU] AS [inflaequ], + [ACCTENTR] AS [acctentr], + RTRIM([USRDEFS1]) AS [usrdefs1], + RTRIM([USRDEFS2]) AS [usrdefs2], + [Clear_Balance] AS [clear_balance], + [DEX_ROW_TS] AS [dex_row_ts], + [DEX_ROW_ID] AS [dex_row_id] +FROM [GPSERVER].[CHG].[dbo].[GL00100] diff --git a/config/modules/gl10110.json b/config/modules/gl10110.json new file mode 100644 index 0000000..c60be6d --- /dev/null +++ b/config/modules/gl10110.json @@ -0,0 +1,134 @@ +{ + "name": "gl10110", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.gl10110", + "staging_table": "pipekit_staging.gl10110", + "merge_strategy": "incremental", + "merge_key": "dex_row_id", + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "ACTINDX", + "source_type": "INT", + "dest_name": "actindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "YEAR1", + "source_type": "SMALLINT", + "dest_name": "year1", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PERIODID", + "source_type": "SMALLINT", + "dest_name": "periodid", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Ledger_ID", + "source_type": "SMALLINT", + "dest_name": "ledger_id", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PERDBLNC", + "source_type": "NUMERIC(19,5)", + "dest_name": "perdblnc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ACTNUMBR_1", + "source_type": "CHAR(7)", + "dest_name": "actnumbr_1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_2", + "source_type": "CHAR(7)", + "dest_name": "actnumbr_2", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_3", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_3", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_4", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_4", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_5", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_5", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_6", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_6", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_7", + "source_type": "CHAR(11)", + "dest_name": "actnumbr_7", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_8", + "source_type": "CHAR(11)", + "dest_name": "actnumbr_8", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACCATNUM", + "source_type": "SMALLINT", + "dest_name": "accatnum", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEBITAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "debitamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CRDTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "crdtamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/gl10110.sql b/config/modules/gl10110.sql new file mode 100644 index 0000000..6573623 --- /dev/null +++ b/config/modules/gl10110.sql @@ -0,0 +1,19 @@ +SELECT + [ACTINDX] AS actindx, + [YEAR1] AS year1, + [PERIODID] AS periodid, + [Ledger_ID] AS ledger_id, + [PERDBLNC] AS perdblnc, + RTRIM([ACTNUMBR_1]) AS actnumbr_1, + RTRIM([ACTNUMBR_2]) AS actnumbr_2, + RTRIM([ACTNUMBR_3]) AS actnumbr_3, + RTRIM([ACTNUMBR_4]) AS actnumbr_4, + RTRIM([ACTNUMBR_5]) AS actnumbr_5, + RTRIM([ACTNUMBR_6]) AS actnumbr_6, + RTRIM([ACTNUMBR_7]) AS actnumbr_7, + RTRIM([ACTNUMBR_8]) AS actnumbr_8, + [ACCATNUM] AS accatnum, + [DEBITAMT] AS debitamt, + [CRDTAMNT] AS crdtamnt, + [DEX_ROW_ID] AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[GL10110] diff --git a/config/modules/gl10111.json b/config/modules/gl10111.json new file mode 100644 index 0000000..7789414 --- /dev/null +++ b/config/modules/gl10111.json @@ -0,0 +1,134 @@ +{ + "name": "gl10111", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.gl10111", + "staging_table": "pipekit_staging.gl10111", + "merge_strategy": "incremental", + "merge_key": "dex_row_id", + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "ACTINDX", + "source_type": "INT", + "dest_name": "actindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "YEAR1", + "source_type": "SMALLINT", + "dest_name": "year1", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PERIODID", + "source_type": "SMALLINT", + "dest_name": "periodid", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Ledger_ID", + "source_type": "SMALLINT", + "dest_name": "ledger_id", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ACTNUMBR_1", + "source_type": "CHAR(7)", + "dest_name": "actnumbr_1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_2", + "source_type": "CHAR(7)", + "dest_name": "actnumbr_2", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_3", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_3", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_4", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_4", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_5", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_5", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_6", + "source_type": "CHAR(9)", + "dest_name": "actnumbr_6", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_7", + "source_type": "CHAR(11)", + "dest_name": "actnumbr_7", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTNUMBR_8", + "source_type": "CHAR(11)", + "dest_name": "actnumbr_8", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACCATNUM", + "source_type": "SMALLINT", + "dest_name": "accatnum", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PERDBLNC", + "source_type": "NUMERIC(19,5)", + "dest_name": "perdblnc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DEBITAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "debitamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CRDTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "crdtamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/gl10111.sql b/config/modules/gl10111.sql new file mode 100644 index 0000000..78ffbf1 --- /dev/null +++ b/config/modules/gl10111.sql @@ -0,0 +1,19 @@ +SELECT + [ACTINDX] AS actindx, + [YEAR1] AS year1, + [PERIODID] AS periodid, + [Ledger_ID] AS ledger_id, + RTRIM([ACTNUMBR_1]) AS actnumbr_1, + RTRIM([ACTNUMBR_2]) AS actnumbr_2, + RTRIM([ACTNUMBR_3]) AS actnumbr_3, + RTRIM([ACTNUMBR_4]) AS actnumbr_4, + RTRIM([ACTNUMBR_5]) AS actnumbr_5, + RTRIM([ACTNUMBR_6]) AS actnumbr_6, + RTRIM([ACTNUMBR_7]) AS actnumbr_7, + RTRIM([ACTNUMBR_8]) AS actnumbr_8, + [ACCATNUM] AS accatnum, + [PERDBLNC] AS perdblnc, + [DEBITAMT] AS debitamt, + [CRDTAMNT] AS crdtamnt, + [DEX_ROW_ID] AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[GL10111] diff --git a/config/modules/gl20000.json b/config/modules/gl20000.json new file mode 100644 index 0000000..e49bd78 --- /dev/null +++ b/config/modules/gl20000.json @@ -0,0 +1,484 @@ +{ + "name": "gl20000", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.gl20000", + "staging_table": "pipekit_staging.gl20000", + "merge_strategy": "incremental", + "merge_key": "dex_row_id", + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "OPENYEAR", + "source_type": "SMALLINT", + "dest_name": "openyear", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "JRNENTRY", + "source_type": "INT", + "dest_name": "jrnentry", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RCTRXSEQ", + "source_type": "NUMERIC(19,5)", + "dest_name": "rctrxseq", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SOURCDOC", + "source_type": "CHAR(11)", + "dest_name": "sourcdoc", + "dest_type": "text", + "description": null + }, + { + "source_name": "REFRENCE", + "source_type": "CHAR(31)", + "dest_name": "refrence", + "dest_type": "text", + "description": null + }, + { + "source_name": "DSCRIPTN", + "source_type": "CHAR(31)", + "dest_name": "dscriptn", + "dest_type": "text", + "description": null + }, + { + "source_name": "TRXDATE", + "source_type": "DATETIME", + "dest_name": "trxdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "TRXSORCE", + "source_type": "CHAR(13)", + "dest_name": "trxsorce", + "dest_type": "text", + "description": null + }, + { + "source_name": "ACTINDX", + "source_type": "INT", + "dest_name": "actindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "POLLDTRX", + "source_type": "TINYINT", + "dest_name": "polldtrx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "LASTUSER", + "source_type": "CHAR(15)", + "dest_name": "lastuser", + "dest_type": "text", + "description": null + }, + { + "source_name": "LSTDTEDT", + "source_type": "DATETIME", + "dest_name": "lstdtedt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "USWHPSTD", + "source_type": "CHAR(15)", + "dest_name": "uswhpstd", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORGNTSRC", + "source_type": "CHAR(15)", + "dest_name": "orgntsrc", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORGNATYP", + "source_type": "SMALLINT", + "dest_name": "orgnatyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "QKOFSET", + "source_type": "SMALLINT", + "dest_name": "qkofset", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SERIES", + "source_type": "SMALLINT", + "dest_name": "series", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ORTRXTYP", + "source_type": "SMALLINT", + "dest_name": "ortrxtyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ORCTRNUM", + "source_type": "CHAR(21)", + "dest_name": "orctrnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORMSTRID", + "source_type": "CHAR(31)", + "dest_name": "ormstrid", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORMSTRNM", + "source_type": "CHAR(65)", + "dest_name": "ormstrnm", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORDOCNUM", + "source_type": "CHAR(21)", + "dest_name": "ordocnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORPSTDDT", + "source_type": "DATETIME", + "dest_name": "orpstddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ORTRXSRC", + "source_type": "CHAR(13)", + "dest_name": "ortrxsrc", + "dest_type": "text", + "description": null + }, + { + "source_name": "OrigDTASeries", + "source_type": "SMALLINT", + "dest_name": "origdtaseries", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "OrigSeqNum", + "source_type": "INT", + "dest_name": "origseqnum", + "dest_type": "integer", + "description": null + }, + { + "source_name": "SEQNUMBR", + "source_type": "INT", + "dest_name": "seqnumbr", + "dest_type": "integer", + "description": null + }, + { + "source_name": "DTA_GL_Status", + "source_type": "SMALLINT", + "dest_name": "dta_gl_status", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DTA_Index", + "source_type": "NUMERIC(19,5)", + "dest_name": "dta_index", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CURNCYID", + "source_type": "CHAR(15)", + "dest_name": "curncyid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CURRNIDX", + "source_type": "SMALLINT", + "dest_name": "currnidx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "RATETPID", + "source_type": "CHAR(15)", + "dest_name": "ratetpid", + "dest_type": "text", + "description": null + }, + { + "source_name": "EXGTBLID", + "source_type": "CHAR(15)", + "dest_name": "exgtblid", + "dest_type": "text", + "description": null + }, + { + "source_name": "XCHGRATE", + "source_type": "NUMERIC(19,7)", + "dest_name": "xchgrate", + "dest_type": "numeric(19,7)", + "description": null + }, + { + "source_name": "EXCHDATE", + "source_type": "DATETIME", + "dest_name": "exchdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "TIME1", + "source_type": "DATETIME", + "dest_name": "time1", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "RTCLCMTD", + "source_type": "SMALLINT", + "dest_name": "rtclcmtd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ICTRX", + "source_type": "TINYINT", + "dest_name": "ictrx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ORCOMID", + "source_type": "CHAR(5)", + "dest_name": "orcomid", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORIGINJE", + "source_type": "INT", + "dest_name": "originje", + "dest_type": "integer", + "description": null + }, + { + "source_name": "PERIODID", + "source_type": "SMALLINT", + "dest_name": "periodid", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEBITAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "debitamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CRDTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "crdtamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDBTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordbtamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORCRDAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orcrdamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DOCDATE", + "source_type": "DATETIME", + "dest_name": "docdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "PSTGNMBR", + "source_type": "INT", + "dest_name": "pstgnmbr", + "dest_type": "integer", + "description": null + }, + { + "source_name": "PPSGNMBR", + "source_type": "INT", + "dest_name": "ppsgnmbr", + "dest_type": "integer", + "description": null + }, + { + "source_name": "DENXRATE", + "source_type": "NUMERIC(19,7)", + "dest_name": "denxrate", + "dest_type": "numeric(19,7)", + "description": null + }, + { + "source_name": "MCTRXSTT", + "source_type": "SMALLINT", + "dest_name": "mctrxstt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CorrespondingUnit", + "source_type": "CHAR(5)", + "dest_name": "correspondingunit", + "dest_type": "text", + "description": null + }, + { + "source_name": "VOIDED", + "source_type": "TINYINT", + "dest_name": "voided", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Back_Out_JE", + "source_type": "INT", + "dest_name": "back_out_je", + "dest_type": "integer", + "description": null + }, + { + "source_name": "Back_Out_JE_Year", + "source_type": "SMALLINT", + "dest_name": "back_out_je_year", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Correcting_JE", + "source_type": "INT", + "dest_name": "correcting_je", + "dest_type": "integer", + "description": null + }, + { + "source_name": "Correcting_JE_Year", + "source_type": "SMALLINT", + "dest_name": "correcting_je_year", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Original_JE", + "source_type": "INT", + "dest_name": "original_je", + "dest_type": "integer", + "description": null + }, + { + "source_name": "Original_JE_Seq_Num", + "source_type": "NUMERIC(19,5)", + "dest_name": "original_je_seq_num", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "Original_JE_Year", + "source_type": "SMALLINT", + "dest_name": "original_je_year", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Ledger_ID", + "source_type": "SMALLINT", + "dest_name": "ledger_id", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Adjustment_Transaction", + "source_type": "TINYINT", + "dest_name": "adjustment_transaction", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "APRVLUSERID", + "source_type": "CHAR(15)", + "dest_name": "aprvluserid", + "dest_type": "text", + "description": null + }, + { + "source_name": "APPRVLDT", + "source_type": "DATETIME", + "dest_name": "apprvldt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [ + { + "name": "dex_row_id", + "connection": "usmidsap02", + "resolver_sql": "select max(dex_row_id) from gp.gl20000", + "default_value": "0" + } + ], + "hooks": [] +} diff --git a/config/modules/gl20000.sql b/config/modules/gl20000.sql new file mode 100644 index 0000000..45ad7dd --- /dev/null +++ b/config/modules/gl20000.sql @@ -0,0 +1,69 @@ +SELECT + [OPENYEAR] AS openyear, + [JRNENTRY] AS jrnentry, + [RCTRXSEQ] AS rctrxseq, + RTRIM([SOURCDOC]) AS sourcdoc, + RTRIM([REFRENCE]) AS refrence, + RTRIM([DSCRIPTN]) AS dscriptn, + [TRXDATE] AS trxdate, + RTRIM([TRXSORCE]) AS trxsorce, + [ACTINDX] AS actindx, + [POLLDTRX] AS polldtrx, + RTRIM([LASTUSER]) AS lastuser, + [LSTDTEDT] AS lstdtedt, + RTRIM([USWHPSTD]) AS uswhpstd, + RTRIM([ORGNTSRC]) AS orgntsrc, + [ORGNATYP] AS orgnatyp, + [QKOFSET] AS qkofset, + [SERIES] AS series, + [ORTRXTYP] AS ortrxtyp, + RTRIM([ORCTRNUM]) AS orctrnum, + RTRIM([ORMSTRID]) AS ormstrid, + RTRIM([ORMSTRNM]) AS ormstrnm, + RTRIM([ORDOCNUM]) AS ordocnum, + [ORPSTDDT] AS orpstddt, + RTRIM([ORTRXSRC]) AS ortrxsrc, + [OrigDTASeries] AS origdtaseries, + [OrigSeqNum] AS origseqnum, + [SEQNUMBR] AS seqnumbr, + [DTA_GL_Status] AS dta_gl_status, + [DTA_Index] AS dta_index, + RTRIM([CURNCYID]) AS curncyid, + [CURRNIDX] AS currnidx, + RTRIM([RATETPID]) AS ratetpid, + RTRIM([EXGTBLID]) AS exgtblid, + [XCHGRATE] AS xchgrate, + [EXCHDATE] AS exchdate, + [TIME1] AS time1, + [RTCLCMTD] AS rtclcmtd, + [NOTEINDX] AS noteindx, + [ICTRX] AS ictrx, + RTRIM([ORCOMID]) AS orcomid, + [ORIGINJE] AS originje, + [PERIODID] AS periodid, + [DEBITAMT] AS debitamt, + [CRDTAMNT] AS crdtamnt, + [ORDBTAMT] AS ordbtamt, + [ORCRDAMT] AS orcrdamt, + [DOCDATE] AS docdate, + [PSTGNMBR] AS pstgnmbr, + [PPSGNMBR] AS ppsgnmbr, + [DENXRATE] AS denxrate, + [MCTRXSTT] AS mctrxstt, + RTRIM([CorrespondingUnit]) AS correspondingunit, + [VOIDED] AS voided, + [Back_Out_JE] AS back_out_je, + [Back_Out_JE_Year] AS back_out_je_year, + [Correcting_JE] AS correcting_je, + [Correcting_JE_Year] AS correcting_je_year, + [Original_JE] AS original_je, + [Original_JE_Seq_Num] AS original_je_seq_num, + [Original_JE_Year] AS original_je_year, + [Ledger_ID] AS ledger_id, + [Adjustment_Transaction] AS adjustment_transaction, + RTRIM([APRVLUSERID]) AS aprvluserid, + [APPRVLDT] AS apprvldt, + [DEX_ROW_TS] AS dex_row_ts, + [DEX_ROW_ID] AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[GL20000] +WHERE [DEX_ROW_ID] > {dex_row_id} diff --git a/config/modules/gl30000.json b/config/modules/gl30000.json new file mode 100644 index 0000000..05762fe --- /dev/null +++ b/config/modules/gl30000.json @@ -0,0 +1,484 @@ +{ + "name": "gl30000", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.gl30000", + "staging_table": "pipekit_staging.dbo_gl30000", + "merge_strategy": "incremental", + "merge_key": "dex_row_id", + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "HSTYEAR", + "source_type": "SMALLINT", + "dest_name": "hstyear", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "JRNENTRY", + "source_type": "INT", + "dest_name": "jrnentry", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RCTRXSEQ", + "source_type": "NUMERIC(19,5)", + "dest_name": "rctrxseq", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SOURCDOC", + "source_type": "CHAR(11)", + "dest_name": "sourcdoc", + "dest_type": "text", + "description": null + }, + { + "source_name": "REFRENCE", + "source_type": "CHAR(31)", + "dest_name": "refrence", + "dest_type": "text", + "description": null + }, + { + "source_name": "DSCRIPTN", + "source_type": "CHAR(31)", + "dest_name": "dscriptn", + "dest_type": "text", + "description": null + }, + { + "source_name": "TRXDATE", + "source_type": "DATETIME", + "dest_name": "trxdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ACTINDX", + "source_type": "INT", + "dest_name": "actindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "TRXSORCE", + "source_type": "CHAR(13)", + "dest_name": "trxsorce", + "dest_type": "text", + "description": null + }, + { + "source_name": "POLLDTRX", + "source_type": "TINYINT", + "dest_name": "polldtrx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "LASTUSER", + "source_type": "CHAR(15)", + "dest_name": "lastuser", + "dest_type": "text", + "description": null + }, + { + "source_name": "LSTDTEDT", + "source_type": "DATETIME", + "dest_name": "lstdtedt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "USWHPSTD", + "source_type": "CHAR(15)", + "dest_name": "uswhpstd", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORGNTSRC", + "source_type": "CHAR(15)", + "dest_name": "orgntsrc", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORGNATYP", + "source_type": "SMALLINT", + "dest_name": "orgnatyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "QKOFSET", + "source_type": "SMALLINT", + "dest_name": "qkofset", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SERIES", + "source_type": "SMALLINT", + "dest_name": "series", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ORTRXTYP", + "source_type": "SMALLINT", + "dest_name": "ortrxtyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ORCTRNUM", + "source_type": "CHAR(21)", + "dest_name": "orctrnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORMSTRID", + "source_type": "CHAR(31)", + "dest_name": "ormstrid", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORMSTRNM", + "source_type": "CHAR(65)", + "dest_name": "ormstrnm", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORDOCNUM", + "source_type": "CHAR(21)", + "dest_name": "ordocnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORPSTDDT", + "source_type": "DATETIME", + "dest_name": "orpstddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ORTRXSRC", + "source_type": "CHAR(13)", + "dest_name": "ortrxsrc", + "dest_type": "text", + "description": null + }, + { + "source_name": "OrigDTASeries", + "source_type": "SMALLINT", + "dest_name": "origdtaseries", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "OrigSeqNum", + "source_type": "INT", + "dest_name": "origseqnum", + "dest_type": "integer", + "description": null + }, + { + "source_name": "SEQNUMBR", + "source_type": "INT", + "dest_name": "seqnumbr", + "dest_type": "integer", + "description": null + }, + { + "source_name": "DTA_GL_Status", + "source_type": "SMALLINT", + "dest_name": "dta_gl_status", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DTA_Index", + "source_type": "NUMERIC(19,5)", + "dest_name": "dta_index", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CURNCYID", + "source_type": "CHAR(15)", + "dest_name": "curncyid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CURRNIDX", + "source_type": "SMALLINT", + "dest_name": "currnidx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "RATETPID", + "source_type": "CHAR(15)", + "dest_name": "ratetpid", + "dest_type": "text", + "description": null + }, + { + "source_name": "EXGTBLID", + "source_type": "CHAR(15)", + "dest_name": "exgtblid", + "dest_type": "text", + "description": null + }, + { + "source_name": "XCHGRATE", + "source_type": "NUMERIC(19,7)", + "dest_name": "xchgrate", + "dest_type": "numeric(19,7)", + "description": null + }, + { + "source_name": "EXCHDATE", + "source_type": "DATETIME", + "dest_name": "exchdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "TIME1", + "source_type": "DATETIME", + "dest_name": "time1", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "RTCLCMTD", + "source_type": "SMALLINT", + "dest_name": "rtclcmtd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ICTRX", + "source_type": "TINYINT", + "dest_name": "ictrx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ORCOMID", + "source_type": "CHAR(5)", + "dest_name": "orcomid", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORIGINJE", + "source_type": "INT", + "dest_name": "originje", + "dest_type": "integer", + "description": null + }, + { + "source_name": "PERIODID", + "source_type": "SMALLINT", + "dest_name": "periodid", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEBITAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "debitamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CRDTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "crdtamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDBTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordbtamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORCRDAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orcrdamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DOCDATE", + "source_type": "DATETIME", + "dest_name": "docdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "PSTGNMBR", + "source_type": "INT", + "dest_name": "pstgnmbr", + "dest_type": "integer", + "description": null + }, + { + "source_name": "PPSGNMBR", + "source_type": "INT", + "dest_name": "ppsgnmbr", + "dest_type": "integer", + "description": null + }, + { + "source_name": "DENXRATE", + "source_type": "NUMERIC(19,7)", + "dest_name": "denxrate", + "dest_type": "numeric(19,7)", + "description": null + }, + { + "source_name": "MCTRXSTT", + "source_type": "SMALLINT", + "dest_name": "mctrxstt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CorrespondingUnit", + "source_type": "CHAR(5)", + "dest_name": "correspondingunit", + "dest_type": "text", + "description": null + }, + { + "source_name": "VOIDED", + "source_type": "TINYINT", + "dest_name": "voided", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Back_Out_JE", + "source_type": "INT", + "dest_name": "back_out_je", + "dest_type": "integer", + "description": null + }, + { + "source_name": "Back_Out_JE_Year", + "source_type": "SMALLINT", + "dest_name": "back_out_je_year", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Correcting_JE", + "source_type": "INT", + "dest_name": "correcting_je", + "dest_type": "integer", + "description": null + }, + { + "source_name": "Correcting_JE_Year", + "source_type": "SMALLINT", + "dest_name": "correcting_je_year", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Original_JE", + "source_type": "INT", + "dest_name": "original_je", + "dest_type": "integer", + "description": null + }, + { + "source_name": "Original_JE_Seq_Num", + "source_type": "NUMERIC(19,5)", + "dest_name": "original_je_seq_num", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "Original_JE_Year", + "source_type": "SMALLINT", + "dest_name": "original_je_year", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Ledger_ID", + "source_type": "SMALLINT", + "dest_name": "ledger_id", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Adjustment_Transaction", + "source_type": "TINYINT", + "dest_name": "adjustment_transaction", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "APRVLUSERID", + "source_type": "CHAR(15)", + "dest_name": "aprvluserid", + "dest_type": "text", + "description": null + }, + { + "source_name": "APPRVLDT", + "source_type": "DATETIME", + "dest_name": "apprvldt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [ + { + "name": "dex_row_id", + "connection": "usmidsap02", + "resolver_sql": "select max(dex_row_id) from gp.gl30000", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/gl30000.sql b/config/modules/gl30000.sql new file mode 100644 index 0000000..09a3657 --- /dev/null +++ b/config/modules/gl30000.sql @@ -0,0 +1,70 @@ +SELECT + [HSTYEAR] AS hstyear, + [JRNENTRY] AS jrnentry, + [RCTRXSEQ] AS rctrxseq, + RTRIM([SOURCDOC]) AS sourcdoc, + RTRIM([REFRENCE]) AS refrence, + RTRIM([DSCRIPTN]) AS dscriptn, + [TRXDATE] AS trxdate, + [ACTINDX] AS actindx, + RTRIM([TRXSORCE]) AS trxsorce, + [POLLDTRX] AS polldtrx, + RTRIM([LASTUSER]) AS lastuser, + [LSTDTEDT] AS lstdtedt, + RTRIM([USWHPSTD]) AS uswhpstd, + RTRIM([ORGNTSRC]) AS orgntsrc, + [ORGNATYP] AS orgnatyp, + [QKOFSET] AS qkofset, + [SERIES] AS series, + [ORTRXTYP] AS ortrxtyp, + RTRIM([ORCTRNUM]) AS orctrnum, + RTRIM([ORMSTRID]) AS ormstrid, + RTRIM([ORMSTRNM]) AS ormstrnm, + RTRIM([ORDOCNUM]) AS ordocnum, + [ORPSTDDT] AS orpstddt, + RTRIM([ORTRXSRC]) AS ortrxsrc, + [OrigDTASeries] AS origdtaseries, + [OrigSeqNum] AS origseqnum, + [SEQNUMBR] AS seqnumbr, + [DTA_GL_Status] AS dta_gl_status, + [DTA_Index] AS dta_index, + RTRIM([CURNCYID]) AS curncyid, + [CURRNIDX] AS currnidx, + RTRIM([RATETPID]) AS ratetpid, + RTRIM([EXGTBLID]) AS exgtblid, + [XCHGRATE] AS xchgrate, + [EXCHDATE] AS exchdate, + [TIME1] AS time1, + [RTCLCMTD] AS rtclcmtd, + [NOTEINDX] AS noteindx, + [ICTRX] AS ictrx, + RTRIM([ORCOMID]) AS orcomid, + [ORIGINJE] AS originje, + [PERIODID] AS periodid, + [DEBITAMT] AS debitamt, + [CRDTAMNT] AS crdtamnt, + [ORDBTAMT] AS ordbtamt, + [ORCRDAMT] AS orcrdamt, + [DOCDATE] AS docdate, + [PSTGNMBR] AS pstgnmbr, + [PPSGNMBR] AS ppsgnmbr, + [DENXRATE] AS denxrate, + [MCTRXSTT] AS mctrxstt, + RTRIM([CorrespondingUnit]) AS correspondingunit, + [VOIDED] AS voided, + [Back_Out_JE] AS back_out_je, + [Back_Out_JE_Year] AS back_out_je_year, + [Correcting_JE] AS correcting_je, + [Correcting_JE_Year] AS correcting_je_year, + [Original_JE] AS original_je, + [Original_JE_Seq_Num] AS original_je_seq_num, + [Original_JE_Year] AS original_je_year, + [Ledger_ID] AS ledger_id, + [Adjustment_Transaction] AS adjustment_transaction, + RTRIM([APRVLUSERID]) AS aprvluserid, + [APPRVLDT] AS apprvldt, + [DEX_ROW_TS] AS dex_row_ts, + [DEX_ROW_ID] AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[GL30000] +WHERE + [DEX_ROW_ID] >= {dex_row_id} diff --git a/config/modules/gldate.json b/config/modules/gldate.json new file mode 100644 index 0000000..49968c5 --- /dev/null +++ b/config/modules/gldate.json @@ -0,0 +1,351 @@ +{ + "name": "gldate", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.gldate", + "staging_table": "pipekit_staging.gldate", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "G/L Period End Dates 6.0", + "columns": [ + { + "source_name": "KPCOMP", + "source_type": "NUMERIC(2,0)", + "dest_name": "kpcomp", + "dest_type": "numeric(2,0)", + "description": "Company Number" + }, + { + "source_name": "KPCCYY", + "source_type": "NUMERIC(4,0)", + "dest_name": "kpccyy", + "dest_type": "numeric(4,0)", + "description": "Fiscal Year" + }, + { + "source_name": "KPMAXP", + "source_type": "NUMERIC(2,0)", + "dest_name": "kpmaxp", + "dest_type": "numeric(2,0)", + "description": "Periods /Year" + }, + { + "source_name": "KPSD01", + "source_type": "DATE", + "dest_name": "kpsd01", + "dest_type": "date", + "description": "Starting Date 01" + }, + { + "source_name": "KPED01", + "source_type": "DATE", + "dest_name": "kped01", + "dest_type": "date", + "description": "Ending Date 01" + }, + { + "source_name": "KPDY01", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy01", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD02", + "source_type": "DATE", + "dest_name": "kpsd02", + "dest_type": "date", + "description": "Starting Date 02" + }, + { + "source_name": "KPED02", + "source_type": "DATE", + "dest_name": "kped02", + "dest_type": "date", + "description": "Ending Date 02" + }, + { + "source_name": "KPDY02", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy02", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD03", + "source_type": "DATE", + "dest_name": "kpsd03", + "dest_type": "date", + "description": "Starting Date 03" + }, + { + "source_name": "KPED03", + "source_type": "DATE", + "dest_name": "kped03", + "dest_type": "date", + "description": "Ending Date 03" + }, + { + "source_name": "KPDY03", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy03", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD04", + "source_type": "DATE", + "dest_name": "kpsd04", + "dest_type": "date", + "description": "Starting Date 04" + }, + { + "source_name": "KPED04", + "source_type": "DATE", + "dest_name": "kped04", + "dest_type": "date", + "description": "Ending Date 04" + }, + { + "source_name": "KPDY04", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy04", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD05", + "source_type": "DATE", + "dest_name": "kpsd05", + "dest_type": "date", + "description": "Starting Date 05" + }, + { + "source_name": "KPED05", + "source_type": "DATE", + "dest_name": "kped05", + "dest_type": "date", + "description": "Ending Date 05" + }, + { + "source_name": "KPDY05", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy05", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD06", + "source_type": "DATE", + "dest_name": "kpsd06", + "dest_type": "date", + "description": "Starting Date 06" + }, + { + "source_name": "KPED06", + "source_type": "DATE", + "dest_name": "kped06", + "dest_type": "date", + "description": "Ending Date 06" + }, + { + "source_name": "KPDY06", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy06", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD07", + "source_type": "DATE", + "dest_name": "kpsd07", + "dest_type": "date", + "description": "Starting Date 07" + }, + { + "source_name": "KPED07", + "source_type": "DATE", + "dest_name": "kped07", + "dest_type": "date", + "description": "Ending Date 07" + }, + { + "source_name": "KPDY07", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy07", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD08", + "source_type": "DATE", + "dest_name": "kpsd08", + "dest_type": "date", + "description": "Starting Date 08" + }, + { + "source_name": "KPED08", + "source_type": "DATE", + "dest_name": "kped08", + "dest_type": "date", + "description": "Ending Date 08" + }, + { + "source_name": "KPDY08", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy08", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD09", + "source_type": "DATE", + "dest_name": "kpsd09", + "dest_type": "date", + "description": "Starting Date 09" + }, + { + "source_name": "KPED09", + "source_type": "DATE", + "dest_name": "kped09", + "dest_type": "date", + "description": "Ending Date 09" + }, + { + "source_name": "KPDY09", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy09", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD10", + "source_type": "DATE", + "dest_name": "kpsd10", + "dest_type": "date", + "description": "Starting Date 10" + }, + { + "source_name": "KPED10", + "source_type": "DATE", + "dest_name": "kped10", + "dest_type": "date", + "description": "Ending Date 10" + }, + { + "source_name": "KPDY10", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy10", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD11", + "source_type": "DATE", + "dest_name": "kpsd11", + "dest_type": "date", + "description": "Starting Date 11" + }, + { + "source_name": "KPED11", + "source_type": "DATE", + "dest_name": "kped11", + "dest_type": "date", + "description": "Ending Date 11" + }, + { + "source_name": "KPDY11", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy11", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD12", + "source_type": "DATE", + "dest_name": "kpsd12", + "dest_type": "date", + "description": "Starting Date 12" + }, + { + "source_name": "KPED12", + "source_type": "DATE", + "dest_name": "kped12", + "dest_type": "date", + "description": "Ending Date 12" + }, + { + "source_name": "KPDY12", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy12", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD13", + "source_type": "DATE", + "dest_name": "kpsd13", + "dest_type": "date", + "description": "Starting Date 13" + }, + { + "source_name": "KPED13", + "source_type": "DATE", + "dest_name": "kped13", + "dest_type": "date", + "description": "Ending Date 13" + }, + { + "source_name": "KPDY13", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy13", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD14", + "source_type": "DATE", + "dest_name": "kpsd14", + "dest_type": "date", + "description": "Starting Date 14" + }, + { + "source_name": "KPED14", + "source_type": "DATE", + "dest_name": "kped14", + "dest_type": "date", + "description": "Ending Date 14" + }, + { + "source_name": "KPDY14", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy14", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + }, + { + "source_name": "KPSD15", + "source_type": "DATE", + "dest_name": "kpsd15", + "dest_type": "date", + "description": "Starting Date 15" + }, + { + "source_name": "KPED15", + "source_type": "DATE", + "dest_name": "kped15", + "dest_type": "date", + "description": "Ending Date 15" + }, + { + "source_name": "KPDY15", + "source_type": "NUMERIC(3,0)", + "dest_name": "kpdy15", + "dest_type": "numeric(3,0)", + "description": "Days in Period" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/gldate.sql b/config/modules/gldate.sql new file mode 100644 index 0000000..fa8fc57 --- /dev/null +++ b/config/modules/gldate.sql @@ -0,0 +1,50 @@ +SELECT + KPCOMP AS kpcomp, + KPCCYY AS kpccyy, + KPMAXP AS kpmaxp, + CASE WHEN KPSD01 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD01 END AS kpsd01, + CASE WHEN KPED01 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED01 END AS kped01, + KPDY01 AS kpdy01, + CASE WHEN KPSD02 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD02 END AS kpsd02, + CASE WHEN KPED02 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED02 END AS kped02, + KPDY02 AS kpdy02, + CASE WHEN KPSD03 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD03 END AS kpsd03, + CASE WHEN KPED03 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED03 END AS kped03, + KPDY03 AS kpdy03, + CASE WHEN KPSD04 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD04 END AS kpsd04, + CASE WHEN KPED04 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED04 END AS kped04, + KPDY04 AS kpdy04, + CASE WHEN KPSD05 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD05 END AS kpsd05, + CASE WHEN KPED05 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED05 END AS kped05, + KPDY05 AS kpdy05, + CASE WHEN KPSD06 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD06 END AS kpsd06, + CASE WHEN KPED06 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED06 END AS kped06, + KPDY06 AS kpdy06, + CASE WHEN KPSD07 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD07 END AS kpsd07, + CASE WHEN KPED07 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED07 END AS kped07, + KPDY07 AS kpdy07, + CASE WHEN KPSD08 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD08 END AS kpsd08, + CASE WHEN KPED08 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED08 END AS kped08, + KPDY08 AS kpdy08, + CASE WHEN KPSD09 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD09 END AS kpsd09, + CASE WHEN KPED09 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED09 END AS kped09, + KPDY09 AS kpdy09, + CASE WHEN KPSD10 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD10 END AS kpsd10, + CASE WHEN KPED10 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED10 END AS kped10, + KPDY10 AS kpdy10, + CASE WHEN KPSD11 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD11 END AS kpsd11, + CASE WHEN KPED11 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED11 END AS kped11, + KPDY11 AS kpdy11, + CASE WHEN KPSD12 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD12 END AS kpsd12, + CASE WHEN KPED12 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED12 END AS kped12, + KPDY12 AS kpdy12, + CASE WHEN KPSD13 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD13 END AS kpsd13, + CASE WHEN KPED13 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED13 END AS kped13, + KPDY13 AS kpdy13, + CASE WHEN KPSD14 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD14 END AS kpsd14, + CASE WHEN KPED14 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED14 END AS kped14, + KPDY14 AS kpdy14, + CASE WHEN KPSD15 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPSD15 END AS kpsd15, + CASE WHEN KPED15 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE KPED15 END AS kped15, + KPDY15 AS kpdy15 +FROM LGDAT.GLDATE diff --git a/config/modules/gldatref.json b/config/modules/gldatref.json new file mode 100644 index 0000000..6104956 --- /dev/null +++ b/config/modules/gldatref.json @@ -0,0 +1,64 @@ +{ + "name": "gldatref", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.gldatref", + "staging_table": "pipekit_staging.gldatref", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "G/L Period Dates Reference File 6.0", + "columns": [ + { + "source_name": "N1COMP", + "source_type": "NUMERIC(2,0)", + "dest_name": "n1comp", + "dest_type": "numeric(2,0)", + "description": "Company Number" + }, + { + "source_name": "N1CCYY", + "source_type": "NUMERIC(4,0)", + "dest_name": "n1ccyy", + "dest_type": "numeric(4,0)", + "description": "Fiscal Year" + }, + { + "source_name": "N1FSPP", + "source_type": "NUMERIC(2,0)", + "dest_name": "n1fspp", + "dest_type": "numeric(2,0)", + "description": "Fiscal Period" + }, + { + "source_name": "N1FSYY", + "source_type": "NUMERIC(2,0)", + "dest_name": "n1fsyy", + "dest_type": "numeric(2,0)", + "description": "Fiscal Year" + }, + { + "source_name": "N1FSYP", + "source_type": "NUMERIC(4,0)", + "dest_name": "n1fsyp", + "dest_type": "numeric(4,0)", + "description": "Fiscal Year/Period" + }, + { + "source_name": "N1SD01", + "source_type": "DATE", + "dest_name": "n1sd01", + "dest_type": "date", + "description": "Starting Date" + }, + { + "source_name": "N1ED01", + "source_type": "DATE", + "dest_name": "n1ed01", + "dest_type": "date", + "description": "Ending Date" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/gldatref.sql b/config/modules/gldatref.sql new file mode 100644 index 0000000..2535436 --- /dev/null +++ b/config/modules/gldatref.sql @@ -0,0 +1,9 @@ +SELECT + N1COMP AS n1comp, + N1CCYY AS n1ccyy, + N1FSPP AS n1fspp, + N1FSYY AS n1fsyy, + N1FSYP AS n1fsyp, + CASE WHEN N1SD01 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE N1SD01 END AS n1sd01, + CASE WHEN N1ED01 IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE N1ED01 END AS n1ed01 +FROM LGDAT.GLDATREF diff --git a/config/modules/glmt.json b/config/modules/glmt.json new file mode 100644 index 0000000..f19327e --- /dev/null +++ b/config/modules/glmt.json @@ -0,0 +1,512 @@ +{ + "name": "glmt", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.glmt", + "staging_table": "pipekit_staging.glmt", + "merge_strategy": "incremental", + "merge_key": "aj4ccyy", + "enabled": 1, + "dest_description": "G/L Chart of Accounts totals for year 6.0", + "columns": [ + { + "source_name": "AJ4COMP", + "source_type": "NUMERIC(2,0)", + "dest_name": "aj4comp", + "dest_type": "numeric(2,0)", + "description": "Company Number" + }, + { + "source_name": "AJ4GL#1", + "source_type": "NUMERIC(4,0)", + "dest_name": "aj4gl#1", + "dest_type": "numeric(4,0)", + "description": "G/L Account#1" + }, + { + "source_name": "AJ4GL#2", + "source_type": "NUMERIC(6,0)", + "dest_name": "aj4gl#2", + "dest_type": "numeric(6,0)", + "description": "G/L Account#2" + }, + { + "source_name": "AJ4CCYY", + "source_type": "NUMERIC(4,0)", + "dest_name": "aj4ccyy", + "dest_type": "numeric(4,0)", + "description": "Fiscal Year CCYY" + }, + { + "source_name": "AJ4TMD", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tmd", + "dest_type": "numeric(14,2)", + "description": "This Month Debit" + }, + { + "source_name": "AJ4TMC", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tmc", + "dest_type": "numeric(14,2)", + "description": "This Month Credit" + }, + { + "source_name": "AJ4TT01", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt01", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 1)" + }, + { + "source_name": "AJ4TT02", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt02", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 2)" + }, + { + "source_name": "AJ4TT03", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt03", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 3)" + }, + { + "source_name": "AJ4TT04", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt04", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 4)" + }, + { + "source_name": "AJ4TT05", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt05", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 5)" + }, + { + "source_name": "AJ4TT06", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt06", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 6)" + }, + { + "source_name": "AJ4TT07", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt07", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 7)" + }, + { + "source_name": "AJ4TT08", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt08", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 8)" + }, + { + "source_name": "AJ4TT09", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt09", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 9)" + }, + { + "source_name": "AJ4TT10", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt10", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 10)" + }, + { + "source_name": "AJ4TT11", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt11", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 11)" + }, + { + "source_name": "AJ4TT12", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt12", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 12)" + }, + { + "source_name": "AJ4TT13", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt13", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 13)" + }, + { + "source_name": "AJ4TT14", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt14", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 14)" + }, + { + "source_name": "AJ4TT15", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4tt15", + "dest_type": "numeric(14,2)", + "description": "Actual Tran. This Year (Period 15)" + }, + { + "source_name": "AJ4OB01", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob01", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 1)" + }, + { + "source_name": "AJ4OB02", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob02", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 2)" + }, + { + "source_name": "AJ4OB03", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob03", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 3)" + }, + { + "source_name": "AJ4OB04", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob04", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 4)" + }, + { + "source_name": "AJ4OB05", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob05", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 5)" + }, + { + "source_name": "AJ4OB06", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob06", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 6)" + }, + { + "source_name": "AJ4OB07", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob07", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 7)" + }, + { + "source_name": "AJ4OB08", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob08", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 8)" + }, + { + "source_name": "AJ4OB09", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob09", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 9)" + }, + { + "source_name": "AJ4OB10", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob10", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 10)" + }, + { + "source_name": "AJ4OB11", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob11", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 11)" + }, + { + "source_name": "AJ4OB12", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob12", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 12)" + }, + { + "source_name": "AJ4OB13", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob13", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 13)" + }, + { + "source_name": "AJ4OB14", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob14", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 14)" + }, + { + "source_name": "AJ4OB15", + "source_type": "DECIMAL(14,2)", + "dest_name": "aj4ob15", + "dest_type": "numeric(14,2)", + "description": "Opening Balance (Period 15)" + }, + { + "source_name": "AJ4CB01", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb01", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 1)" + }, + { + "source_name": "AJ4CB02", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb02", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 2)" + }, + { + "source_name": "AJ4CB03", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb03", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 3)" + }, + { + "source_name": "AJ4CB04", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb04", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 4)" + }, + { + "source_name": "AJ4CB05", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb05", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 5)" + }, + { + "source_name": "AJ4CB06", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb06", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 6)" + }, + { + "source_name": "AJ4CB07", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb07", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 7)" + }, + { + "source_name": "AJ4CB08", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb08", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 8)" + }, + { + "source_name": "AJ4CB09", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb09", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 9)" + }, + { + "source_name": "AJ4CB10", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb10", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 10)" + }, + { + "source_name": "AJ4CB11", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb11", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 11)" + }, + { + "source_name": "AJ4CB12", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb12", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 12)" + }, + { + "source_name": "AJ4CB13", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb13", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 13)" + }, + { + "source_name": "AJ4CB14", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb14", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 14)" + }, + { + "source_name": "AJ4CB15", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4cb15", + "dest_type": "numeric(12,0)", + "description": "Current Budget (Period 15)" + }, + { + "source_name": "AJ4FPD1", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fpd1", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 1)" + }, + { + "source_name": "AJ4FPD2", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fpd2", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 2)" + }, + { + "source_name": "AJ4PER1", + "source_type": "NUMERIC(2,0)", + "dest_name": "aj4per1", + "dest_type": "numeric(2,0)", + "description": "Period 1" + }, + { + "source_name": "AJ4PER2", + "source_type": "NUMERIC(2,0)", + "dest_name": "aj4per2", + "dest_type": "numeric(2,0)", + "description": "Period 2" + }, + { + "source_name": "AJ4FR01", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr01", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 1)" + }, + { + "source_name": "AJ4FR02", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr02", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 2)" + }, + { + "source_name": "AJ4FR03", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr03", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 3)" + }, + { + "source_name": "AJ4FR04", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr04", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 4)" + }, + { + "source_name": "AJ4FR05", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr05", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 5)" + }, + { + "source_name": "AJ4FR06", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr06", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 6)" + }, + { + "source_name": "AJ4FR07", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr07", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 7)" + }, + { + "source_name": "AJ4FR08", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr08", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 8)" + }, + { + "source_name": "AJ4FR09", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr09", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 9)" + }, + { + "source_name": "AJ4FR0A", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr0a", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 10)" + }, + { + "source_name": "AJ4FR0B", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr0b", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 11)" + }, + { + "source_name": "AJ4FR0C", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr0c", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 12)" + }, + { + "source_name": "AJ4FR0D", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr0d", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 13)" + }, + { + "source_name": "AJ4FR0E", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr0e", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 14)" + }, + { + "source_name": "AJ4FR0F", + "source_type": "DECIMAL(12,0)", + "dest_name": "aj4fr0f", + "dest_type": "numeric(12,0)", + "description": "Forecast (Period 15)" + } + ], + "watermarks": [ + { + "name": "Fiscal", + "connection": "usmidsap02", + "resolver_sql": "SELECT '2027'", + "default_value": "None" + } + ], + "hooks": [] +} diff --git a/config/modules/glmt.sql b/config/modules/glmt.sql new file mode 100644 index 0000000..a1c54cb --- /dev/null +++ b/config/modules/glmt.sql @@ -0,0 +1,73 @@ +SELECT + AJ4COMP AS aj4comp, + "AJ4GL#1" AS "aj4gl#1", + "AJ4GL#2" AS "aj4gl#2", + AJ4CCYY AS aj4ccyy, + AJ4TMD AS aj4tmd, + AJ4TMC AS aj4tmc, + AJ4TT01 AS aj4tt01, + AJ4TT02 AS aj4tt02, + AJ4TT03 AS aj4tt03, + AJ4TT04 AS aj4tt04, + AJ4TT05 AS aj4tt05, + AJ4TT06 AS aj4tt06, + AJ4TT07 AS aj4tt07, + AJ4TT08 AS aj4tt08, + AJ4TT09 AS aj4tt09, + AJ4TT10 AS aj4tt10, + AJ4TT11 AS aj4tt11, + AJ4TT12 AS aj4tt12, + AJ4TT13 AS aj4tt13, + AJ4TT14 AS aj4tt14, + AJ4TT15 AS aj4tt15, + AJ4OB01 AS aj4ob01, + AJ4OB02 AS aj4ob02, + AJ4OB03 AS aj4ob03, + AJ4OB04 AS aj4ob04, + AJ4OB05 AS aj4ob05, + AJ4OB06 AS aj4ob06, + AJ4OB07 AS aj4ob07, + AJ4OB08 AS aj4ob08, + AJ4OB09 AS aj4ob09, + AJ4OB10 AS aj4ob10, + AJ4OB11 AS aj4ob11, + AJ4OB12 AS aj4ob12, + AJ4OB13 AS aj4ob13, + AJ4OB14 AS aj4ob14, + AJ4OB15 AS aj4ob15, + AJ4CB01 AS aj4cb01, + AJ4CB02 AS aj4cb02, + AJ4CB03 AS aj4cb03, + AJ4CB04 AS aj4cb04, + AJ4CB05 AS aj4cb05, + AJ4CB06 AS aj4cb06, + AJ4CB07 AS aj4cb07, + AJ4CB08 AS aj4cb08, + AJ4CB09 AS aj4cb09, + AJ4CB10 AS aj4cb10, + AJ4CB11 AS aj4cb11, + AJ4CB12 AS aj4cb12, + AJ4CB13 AS aj4cb13, + AJ4CB14 AS aj4cb14, + AJ4CB15 AS aj4cb15, + AJ4FPD1 AS aj4fpd1, + AJ4FPD2 AS aj4fpd2, + AJ4PER1 AS aj4per1, + AJ4PER2 AS aj4per2, + AJ4FR01 AS aj4fr01, + AJ4FR02 AS aj4fr02, + AJ4FR03 AS aj4fr03, + AJ4FR04 AS aj4fr04, + AJ4FR05 AS aj4fr05, + AJ4FR06 AS aj4fr06, + AJ4FR07 AS aj4fr07, + AJ4FR08 AS aj4fr08, + AJ4FR09 AS aj4fr09, + AJ4FR0A AS aj4fr0a, + AJ4FR0B AS aj4fr0b, + AJ4FR0C AS aj4fr0c, + AJ4FR0D AS aj4fr0d, + AJ4FR0E AS aj4fr0e, + AJ4FR0F AS aj4fr0f +FROM LGDAT.GLMT +WHERE AJ4CCYY >= '{Fiscal}' diff --git a/config/modules/gtran.json b/config/modules/gtran.json new file mode 100644 index 0000000..11d767a --- /dev/null +++ b/config/modules/gtran.json @@ -0,0 +1,645 @@ +{ + "name": "gtran", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.gtran", + "staging_table": "pipekit_staging.gtran", + "merge_strategy": "append", + "merge_key": null, + "enabled": 1, + "dest_description": "G/L Transactions 6.1", + "columns": [ + { + "source_name": "DKACC#", + "source_type": "NUMERIC(12,0)", + "dest_name": "dkacc#", + "dest_type": "numeric(12,0)", + "description": "G/L Account Number with Company" + }, + { + "source_name": "DKFSPR", + "source_type": "NUMERIC(2,0)", + "dest_name": "dkfspr", + "dest_type": "numeric(2,0)", + "description": "Fiscal Period" + }, + { + "source_name": "DKJRTP", + "source_type": "CHAR(1)", + "dest_name": "dkjrtp", + "dest_type": "text", + "description": "Journal Type" + }, + { + "source_name": "DKTDAT", + "source_type": "DATE", + "dest_name": "dktdat", + "dest_type": "date", + "description": "Transaction Date" + }, + { + "source_name": "DKSRCE", + "source_type": "CHAR(2)", + "dest_name": "dksrce", + "dest_type": "text", + "description": "Transaction Source" + }, + { + "source_name": "DKAMT", + "source_type": "NUMERIC(14,2)", + "dest_name": "dkamt", + "dest_type": "numeric(14,2)", + "description": "Transaction Amount" + }, + { + "source_name": "DKREF#", + "source_type": "CHAR(10)", + "dest_name": "dkref#", + "dest_type": "text", + "description": "Reference Number" + }, + { + "source_name": "DKREFD", + "source_type": "CHAR(30)", + "dest_name": "dkrefd", + "dest_type": "text", + "description": "Reference Description" + }, + { + "source_name": "DKADDD", + "source_type": "CHAR(30)", + "dest_name": "dkaddd", + "dest_type": "text", + "description": "Additional Description" + }, + { + "source_name": "DKREV", + "source_type": "CHAR(1)", + "dest_name": "dkrev", + "dest_type": "text", + "description": "Reversing Entry" + }, + { + "source_name": "DKREVS", + "source_type": "CHAR(1)", + "dest_name": "dkrevs", + "dest_type": "text", + "description": "Reversing Status" + }, + { + "source_name": "DKFSYR", + "source_type": "NUMERIC(2,0)", + "dest_name": "dkfsyr", + "dest_type": "numeric(2,0)", + "description": "Fiscal Century" + }, + { + "source_name": "DKFSYY", + "source_type": "NUMERIC(2,0)", + "dest_name": "dkfsyy", + "dest_type": "numeric(2,0)", + "description": "Fiscal Year YY" + }, + { + "source_name": "DKPOST", + "source_type": "CHAR(1)", + "dest_name": "dkpost", + "dest_type": "text", + "description": "Posted Entry Y/N" + }, + { + "source_name": "DKPDAT", + "source_type": "DATE", + "dest_name": "dkpdat", + "dest_type": "date", + "description": "Posted Date" + }, + { + "source_name": "DKBTC#", + "source_type": "NUMERIC(9,0)", + "dest_name": "dkbtc#", + "dest_type": "numeric(9,0)", + "description": "Batch Number" + }, + { + "source_name": "DKQUAL", + "source_type": "CHAR(2)", + "dest_name": "dkqual", + "dest_type": "text", + "description": "Key Qualifier" + }, + { + "source_name": "DKKEYN", + "source_type": "CHAR(20)", + "dest_name": "dkkeyn", + "dest_type": "text", + "description": "Source Key" + }, + { + "source_name": "DKPART", + "source_type": "CHAR(20)", + "dest_name": "dkpart", + "dest_type": "text", + "description": "Part Number" + }, + { + "source_name": "DKPJNM", + "source_type": "CHAR(20)", + "dest_name": "dkpjnm", + "dest_type": "text", + "description": "Project Number" + }, + { + "source_name": "DKQTY", + "source_type": "NUMERIC(15,5)", + "dest_name": "dkqty", + "dest_type": "numeric(15,5)", + "description": "Quantity" + }, + { + "source_name": "DKUNIT", + "source_type": "CHAR(3)", + "dest_name": "dkunit", + "dest_type": "text", + "description": "Unit of Measure" + }, + { + "source_name": "DKFUT1", + "source_type": "CHAR(1)", + "dest_name": "dkfut1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT2", + "source_type": "CHAR(1)", + "dest_name": "dkfut2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT3", + "source_type": "CHAR(1)", + "dest_name": "dkfut3", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT4", + "source_type": "CHAR(10)", + "dest_name": "dkfut4", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT5", + "source_type": "CHAR(10)", + "dest_name": "dkfut5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT6", + "source_type": "CHAR(20)", + "dest_name": "dkfut6", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT7", + "source_type": "NUMERIC(5,0)", + "dest_name": "dkfut7", + "dest_type": "numeric(5,0)", + "description": "Future Use" + }, + { + "source_name": "DKFUT8", + "source_type": "CHAR(3)", + "dest_name": "dkfut8", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT9", + "source_type": "CHAR(3)", + "dest_name": "dkfut9", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT10", + "source_type": "CHAR(5)", + "dest_name": "dkfut10", + "dest_type": "text", + "description": "Journal Line #" + }, + { + "source_name": "DKFUT11", + "source_type": "CHAR(5)", + "dest_name": "dkfut11", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT12", + "source_type": "CHAR(10)", + "dest_name": "dkfut12", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT13", + "source_type": "CHAR(10)", + "dest_name": "dkfut13", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT14", + "source_type": "NUMERIC(11,2)", + "dest_name": "dkfut14", + "dest_type": "numeric(11,2)", + "description": "Future Use" + }, + { + "source_name": "DKFUT15", + "source_type": "NUMERIC(11,2)", + "dest_name": "dkfut15", + "dest_type": "numeric(11,2)", + "description": "Future Use" + }, + { + "source_name": "DKFUT16", + "source_type": "NUMERIC(15,5)", + "dest_name": "dkfut16", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DKFUT17", + "source_type": "NUMERIC(15,5)", + "dest_name": "dkfut17", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DKFUT18", + "source_type": "CHAR(1)", + "dest_name": "dkfut18", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT19", + "source_type": "CHAR(1)", + "dest_name": "dkfut19", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT20", + "source_type": "CHAR(1)", + "dest_name": "dkfut20", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKEMCD", + "source_type": "CHAR(5)", + "dest_name": "dkemcd", + "dest_type": "text", + "description": "Employee Code" + }, + { + "source_name": "DKMINS", + "source_type": "CHAR(3)", + "dest_name": "dkmins", + "dest_type": "text", + "description": "Minor Sales Code" + }, + { + "source_name": "DKTERR", + "source_type": "CHAR(4)", + "dest_name": "dkterr", + "dest_type": "text", + "description": "Territory Code" + }, + { + "source_name": "DKORD#", + "source_type": "NUMERIC(9,0)", + "dest_name": "dkord#", + "dest_type": "numeric(9,0)", + "description": "Customer Order Number" + }, + { + "source_name": "DKBCUS", + "source_type": "CHAR(8)", + "dest_name": "dkbcus", + "dest_type": "text", + "description": "Bill-to Cust#" + }, + { + "source_name": "DKLABH", + "source_type": "NUMERIC(11,2)", + "dest_name": "dklabh", + "dest_type": "numeric(11,2)", + "description": "Labour Hours" + }, + { + "source_name": "DKCPYT", + "source_type": "CHAR(1)", + "dest_name": "dkcpyt", + "dest_type": "text", + "description": "was copied to another GTRAN" + }, + { + "source_name": "DKCPYF", + "source_type": "CHAR(1)", + "dest_name": "dkcpyf", + "dest_type": "text", + "description": "was copied from another GTRAN" + }, + { + "source_name": "DKCLSC", + "source_type": "CHAR(1)", + "dest_name": "dkclsc", + "dest_type": "text", + "description": "Class Code" + }, + { + "source_name": "DKCFAN", + "source_type": "NUMERIC(12,0)", + "dest_name": "dkcfan", + "dest_type": "numeric(12,0)", + "description": "Copied-from Company & Account #" + }, + { + "source_name": "DKJRNN", + "source_type": "NUMERIC(5,0)", + "dest_name": "dkjrnn", + "dest_type": "numeric(5,0)", + "description": "Journal Number" + }, + { + "source_name": "DKMJSC", + "source_type": "CHAR(3)", + "dest_name": "dkmjsc", + "dest_type": "text", + "description": "Major Sales Code" + }, + { + "source_name": "DKBCID", + "source_type": "NUMERIC(12,0)", + "dest_name": "dkbcid", + "dest_type": "numeric(12,0)", + "description": "Tracking ID" + }, + { + "source_name": "DKBSRF", + "source_type": "CHAR(1)", + "dest_name": "dkbsrf", + "dest_type": "text", + "description": "Reconciliation Status" + }, + { + "source_name": "DKRCID", + "source_type": "NUMERIC(12,0)", + "dest_name": "dkrcid", + "dest_type": "numeric(12,0)", + "description": "Record ID" + }, + { + "source_name": "DKTMS", + "source_type": "TIMESTMP", + "dest_name": "dktms", + "dest_type": "text", + "description": "Date/Time Stamp" + }, + { + "source_name": "DKVEND", + "source_type": "CHAR(10)", + "dest_name": "dkvend", + "dest_type": "text", + "description": "Vendor Code" + }, + { + "source_name": "DKADRN", + "source_type": "NUMERIC(8,0)", + "dest_name": "dkadrn", + "dest_type": "numeric(8,0)", + "description": "OneTime Vendor#" + }, + { + "source_name": "DKUSR", + "source_type": "CHAR(10)", + "dest_name": "dkusr", + "dest_type": "text", + "description": "User I.D." + }, + { + "source_name": "DKWTYET", + "source_type": "NUMERIC(9,0)", + "dest_name": "dkwtyet", + "dest_type": "numeric(9,0)", + "description": "AR Month-End WTYET Key" + }, + { + "source_name": "DKXRTE2", + "source_type": "NUMERIC(11,6)", + "dest_name": "dkxrte2", + "dest_type": "numeric(11,6)", + "description": "Exchange Rate 2" + }, + { + "source_name": "DKXRTE3", + "source_type": "NUMERIC(11,6)", + "dest_name": "dkxrte3", + "dest_type": "numeric(11,6)", + "description": "Exchange Rate 3" + }, + { + "source_name": "DKJECU", + "source_type": "CHAR(2)", + "dest_name": "dkjecu", + "dest_type": "text", + "description": "Entry Currency" + }, + { + "source_name": "DKILIN", + "source_type": "NUMERIC(3,0)", + "dest_name": "dkilin", + "dest_type": "numeric(3,0)", + "description": "Invoice Line" + }, + { + "source_name": "DKJREFC", + "source_type": "CHAR(20)", + "dest_name": "dkjrefc", + "dest_type": "text", + "description": "Journal Ref Code" + }, + { + "source_name": "DKDKENT", + "source_type": "CHAR(30)", + "dest_name": "dkdkent", + "dest_type": "text", + "description": "Doc Link Entry Numbers" + }, + { + "source_name": "DKARBTC", + "source_type": "NUMERIC(2,0)", + "dest_name": "dkarbtc", + "dest_type": "numeric(2,0)", + "description": "A/R Details Batch" + }, + { + "source_name": "DKDTLP", + "source_type": "CHAR(1)", + "dest_name": "dkdtlp", + "dest_type": "text", + "description": "Detail Posting" + }, + { + "source_name": "DKCFBR", + "source_type": "CHAR(1)", + "dest_name": "dkcfbr", + "dest_type": "text", + "description": "Created for Bank Stat Reconciliation" + }, + { + "source_name": "DKPBTID", + "source_type": "NUMERIC(9,0)", + "dest_name": "dkpbtid", + "dest_type": "numeric(9,0)", + "description": "RPRH Batch#" + }, + { + "source_name": "DKPBTID2", + "source_type": "NUMERIC(9,0)", + "dest_name": "dkpbtid2", + "dest_type": "numeric(9,0)", + "description": "PD829WH Batch#" + }, + { + "source_name": "DKLBTID", + "source_type": "NUMERIC(9,0)", + "dest_name": "dklbtid", + "dest_type": "numeric(9,0)", + "description": "PD439WH Batch#" + }, + { + "source_name": "DKLBTID2", + "source_type": "NUMERIC(9,0)", + "dest_name": "dklbtid2", + "dest_type": "numeric(9,0)", + "description": "LBRH Batch#" + }, + { + "source_name": "DKFUT21", + "source_type": "CHAR(1)", + "dest_name": "dkfut21", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT22", + "source_type": "CHAR(1)", + "dest_name": "dkfut22", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT23", + "source_type": "CHAR(10)", + "dest_name": "dkfut23", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT24", + "source_type": "CHAR(10)", + "dest_name": "dkfut24", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT25", + "source_type": "CHAR(10)", + "dest_name": "dkfut25", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT26", + "source_type": "CHAR(20)", + "dest_name": "dkfut26", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT27", + "source_type": "CHAR(20)", + "dest_name": "dkfut27", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT28", + "source_type": "CHAR(30)", + "dest_name": "dkfut28", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT29", + "source_type": "CHAR(30)", + "dest_name": "dkfut29", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DKFUT30", + "source_type": "NUMERIC(15,5)", + "dest_name": "dkfut30", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DKFUT31", + "source_type": "NUMERIC(15,5)", + "dest_name": "dkfut31", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DKFUT32", + "source_type": "NUMERIC(15,5)", + "dest_name": "dkfut32", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DKFUT33", + "source_type": "NUMERIC(15,5)", + "dest_name": "dkfut33", + "dest_type": "numeric(15,5)", + "description": "Future Use" + } + ], + "watermarks": [ + { + "name": "gtran_tms", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dktms), '1900-01-01 00:00:00.000000') FROM cms.gtran", + "default_value": "1900-01-01 00:00:00.000000" + } + ], + "hooks": [ + { + "run_order": 0, + "connection": "usmidsap02", + "sql": "-- GTRAN <-> GLMT reconciliation (reference only; hook output is not captured by pipekit).\n-- Per CLOSED account-period: SUM(cms.gtran.dkamt) should equal cms.glmt AJ4TT{period}.\n-- account = aj4comp*10^10 + aj4gl#1*10^6 + aj4gl#2 ; year = dkfsyr*100+dkfsyy ; period = dkfspr.\n-- Current (max) period excluded (in flux). Known residual: a few 2026 period-10 accounts (9352*) differ by small amounts.\nWITH gt AS (\n SELECT \"dkacc#\" acct, (dkfsyr*100+dkfsyy)::int yr, dkfspr::int period, SUM(dkamt) s\n FROM cms.gtran WHERE (dkfsyr*100+dkfsyy) BETWEEN 2000 AND 2030\n GROUP BY \"dkacc#\", (dkfsyr*100+dkfsyy)::int, dkfspr::int\n), gl AS (\n SELECT aj4comp*10000000000 + \"aj4gl#1\"*1000000 + \"aj4gl#2\" acct, aj4ccyy::int yr, v.period, v.net\n FROM cms.glmt CROSS JOIN LATERAL (VALUES\n (1,aj4tt01),(2,aj4tt02),(3,aj4tt03),(4,aj4tt04),(5,aj4tt05),(6,aj4tt06),(7,aj4tt07),(8,aj4tt08),\n (9,aj4tt09),(10,aj4tt10),(11,aj4tt11),(12,aj4tt12),(13,aj4tt13),(14,aj4tt14),(15,aj4tt15)) v(period,net)\n), recon AS (\n SELECT gt.acct, gt.yr, gt.period, gt.s gtran_sum, COALESCE(gl.net,0) glmt_net\n FROM gt LEFT JOIN gl ON gl.acct=gt.acct AND gl.yr=gt.yr AND gl.period=gt.period\n WHERE gt.yr*100+gt.period < (SELECT max(yr*100+period) FROM gt)\n AND abs(gt.s - COALESCE(gl.net,0)) > 0.005\n)\nSELECT\n (SELECT count(*) FROM gt WHERE yr*100+period < (SELECT max(yr*100+period) FROM gt)) AS closed_periods_checked,\n (SELECT count(*) FROM recon) AS mismatches,\n (SELECT COALESCE(sum(abs(gtran_sum-glmt_net)),0) FROM recon) AS total_abs_diff,\n (SELECT string_agg(acct::text||chr(47)||yr||chr(47)||period||' d='||round(gtran_sum-glmt_net,2)::text, '; ')\n FROM (SELECT * FROM recon ORDER BY abs(gtran_sum-glmt_net) DESC LIMIT 5) z) AS worst", + "run_on": "success" + } + ] +} diff --git a/config/modules/gtran.sql b/config/modules/gtran.sql new file mode 100644 index 0000000..a399128 --- /dev/null +++ b/config/modules/gtran.sql @@ -0,0 +1,91 @@ +SELECT + "DKACC#" AS "dkacc#", + DKFSPR AS dkfspr, + RTRIM(DKJRTP) AS dkjrtp, + CASE WHEN DKTDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DKTDAT END AS dktdat, + RTRIM(DKSRCE) AS dksrce, + DKAMT AS dkamt, + RTRIM("DKREF#") AS "dkref#", + RTRIM(DKREFD) AS dkrefd, + RTRIM(DKADDD) AS dkaddd, + RTRIM(DKREV) AS dkrev, + RTRIM(DKREVS) AS dkrevs, + DKFSYR AS dkfsyr, + DKFSYY AS dkfsyy, + RTRIM(DKPOST) AS dkpost, + CASE WHEN DKPDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DKPDAT END AS dkpdat, + "DKBTC#" AS "dkbtc#", + RTRIM(DKQUAL) AS dkqual, + RTRIM(DKKEYN) AS dkkeyn, + RTRIM(DKPART) AS dkpart, + RTRIM(DKPJNM) AS dkpjnm, + DKQTY AS dkqty, + RTRIM(DKUNIT) AS dkunit, + RTRIM(DKFUT1) AS dkfut1, + RTRIM(DKFUT2) AS dkfut2, + RTRIM(DKFUT3) AS dkfut3, + RTRIM(DKFUT4) AS dkfut4, + RTRIM(DKFUT5) AS dkfut5, + RTRIM(DKFUT6) AS dkfut6, + DKFUT7 AS dkfut7, + RTRIM(DKFUT8) AS dkfut8, + RTRIM(DKFUT9) AS dkfut9, + RTRIM(DKFUT10) AS dkfut10, + RTRIM(DKFUT11) AS dkfut11, + RTRIM(DKFUT12) AS dkfut12, + RTRIM(DKFUT13) AS dkfut13, + DKFUT14 AS dkfut14, + DKFUT15 AS dkfut15, + DKFUT16 AS dkfut16, + DKFUT17 AS dkfut17, + RTRIM(DKFUT18) AS dkfut18, + RTRIM(DKFUT19) AS dkfut19, + RTRIM(DKFUT20) AS dkfut20, + RTRIM(DKEMCD) AS dkemcd, + RTRIM(DKMINS) AS dkmins, + RTRIM(DKTERR) AS dkterr, + "DKORD#" AS "dkord#", + RTRIM(DKBCUS) AS dkbcus, + DKLABH AS dklabh, + RTRIM(DKCPYT) AS dkcpyt, + RTRIM(DKCPYF) AS dkcpyf, + RTRIM(DKCLSC) AS dkclsc, + DKCFAN AS dkcfan, + DKJRNN AS dkjrnn, + RTRIM(DKMJSC) AS dkmjsc, + DKBCID AS dkbcid, + RTRIM(DKBSRF) AS dkbsrf, + DKRCID AS dkrcid, + DKTMS AS dktms, + RTRIM(DKVEND) AS dkvend, + DKADRN AS dkadrn, + RTRIM(DKUSR) AS dkusr, + DKWTYET AS dkwtyet, + DKXRTE2 AS dkxrte2, + DKXRTE3 AS dkxrte3, + RTRIM(DKJECU) AS dkjecu, + DKILIN AS dkilin, + RTRIM(DKJREFC) AS dkjrefc, + RTRIM(DKDKENT) AS dkdkent, + DKARBTC AS dkarbtc, + RTRIM(DKDTLP) AS dkdtlp, + RTRIM(DKCFBR) AS dkcfbr, + DKPBTID AS dkpbtid, + DKPBTID2 AS dkpbtid2, + DKLBTID AS dklbtid, + DKLBTID2 AS dklbtid2, + RTRIM(DKFUT21) AS dkfut21, + RTRIM(DKFUT22) AS dkfut22, + RTRIM(DKFUT23) AS dkfut23, + RTRIM(DKFUT24) AS dkfut24, + RTRIM(DKFUT25) AS dkfut25, + RTRIM(DKFUT26) AS dkfut26, + RTRIM(DKFUT27) AS dkfut27, + RTRIM(DKFUT28) AS dkfut28, + RTRIM(DKFUT29) AS dkfut29, + DKFUT30 AS dkfut30, + DKFUT31 AS dkfut31, + DKFUT32 AS dkfut32, + DKFUT33 AS dkfut33 +FROM LGDAT.GTRAN +WHERE DKTMS > '{gtran_tms}' diff --git a/config/modules/itemm.json b/config/modules/itemm.json new file mode 100644 index 0000000..ec432c6 --- /dev/null +++ b/config/modules/itemm.json @@ -0,0 +1,421 @@ +{ + "name": "itemm", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.itemm", + "staging_table": "pipekit_staging.itemm", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "ITEMM", + "columns": [ + { + "source_name": "ITEM", + "source_type": "CHAR(20)", + "dest_name": "item", + "dest_type": "text", + "description": "Part Number" + }, + { + "source_name": "DESCR", + "source_type": "CHAR(30)", + "dest_name": "descr", + "dest_type": "text", + "description": "Part Desc 1" + }, + { + "source_name": "DESCR2", + "source_type": "CHAR(30)", + "dest_name": "descr2", + "dest_type": "text", + "description": "Part Desc 2" + }, + { + "source_name": "DESCR3", + "source_type": "CHAR(30)", + "dest_name": "descr3", + "dest_type": "text", + "description": "Part Desc 3" + }, + { + "source_name": "GLEC", + "source_type": "CHAR(3)", + "dest_name": "glec", + "dest_type": "text", + "description": "G_l Expense Code" + }, + { + "source_name": "STLC", + "source_type": "CHAR(20)", + "dest_name": "stlc", + "dest_type": "text", + "description": "Style Code" + }, + { + "source_name": "STLCD", + "source_type": "CHAR(30)", + "dest_name": "stlcd", + "dest_type": "text", + "description": "Style Code Desc" + }, + { + "source_name": "P93", + "source_type": "CHAR(3)", + "dest_name": "p93", + "dest_type": "text", + "description": "P93" + }, + { + "source_name": "COLC", + "source_type": "CHAR(20)", + "dest_name": "colc", + "dest_type": "text", + "description": "Color Code" + }, + { + "source_name": "COLCD", + "source_type": "CHAR(20)", + "dest_name": "colcd", + "dest_type": "text", + "description": "Colcd" + }, + { + "source_name": "COLGRP", + "source_type": "CHAR(1)", + "dest_name": "colgrp", + "dest_type": "text", + "description": "Colgrp" + }, + { + "source_name": "COLTIER", + "source_type": "CHAR(1)", + "dest_name": "coltier", + "dest_type": "text", + "description": "Coltier" + }, + { + "source_name": "COLTIERD", + "source_type": "CHAR(30)", + "dest_name": "coltierd", + "dest_type": "text", + "description": "Coltierd" + }, + { + "source_name": "COLSTAT", + "source_type": "CHAR(1)", + "dest_name": "colstat", + "dest_type": "text", + "description": "Colstat" + }, + { + "source_name": "SIZC", + "source_type": "CHAR(20)", + "dest_name": "sizc", + "dest_type": "text", + "description": "Size Code" + }, + { + "source_name": "PACKAGE", + "source_type": "CHAR(30)", + "dest_name": "package", + "dest_type": "text", + "description": "Package" + }, + { + "source_name": "KIT", + "source_type": "CHAR(30)", + "dest_name": "kit", + "dest_type": "text", + "description": "Kit" + }, + { + "source_name": "BRANDING", + "source_type": "CHAR(30)", + "dest_name": "branding", + "dest_type": "text", + "description": "Branding" + }, + { + "source_name": "SUFFIX", + "source_type": "CHAR(4)", + "dest_name": "suffix", + "dest_type": "text", + "description": "Suffix" + }, + { + "source_name": "SUFFIXD", + "source_type": "CHAR(50)", + "dest_name": "suffixd", + "dest_type": "text", + "description": "Suffixd" + }, + { + "source_name": "ACCS", + "source_type": "CHAR(50)", + "dest_name": "accs", + "dest_type": "text", + "description": "Accs" + }, + { + "source_name": "ACCS_PS", + "source_type": "CHAR(3)", + "dest_name": "accs_ps", + "dest_type": "text", + "description": "Accs_ps" + }, + { + "source_name": "ACC_LIST", + "source_type": "CHAR(270)", + "dest_name": "acc_list", + "dest_type": "text", + "description": "Acc_list" + }, + { + "source_name": "CATA", + "source_type": "CHAR(25)", + "dest_name": "cata", + "dest_type": "text", + "description": "Catalog Id" + }, + { + "source_name": "CLSS", + "source_type": "CHAR(3)", + "dest_name": "clss", + "dest_type": "text", + "description": "Inventory Class Code" + }, + { + "source_name": "ASSC", + "source_type": "CHAR(10)", + "dest_name": "assc", + "dest_type": "text", + "description": "Assembly Code" + }, + { + "source_name": "SASC", + "source_type": "CHAR(10)", + "dest_name": "sasc", + "dest_type": "text", + "description": "Subassembly Code" + }, + { + "source_name": "BRAND", + "source_type": "CHAR(1)", + "dest_name": "brand", + "dest_type": "text", + "description": "Brand" + }, + { + "source_name": "DPLT", + "source_type": "CHAR(3)", + "dest_name": "dplt", + "dest_type": "text", + "description": "Default Plant Code" + }, + { + "source_name": "HARM", + "source_type": "CHAR(13)", + "dest_name": "harm", + "dest_type": "text", + "description": "Harmonization _" + }, + { + "source_name": "UOMP", + "source_type": "CHAR(21)", + "dest_name": "uomp", + "dest_type": "text", + "description": "Uomp" + }, + { + "source_name": "UNTI", + "source_type": "CHAR(3)", + "dest_name": "unti", + "dest_type": "text", + "description": "Dft Unit of Issue" + }, + { + "source_name": "NWHT", + "source_type": "DECIMAL(11,5)", + "dest_name": "nwht", + "dest_type": "numeric(11,5)", + "description": "Net Weight" + }, + { + "source_name": "NWUN", + "source_type": "CHAR(3)", + "dest_name": "nwun", + "dest_type": "text", + "description": "Net Weight Unit" + }, + { + "source_name": "TYPE", + "source_type": "CHAR(1)", + "dest_name": "type", + "dest_type": "text", + "description": "Stock Type" + }, + { + "source_name": "MAJG", + "source_type": "CHAR(3)", + "dest_name": "majg", + "dest_type": "text", + "description": "Major Group" + }, + { + "source_name": "MAJGD", + "source_type": "CHAR(30)", + "dest_name": "majgd", + "dest_type": "text", + "description": "Majgd" + }, + { + "source_name": "MING", + "source_type": "CHAR(3)", + "dest_name": "ming", + "dest_type": "text", + "description": "Minor Group" + }, + { + "source_name": "MINGD", + "source_type": "CHAR(18)", + "dest_name": "mingd", + "dest_type": "text", + "description": "Mingd" + }, + { + "source_name": "MAJS", + "source_type": "CHAR(3)", + "dest_name": "majs", + "dest_type": "text", + "description": "Major Sales Code" + }, + { + "source_name": "MAJSD", + "source_type": "CHAR(30)", + "dest_name": "majsd", + "dest_type": "text", + "description": "Majsd" + }, + { + "source_name": "MINS", + "source_type": "CHAR(3)", + "dest_name": "mins", + "dest_type": "text", + "description": "Minor Sales Code" + }, + { + "source_name": "MINSD", + "source_type": "CHAR(30)", + "dest_name": "minsd", + "dest_type": "text", + "description": "Minsd" + }, + { + "source_name": "GLCD", + "source_type": "CHAR(3)", + "dest_name": "glcd", + "dest_type": "text", + "description": "G_l Distribution Code" + }, + { + "source_name": "GLDCD", + "source_type": "CHAR(30)", + "dest_name": "gldcd", + "dest_type": "text", + "description": "Gldcd" + }, + { + "source_name": "MINO", + "source_type": "DECIMAL(9,0)", + "dest_name": "mino", + "dest_type": "numeric(9,0)", + "description": "Mino" + }, + { + "source_name": "APLNT", + "source_type": "CHAR(21)", + "dest_name": "aplnt", + "dest_type": "text", + "description": "Aplnt" + }, + { + "source_name": "IREAS", + "source_type": "CHAR(200)", + "dest_name": "ireas", + "dest_type": "text", + "description": "Ireas" + }, + { + "source_name": "PARTGROUP", + "source_type": "CHAR(10)", + "dest_name": "partgroup", + "dest_type": "text", + "description": "Part Group" + }, + { + "source_name": "PARTGROUPD", + "source_type": "CHAR(60)", + "dest_name": "partgroupd", + "dest_type": "text", + "description": "Part Group Desc" + }, + { + "source_name": "PRICEGROUP", + "source_type": "CHAR(50)", + "dest_name": "pricegroup", + "dest_type": "text", + "description": "Price Group" + }, + { + "source_name": "V1DS", + "source_type": "CHAR(50)", + "dest_name": "v1ds", + "dest_type": "text", + "description": "Ver 1 Data Segment" + }, + { + "source_name": "MPCK", + "source_type": "DECIMAL(15,5)", + "dest_name": "mpck", + "dest_type": "numeric(15,5)", + "description": "Master Pack" + }, + { + "source_name": "CURSTD", + "source_type": "DECIMAL(13,5)", + "dest_name": "curstd", + "dest_type": "numeric(13,5)", + "description": "Current STD" + }, + { + "source_name": "CURSTDUS", + "source_type": "DECIMAL(13,5)", + "dest_name": "curstdus", + "dest_type": "numeric(13,5)", + "description": "Current STD US" + }, + { + "source_name": "FUTSTD", + "source_type": "DECIMAL(13,5)", + "dest_name": "futstd", + "dest_type": "numeric(13,5)", + "description": "Future STD" + }, + { + "source_name": "FUTSTDUS", + "source_type": "DECIMAL(13,5)", + "dest_name": "futstdus", + "dest_type": "numeric(13,5)", + "description": "Future STD US" + }, + { + "source_name": "PRODGROUP", + "source_type": "CHAR(10)", + "dest_name": "prodgroup", + "dest_type": "text", + "description": "Product Group" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/itemm.sql b/config/modules/itemm.sql new file mode 100644 index 0000000..2b9cf88 --- /dev/null +++ b/config/modules/itemm.sql @@ -0,0 +1,60 @@ +SELECT + RTRIM(ITEM) AS item, + RTRIM(DESCR) AS descr, + RTRIM(DESCR2) AS descr2, + RTRIM(DESCR3) AS descr3, + RTRIM(GLEC) AS glec, + RTRIM(STLC) AS stlc, + RTRIM(STLCD) AS stlcd, + RTRIM(P93) AS p93, + RTRIM(COLC) AS colc, + RTRIM(COLCD) AS colcd, + RTRIM(COLGRP) AS colgrp, + RTRIM(COLTIER) AS coltier, + RTRIM(COLTIERD) AS coltierd, + RTRIM(COLSTAT) AS colstat, + RTRIM(SIZC) AS sizc, + RTRIM(PACKAGE) AS package, + RTRIM(KIT) AS kit, + RTRIM(BRANDING) AS branding, + RTRIM(SUFFIX) AS suffix, + RTRIM(SUFFIXD) AS suffixd, + RTRIM(ACCS) AS accs, + RTRIM(ACCS_PS) AS accs_ps, + RTRIM(ACC_LIST) AS acc_list, + RTRIM(CATA) AS cata, + RTRIM(CLSS) AS clss, + RTRIM(ASSC) AS assc, + RTRIM(SASC) AS sasc, + RTRIM(BRAND) AS brand, + RTRIM(DPLT) AS dplt, + RTRIM(HARM) AS harm, + RTRIM(UOMP) AS uomp, + RTRIM(UNTI) AS unti, + NWHT AS nwht, + RTRIM(NWUN) AS nwun, + RTRIM(TYPE) AS type, + RTRIM(MAJG) AS majg, + RTRIM(MAJGD) AS majgd, + RTRIM(MING) AS ming, + RTRIM(MINGD) AS mingd, + RTRIM(MAJS) AS majs, + RTRIM(MAJSD) AS majsd, + RTRIM(MINS) AS mins, + RTRIM(MINSD) AS minsd, + RTRIM(GLCD) AS glcd, + RTRIM(GLDCD) AS gldcd, + MINO AS mino, + RTRIM(APLNT) AS aplnt, + RTRIM(IREAS) AS ireas, + RTRIM(PARTGROUP) AS partgroup, + RTRIM(PARTGROUPD) AS partgroupd, + RTRIM(PRICEGROUP) AS pricegroup, + RTRIM(V1DS) AS v1ds, + MPCK AS mpck, + CURSTD AS curstd, + CURSTDUS AS curstdus, + FUTSTD AS futstd, + FUTSTDUS AS futstdus, + RTRIM(PRODGROUP) AS prodgroup +FROM "CMS.CUSLG".ITEMM diff --git a/config/modules/iv00101.json b/config/modules/iv00101.json new file mode 100644 index 0000000..bd9337e --- /dev/null +++ b/config/modules/iv00101.json @@ -0,0 +1,638 @@ +{ + "name": "iv00101", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.iv00101", + "staging_table": "pipekit_staging.iv00101", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "GP customer/salesperson/item master (broadened, migrated from /opt/sync 2026-07-21)", + "columns": [ + { + "source_name": "ITEMNMBR", + "source_type": "CHAR(31)", + "dest_name": "itemnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "ITEMDESC", + "source_type": "CHAR(101)", + "dest_name": "itemdesc", + "dest_type": "text", + "description": null + }, + { + "source_name": "ITMSHNAM", + "source_type": "CHAR(15)", + "dest_name": "itmshnam", + "dest_type": "text", + "description": null + }, + { + "source_name": "ITMCLSCD", + "source_type": "CHAR(11)", + "dest_name": "itmclscd", + "dest_type": "text", + "description": null + }, + { + "source_name": "UOMSCHDL", + "source_type": "CHAR(11)", + "dest_name": "uomschdl", + "dest_type": "text", + "description": null + }, + { + "source_name": "CURRCOST", + "source_type": "NUMERIC(19,5)", + "dest_name": "currcost", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "STNDCOST", + "source_type": "NUMERIC(19,5)", + "dest_name": "stndcost", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "ITEMTYPE", + "source_type": "SMALLINT", + "dest_name": "itemtype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ITMGEDSC", + "source_type": "CHAR(11)", + "dest_name": "itmgedsc", + "dest_type": "text", + "description": null + }, + { + "source_name": "ITEMSHWT", + "source_type": "INT", + "dest_name": "itemshwt", + "dest_type": "integer", + "description": null + }, + { + "source_name": "DECPLQTY", + "source_type": "SMALLINT", + "dest_name": "decplqty", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DECPLCUR", + "source_type": "SMALLINT", + "dest_name": "decplcur", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ITMTSHID", + "source_type": "CHAR(15)", + "dest_name": "itmtshid", + "dest_type": "text", + "description": null + }, + { + "source_name": "TAXOPTNS", + "source_type": "SMALLINT", + "dest_name": "taxoptns", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "IVIVINDX", + "source_type": "INT", + "dest_name": "ivivindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVIVOFIX", + "source_type": "INT", + "dest_name": "ivivofix", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVCOGSIX", + "source_type": "INT", + "dest_name": "ivcogsix", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVSLSIDX", + "source_type": "INT", + "dest_name": "ivslsidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVSLDSIX", + "source_type": "INT", + "dest_name": "ivsldsix", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVSLRNIX", + "source_type": "INT", + "dest_name": "ivslrnix", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVINUSIX", + "source_type": "INT", + "dest_name": "ivinusix", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVINSVIX", + "source_type": "INT", + "dest_name": "ivinsvix", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVDMGIDX", + "source_type": "INT", + "dest_name": "ivdmgidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVVARIDX", + "source_type": "INT", + "dest_name": "ivvaridx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "DPSHPIDX", + "source_type": "INT", + "dest_name": "dpshpidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "PURPVIDX", + "source_type": "INT", + "dest_name": "purpvidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "UPPVIDX", + "source_type": "INT", + "dest_name": "uppvidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVRETIDX", + "source_type": "INT", + "dest_name": "ivretidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ASMVRIDX", + "source_type": "INT", + "dest_name": "asmvridx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ITMTRKOP", + "source_type": "SMALLINT", + "dest_name": "itmtrkop", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "LOTTYPE", + "source_type": "CHAR(11)", + "dest_name": "lottype", + "dest_type": "text", + "description": null + }, + { + "source_name": "KPERHIST", + "source_type": "TINYINT", + "dest_name": "kperhist", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "KPTRXHST", + "source_type": "TINYINT", + "dest_name": "kptrxhst", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "KPCALHST", + "source_type": "TINYINT", + "dest_name": "kpcalhst", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "KPDSTHST", + "source_type": "TINYINT", + "dest_name": "kpdsthst", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ALWBKORD", + "source_type": "TINYINT", + "dest_name": "alwbkord", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "VCTNMTHD", + "source_type": "SMALLINT", + "dest_name": "vctnmthd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ALTITEM1", + "source_type": "CHAR(31)", + "dest_name": "altitem1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ALTITEM2", + "source_type": "CHAR(31)", + "dest_name": "altitem2", + "dest_type": "text", + "description": null + }, + { + "source_name": "USCATVLS_1", + "source_type": "CHAR(11)", + "dest_name": "uscatvls_1", + "dest_type": "text", + "description": null + }, + { + "source_name": "USCATVLS_2", + "source_type": "CHAR(11)", + "dest_name": "uscatvls_2", + "dest_type": "text", + "description": null + }, + { + "source_name": "USCATVLS_3", + "source_type": "CHAR(11)", + "dest_name": "uscatvls_3", + "dest_type": "text", + "description": null + }, + { + "source_name": "USCATVLS_4", + "source_type": "CHAR(11)", + "dest_name": "uscatvls_4", + "dest_type": "text", + "description": null + }, + { + "source_name": "USCATVLS_5", + "source_type": "CHAR(11)", + "dest_name": "uscatvls_5", + "dest_type": "text", + "description": null + }, + { + "source_name": "USCATVLS_6", + "source_type": "CHAR(11)", + "dest_name": "uscatvls_6", + "dest_type": "text", + "description": null + }, + { + "source_name": "MSTRCDTY", + "source_type": "SMALLINT", + "dest_name": "mstrcdty", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MODIFDT", + "source_type": "DATETIME", + "dest_name": "modifdt", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "CREATDDT", + "source_type": "DATETIME", + "dest_name": "creatddt", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "WRNTYDYS", + "source_type": "SMALLINT", + "dest_name": "wrntydys", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PRCLEVEL", + "source_type": "CHAR(11)", + "dest_name": "prclevel", + "dest_type": "text", + "description": null + }, + { + "source_name": "LOCNCODE", + "source_type": "CHAR(11)", + "dest_name": "locncode", + "dest_type": "text", + "description": null + }, + { + "source_name": "PINFLIDX", + "source_type": "INT", + "dest_name": "pinflidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "PURMCIDX", + "source_type": "INT", + "dest_name": "purmcidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVINFIDX", + "source_type": "INT", + "dest_name": "ivinfidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "INVMCIDX", + "source_type": "INT", + "dest_name": "invmcidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "CGSINFLX", + "source_type": "INT", + "dest_name": "cgsinflx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "CGSMCIDX", + "source_type": "INT", + "dest_name": "cgsmcidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ITEMCODE", + "source_type": "CHAR(15)", + "dest_name": "itemcode", + "dest_type": "text", + "description": null + }, + { + "source_name": "TCC", + "source_type": "CHAR(31)", + "dest_name": "tcc", + "dest_type": "text", + "description": null + }, + { + "source_name": "PriceGroup", + "source_type": "CHAR(11)", + "dest_name": "pricegroup", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRICMTHD", + "source_type": "SMALLINT", + "dest_name": "pricmthd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PRCHSUOM", + "source_type": "CHAR(9)", + "dest_name": "prchsuom", + "dest_type": "text", + "description": null + }, + { + "source_name": "SELNGUOM", + "source_type": "CHAR(9)", + "dest_name": "selnguom", + "dest_type": "text", + "description": null + }, + { + "source_name": "KTACCTSR", + "source_type": "SMALLINT", + "dest_name": "ktacctsr", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "LASTGENSN", + "source_type": "CHAR(21)", + "dest_name": "lastgensn", + "dest_type": "text", + "description": null + }, + { + "source_name": "ABCCODE", + "source_type": "SMALLINT", + "dest_name": "abccode", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Revalue_Inventory", + "source_type": "TINYINT", + "dest_name": "revalue_inventory", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Tolerance_Percentage", + "source_type": "INT", + "dest_name": "tolerance_percentage", + "dest_type": "integer", + "description": null + }, + { + "source_name": "Purchase_Item_Tax_Schedu", + "source_type": "CHAR(15)", + "dest_name": "purchase_item_tax_schedu", + "dest_type": "text", + "description": null + }, + { + "source_name": "Purchase_Tax_Options", + "source_type": "SMALLINT", + "dest_name": "purchase_tax_options", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ITMPLNNNGTYP", + "source_type": "SMALLINT", + "dest_name": "itmplnnngtyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "STTSTCLVLPRCNTG", + "source_type": "SMALLINT", + "dest_name": "sttstclvlprcntg", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CNTRYORGN", + "source_type": "CHAR(7)", + "dest_name": "cntryorgn", + "dest_type": "text", + "description": null + }, + { + "source_name": "INACTIVE", + "source_type": "TINYINT", + "dest_name": "inactive", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MINSHELF1", + "source_type": "SMALLINT", + "dest_name": "minshelf1", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MINSHELF2", + "source_type": "SMALLINT", + "dest_name": "minshelf2", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INCLUDEINDP", + "source_type": "TINYINT", + "dest_name": "includeindp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "LOTEXPWARN", + "source_type": "TINYINT", + "dest_name": "lotexpwarn", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "LOTEXPWARNDAYS", + "source_type": "SMALLINT", + "dest_name": "lotexpwarndays", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "LASTGENLOT", + "source_type": "CHAR(21)", + "dest_name": "lastgenlot", + "dest_type": "text", + "description": null + }, + { + "source_name": "Lot_Split_Quantity", + "source_type": "NUMERIC(19,5)", + "dest_name": "lot_split_quantity", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "UseQtyOverageTolerance", + "source_type": "TINYINT", + "dest_name": "useqtyoveragetolerance", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "UseQtyShortageTolerance", + "source_type": "TINYINT", + "dest_name": "useqtyshortagetolerance", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "QtyOverTolerancePercent", + "source_type": "INT", + "dest_name": "qtyovertolerancepercent", + "dest_type": "integer", + "description": null + }, + { + "source_name": "QtyShortTolerancePercent", + "source_type": "INT", + "dest_name": "qtyshorttolerancepercent", + "dest_type": "integer", + "description": null + }, + { + "source_name": "IVSCRVIX", + "source_type": "INT", + "dest_name": "ivscrvix", + "dest_type": "integer", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/iv00101.sql b/config/modules/iv00101.sql new file mode 100644 index 0000000..61c0eb5 --- /dev/null +++ b/config/modules/iv00101.sql @@ -0,0 +1,91 @@ +SELECT + RTRIM([ITEMNMBR]) AS itemnmbr, + RTRIM([ITEMDESC]) AS itemdesc, + RTRIM([ITMSHNAM]) AS itmshnam, + RTRIM([ITMCLSCD]) AS itmclscd, + RTRIM([UOMSCHDL]) AS uomschdl, + [CURRCOST] AS currcost, + [STNDCOST] AS stndcost, + [NOTEINDX] AS noteindx, + [ITEMTYPE] AS itemtype, + RTRIM([ITMGEDSC]) AS itmgedsc, + [ITEMSHWT] AS itemshwt, + [DECPLQTY] AS decplqty, + [DECPLCUR] AS decplcur, + RTRIM([ITMTSHID]) AS itmtshid, + [TAXOPTNS] AS taxoptns, + [IVIVINDX] AS ivivindx, + [IVIVOFIX] AS ivivofix, + [IVCOGSIX] AS ivcogsix, + [IVSLSIDX] AS ivslsidx, + [IVSLDSIX] AS ivsldsix, + [IVSLRNIX] AS ivslrnix, + [IVINUSIX] AS ivinusix, + [IVINSVIX] AS ivinsvix, + [IVDMGIDX] AS ivdmgidx, + [IVVARIDX] AS ivvaridx, + [DPSHPIDX] AS dpshpidx, + [PURPVIDX] AS purpvidx, + [UPPVIDX] AS uppvidx, + [IVRETIDX] AS ivretidx, + [ASMVRIDX] AS asmvridx, + [ITMTRKOP] AS itmtrkop, + RTRIM([LOTTYPE]) AS lottype, + [KPERHIST] AS kperhist, + [KPTRXHST] AS kptrxhst, + [KPCALHST] AS kpcalhst, + [KPDSTHST] AS kpdsthst, + [ALWBKORD] AS alwbkord, + [VCTNMTHD] AS vctnmthd, + RTRIM([ALTITEM1]) AS altitem1, + RTRIM([ALTITEM2]) AS altitem2, + RTRIM([USCATVLS_1]) AS uscatvls_1, + RTRIM([USCATVLS_2]) AS uscatvls_2, + RTRIM([USCATVLS_3]) AS uscatvls_3, + RTRIM([USCATVLS_4]) AS uscatvls_4, + RTRIM([USCATVLS_5]) AS uscatvls_5, + RTRIM([USCATVLS_6]) AS uscatvls_6, + [MSTRCDTY] AS mstrcdty, + [MODIFDT] AS modifdt, + [CREATDDT] AS creatddt, + [WRNTYDYS] AS wrntydys, + RTRIM([PRCLEVEL]) AS prclevel, + RTRIM([LOCNCODE]) AS locncode, + [PINFLIDX] AS pinflidx, + [PURMCIDX] AS purmcidx, + [IVINFIDX] AS ivinfidx, + [INVMCIDX] AS invmcidx, + [CGSINFLX] AS cgsinflx, + [CGSMCIDX] AS cgsmcidx, + RTRIM([ITEMCODE]) AS itemcode, + RTRIM([TCC]) AS tcc, + RTRIM([PriceGroup]) AS pricegroup, + [PRICMTHD] AS pricmthd, + RTRIM([PRCHSUOM]) AS prchsuom, + RTRIM([SELNGUOM]) AS selnguom, + [KTACCTSR] AS ktacctsr, + RTRIM([LASTGENSN]) AS lastgensn, + [ABCCODE] AS abccode, + [Revalue_Inventory] AS revalue_inventory, + [Tolerance_Percentage] AS tolerance_percentage, + RTRIM([Purchase_Item_Tax_Schedu]) AS purchase_item_tax_schedu, + [Purchase_Tax_Options] AS purchase_tax_options, + [ITMPLNNNGTYP] AS itmplnnngtyp, + [STTSTCLVLPRCNTG] AS sttstclvlprcntg, + RTRIM([CNTRYORGN]) AS cntryorgn, + [INACTIVE] AS inactive, + [MINSHELF1] AS minshelf1, + [MINSHELF2] AS minshelf2, + [INCLUDEINDP] AS includeindp, + [LOTEXPWARN] AS lotexpwarn, + [LOTEXPWARNDAYS] AS lotexpwarndays, + RTRIM([LASTGENLOT]) AS lastgenlot, + [Lot_Split_Quantity] AS lot_split_quantity, + [UseQtyOverageTolerance] AS useqtyoveragetolerance, + [UseQtyShortageTolerance] AS useqtyshortagetolerance, + [QtyOverTolerancePercent] AS qtyovertolerancepercent, + [QtyShortTolerancePercent] AS qtyshorttolerancepercent, + [IVSCRVIX] AS ivscrvix, + [DEX_ROW_TS] AS dex_row_ts, + [DEX_ROW_ID] AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[IV00101] diff --git a/config/modules/iv00102.json b/config/modules/iv00102.json new file mode 100644 index 0000000..2fa0bf8 --- /dev/null +++ b/config/modules/iv00102.json @@ -0,0 +1,568 @@ +{ + "name": "iv00102", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.iv00102", + "staging_table": "pipekit_staging.iv00102", + "merge_strategy": "full", + "merge_key": "dex_row_id", + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "ITEMNMBR", + "source_type": "CHAR(31)", + "dest_name": "itemnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "LOCNCODE", + "source_type": "CHAR(11)", + "dest_name": "locncode", + "dest_type": "text", + "description": null + }, + { + "source_name": "BINNMBR", + "source_type": "CHAR(21)", + "dest_name": "binnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "RCRDTYPE", + "source_type": "SMALLINT", + "dest_name": "rcrdtype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PRIMVNDR", + "source_type": "CHAR(15)", + "dest_name": "primvndr", + "dest_type": "text", + "description": null + }, + { + "source_name": "ITMFRFLG", + "source_type": "TINYINT", + "dest_name": "itmfrflg", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BGNGQTY", + "source_type": "NUMERIC(19,5)", + "dest_name": "bgngqty", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "LSORDQTY", + "source_type": "NUMERIC(19,5)", + "dest_name": "lsordqty", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "LRCPTQTY", + "source_type": "NUMERIC(19,5)", + "dest_name": "lrcptqty", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "LSTORDDT", + "source_type": "DATETIME", + "dest_name": "lstorddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "LSORDVND", + "source_type": "CHAR(15)", + "dest_name": "lsordvnd", + "dest_type": "text", + "description": null + }, + { + "source_name": "LSRCPTDT", + "source_type": "DATETIME", + "dest_name": "lsrcptdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "QTYRQSTN", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyrqstn", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYONORD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyonord", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYBKORD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtybkord", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTY_Drop_Shipped", + "source_type": "NUMERIC(19,5)", + "dest_name": "qty_drop_shipped", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYINUSE", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyinuse", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYINSVC", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyinsvc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYRTRND", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyrtrnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYDMGED", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtydmged", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYONHND", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyonhnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ATYALLOC", + "source_type": "NUMERIC(19,5)", + "dest_name": "atyalloc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYCOMTD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtycomtd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYSOLD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtysold", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "NXTCNTDT", + "source_type": "DATETIME", + "dest_name": "nxtcntdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "NXTCNTTM", + "source_type": "DATETIME", + "dest_name": "nxtcnttm", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "LSTCNTDT", + "source_type": "DATETIME", + "dest_name": "lstcntdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "LSTCNTTM", + "source_type": "DATETIME", + "dest_name": "lstcnttm", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "STCKCNTINTRVL", + "source_type": "SMALLINT", + "dest_name": "stckcntintrvl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Landed_Cost_Group_ID", + "source_type": "CHAR(15)", + "dest_name": "landed_cost_group_id", + "dest_type": "text", + "description": null + }, + { + "source_name": "BUYERID", + "source_type": "CHAR(15)", + "dest_name": "buyerid", + "dest_type": "text", + "description": null + }, + { + "source_name": "PLANNERID", + "source_type": "CHAR(15)", + "dest_name": "plannerid", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORDERPOLICY", + "source_type": "SMALLINT", + "dest_name": "orderpolicy", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FXDORDRQTY", + "source_type": "NUMERIC(19,5)", + "dest_name": "fxdordrqty", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDRPNTQTY", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordrpntqty", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "NMBROFDYS", + "source_type": "SMALLINT", + "dest_name": "nmbrofdys", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MNMMORDRQTY", + "source_type": "NUMERIC(19,5)", + "dest_name": "mnmmordrqty", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MXMMORDRQTY", + "source_type": "NUMERIC(19,5)", + "dest_name": "mxmmordrqty", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDERMULTIPLE", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordermultiple", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "REPLENISHMENTMETHOD", + "source_type": "SMALLINT", + "dest_name": "replenishmentmethod", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SHRINKAGEFACTOR", + "source_type": "NUMERIC(19,5)", + "dest_name": "shrinkagefactor", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "PRCHSNGLDTM", + "source_type": "NUMERIC(19,5)", + "dest_name": "prchsngldtm", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MNFCTRNGFXDLDTM", + "source_type": "NUMERIC(19,5)", + "dest_name": "mnfctrngfxdldtm", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MNFCTRNGVRBLLDTM", + "source_type": "NUMERIC(19,5)", + "dest_name": "mnfctrngvrblldtm", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "STAGINGLDTME", + "source_type": "NUMERIC(19,5)", + "dest_name": "stagingldtme", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "PLNNNGTMFNCDYS", + "source_type": "SMALLINT", + "dest_name": "plnnngtmfncdys", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DMNDTMFNCPRDS", + "source_type": "SMALLINT", + "dest_name": "dmndtmfncprds", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INCLDDINPLNNNG", + "source_type": "TINYINT", + "dest_name": "inclddinplnnng", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CALCULATEATP", + "source_type": "TINYINT", + "dest_name": "calculateatp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "AUTOCHKATP", + "source_type": "TINYINT", + "dest_name": "autochkatp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PLNFNLPAB", + "source_type": "TINYINT", + "dest_name": "plnfnlpab", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FRCSTCNSMPTNPRD", + "source_type": "SMALLINT", + "dest_name": "frcstcnsmptnprd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ORDRUPTOLVL", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordruptolvl", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SFTYSTCKQTY", + "source_type": "NUMERIC(19,5)", + "dest_name": "sftystckqty", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "REORDERVARIANCE", + "source_type": "NUMERIC(19,5)", + "dest_name": "reordervariance", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "PORECEIPTBIN", + "source_type": "CHAR(15)", + "dest_name": "poreceiptbin", + "dest_type": "text", + "description": null + }, + { + "source_name": "PORETRNBIN", + "source_type": "CHAR(15)", + "dest_name": "poretrnbin", + "dest_type": "text", + "description": null + }, + { + "source_name": "SOFULFILLMENTBIN", + "source_type": "CHAR(15)", + "dest_name": "sofulfillmentbin", + "dest_type": "text", + "description": null + }, + { + "source_name": "SORETURNBIN", + "source_type": "CHAR(15)", + "dest_name": "soreturnbin", + "dest_type": "text", + "description": null + }, + { + "source_name": "BOMRCPTBIN", + "source_type": "CHAR(15)", + "dest_name": "bomrcptbin", + "dest_type": "text", + "description": null + }, + { + "source_name": "MATERIALISSUEBIN", + "source_type": "CHAR(15)", + "dest_name": "materialissuebin", + "dest_type": "text", + "description": null + }, + { + "source_name": "MORECEIPTBIN", + "source_type": "CHAR(15)", + "dest_name": "moreceiptbin", + "dest_type": "text", + "description": null + }, + { + "source_name": "REPAIRISSUESBIN", + "source_type": "CHAR(15)", + "dest_name": "repairissuesbin", + "dest_type": "text", + "description": null + }, + { + "source_name": "ReplenishmentLevel", + "source_type": "SMALLINT", + "dest_name": "replenishmentlevel", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "POPOrderMethod", + "source_type": "SMALLINT", + "dest_name": "popordermethod", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MasterLocationCode", + "source_type": "CHAR(11)", + "dest_name": "masterlocationcode", + "dest_type": "text", + "description": null + }, + { + "source_name": "POPVendorSelection", + "source_type": "SMALLINT", + "dest_name": "popvendorselection", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "POPPricingSelection", + "source_type": "SMALLINT", + "dest_name": "poppricingselection", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PurchasePrice", + "source_type": "NUMERIC(19,5)", + "dest_name": "purchaseprice", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "IncludeAllocations", + "source_type": "TINYINT", + "dest_name": "includeallocations", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "IncludeBackorders", + "source_type": "TINYINT", + "dest_name": "includebackorders", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "IncludeRequisitions", + "source_type": "TINYINT", + "dest_name": "includerequisitions", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PICKTICKETITEMOPT", + "source_type": "SMALLINT", + "dest_name": "pickticketitemopt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INCLDMRPMOVEIN", + "source_type": "TINYINT", + "dest_name": "incldmrpmovein", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INCLDMRPMOVEOUT", + "source_type": "TINYINT", + "dest_name": "incldmrpmoveout", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INCLDMRPCANCEL", + "source_type": "TINYINT", + "dest_name": "incldmrpcancel", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Move_Out_Fence", + "source_type": "SMALLINT", + "dest_name": "move_out_fence", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INACTIVE", + "source_type": "TINYINT", + "dest_name": "inactive", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/iv00102.sql b/config/modules/iv00102.sql new file mode 100644 index 0000000..2a7afc1 --- /dev/null +++ b/config/modules/iv00102.sql @@ -0,0 +1,83 @@ +SELECT + ITEMNMBR AS itemnmbr, + LOCNCODE AS locncode, + BINNMBR AS binnmbr, + RCRDTYPE AS rcrdtype, + PRIMVNDR AS primvndr, + ITMFRFLG AS itmfrflg, + BGNGQTY AS bgngqty, + LSORDQTY AS lsordqty, + LRCPTQTY AS lrcptqty, + LSTORDDT AS lstorddt, + LSORDVND AS lsordvnd, + LSRCPTDT AS lsrcptdt, + QTYRQSTN AS qtyrqstn, + QTYONORD AS qtyonord, + QTYBKORD AS qtybkord, + QTY_Drop_Shipped AS qty_drop_shipped, + QTYINUSE AS qtyinuse, + QTYINSVC AS qtyinsvc, + QTYRTRND AS qtyrtrnd, + QTYDMGED AS qtydmged, + QTYONHND AS qtyonhnd, + ATYALLOC AS atyalloc, + QTYCOMTD AS qtycomtd, + QTYSOLD AS qtysold, + NXTCNTDT AS nxtcntdt, + NXTCNTTM AS nxtcnttm, + LSTCNTDT AS lstcntdt, + LSTCNTTM AS lstcnttm, + STCKCNTINTRVL AS stckcntintrvl, + Landed_Cost_Group_ID AS landed_cost_group_id, + BUYERID AS buyerid, + PLANNERID AS plannerid, + ORDERPOLICY AS orderpolicy, + FXDORDRQTY AS fxdordrqty, + ORDRPNTQTY AS ordrpntqty, + NMBROFDYS AS nmbrofdys, + MNMMORDRQTY AS mnmmordrqty, + MXMMORDRQTY AS mxmmordrqty, + ORDERMULTIPLE AS ordermultiple, + REPLENISHMENTMETHOD AS replenishmentmethod, + SHRINKAGEFACTOR AS shrinkagefactor, + PRCHSNGLDTM AS prchsngldtm, + MNFCTRNGFXDLDTM AS mnfctrngfxdldtm, + MNFCTRNGVRBLLDTM AS mnfctrngvrblldtm, + STAGINGLDTME AS stagingldtme, + PLNNNGTMFNCDYS AS plnnngtmfncdys, + DMNDTMFNCPRDS AS dmndtmfncprds, + INCLDDINPLNNNG AS inclddinplnnng, + CALCULATEATP AS calculateatp, + AUTOCHKATP AS autochkatp, + PLNFNLPAB AS plnfnlpab, + FRCSTCNSMPTNPRD AS frcstcnsmptnprd, + ORDRUPTOLVL AS ordruptolvl, + SFTYSTCKQTY AS sftystckqty, + REORDERVARIANCE AS reordervariance, + PORECEIPTBIN AS poreceiptbin, + PORETRNBIN AS poretrnbin, + SOFULFILLMENTBIN AS sofulfillmentbin, + SORETURNBIN AS soreturnbin, + BOMRCPTBIN AS bomrcptbin, + MATERIALISSUEBIN AS materialissuebin, + MORECEIPTBIN AS moreceiptbin, + REPAIRISSUESBIN AS repairissuesbin, + ReplenishmentLevel AS replenishmentlevel, + POPOrderMethod AS popordermethod, + MasterLocationCode AS masterlocationcode, + POPVendorSelection AS popvendorselection, + POPPricingSelection AS poppricingselection, + PurchasePrice AS purchaseprice, + IncludeAllocations AS includeallocations, + IncludeBackorders AS includebackorders, + IncludeRequisitions AS includerequisitions, + PICKTICKETITEMOPT AS pickticketitemopt, + INCLDMRPMOVEIN AS incldmrpmovein, + INCLDMRPMOVEOUT AS incldmrpmoveout, + INCLDMRPCANCEL AS incldmrpcancel, + Move_Out_Fence AS move_out_fence, + INACTIVE AS inactive, + DEX_ROW_ID AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[IV00102] +WHERE QTYONHND <> 0 + diff --git a/config/modules/live_quotes.json b/config/modules/live_quotes.json new file mode 100644 index 0000000..6647018 --- /dev/null +++ b/config/modules/live_quotes.json @@ -0,0 +1,302 @@ +{ + "name": "live_quotes", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "pricequote.live_quotes", + "staging_table": "pipekit_staging.live_quotes", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "qid", + "source_type": "INT", + "dest_name": "qid", + "dest_type": "integer", + "description": null + }, + { + "source_name": "qline", + "source_type": "INT", + "dest_name": "qline", + "dest_type": "integer", + "description": null + }, + { + "source_name": "rep", + "source_type": "VARCHAR(128)", + "dest_name": "rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "approverusername", + "source_type": "VARCHAR(128)", + "dest_name": "approverusername", + "dest_type": "text", + "description": null + }, + { + "source_name": "touched", + "source_type": "DATETIME", + "dest_name": "touched", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "expires", + "source_type": "DATETIME", + "dest_name": "expires", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "request", + "source_type": "DATETIME", + "dest_name": "request", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "qtitle", + "source_type": "VARCHAR(50)", + "dest_name": "qtitle", + "dest_type": "text", + "description": null + }, + { + "source_name": "qstatid", + "source_type": "INT", + "dest_name": "qstatid", + "dest_type": "integer", + "description": null + }, + { + "source_name": "qstat", + "source_type": "VARCHAR(50)", + "dest_name": "qstat", + "dest_type": "text", + "description": null + }, + { + "source_name": "quotenumber", + "source_type": "INT", + "dest_name": "quotenumber", + "dest_type": "integer", + "description": null + }, + { + "source_name": "billto", + "source_type": "VARCHAR(8)", + "dest_name": "billto", + "dest_type": "text", + "description": null + }, + { + "source_name": "shipto", + "source_type": "VARCHAR(8)", + "dest_name": "shipto", + "dest_type": "text", + "description": null + }, + { + "source_name": "qchan", + "source_type": "VARCHAR(3)", + "dest_name": "qchan", + "dest_type": "text", + "description": null + }, + { + "source_name": "qcustomer", + "source_type": "VARCHAR(35)", + "dest_name": "qcustomer", + "dest_type": "text", + "description": null + }, + { + "source_name": "part", + "source_type": "VARCHAR(20)", + "dest_name": "part", + "dest_type": "text", + "description": null + }, + { + "source_name": "qoptions", + "source_type": "VARCHAR(25)", + "dest_name": "qoptions", + "dest_type": "text", + "description": null + }, + { + "source_name": "partbuilt", + "source_type": "VARCHAR(37)", + "dest_name": "partbuilt", + "dest_type": "text", + "description": null + }, + { + "source_name": "colgrp", + "source_type": "VARCHAR(1)", + "dest_name": "colgrp", + "dest_type": "text", + "description": null + }, + { + "source_name": "colc", + "source_type": "VARCHAR(20)", + "dest_name": "colc", + "dest_type": "text", + "description": null + }, + { + "source_name": "coltier", + "source_type": "VARCHAR(1)", + "dest_name": "coltier", + "dest_type": "text", + "description": null + }, + { + "source_name": "brand", + "source_type": "VARCHAR(8000)", + "dest_name": "brand", + "dest_type": "text", + "description": null + }, + { + "source_name": "dataseg", + "source_type": "VARCHAR(13)", + "dest_name": "dataseg", + "dest_type": "text", + "description": null + }, + { + "source_name": "v1ds", + "source_type": "VARCHAR(8000)", + "dest_name": "v1ds", + "dest_type": "text", + "description": null + }, + { + "source_name": "comment", + "source_type": "VARCHAR(512)", + "dest_name": "comment", + "dest_type": "text", + "description": null + }, + { + "source_name": "units_each", + "source_type": "DECIMAL(38,10)", + "dest_name": "units_each", + "dest_type": "numeric(38,10)", + "description": null + }, + { + "source_name": "price", + "source_type": "DECIMAL(18,9)", + "dest_name": "price", + "dest_type": "numeric(18,9)", + "description": null + }, + { + "source_name": "sales", + "source_type": "DECIMAL(38,6)", + "dest_name": "sales", + "dest_type": "numeric(38,6)", + "description": null + }, + { + "source_name": "histprice", + "source_type": "DECIMAL(18,9)", + "dest_name": "histprice", + "dest_type": "numeric(18,9)", + "description": null + }, + { + "source_name": "targetp", + "source_type": "DECIMAL(18,9)", + "dest_name": "targetp", + "dest_type": "numeric(18,9)", + "description": null + }, + { + "source_name": "LastSalesPrice", + "source_type": "DECIMAL(18,9)", + "dest_name": "lastsalesprice", + "dest_type": "numeric(18,9)", + "description": null + }, + { + "source_name": "r_curr", + "source_type": "VARCHAR(2)", + "dest_name": "r_curr", + "dest_type": "text", + "description": null + }, + { + "source_name": "qt_rate", + "source_type": "DECIMAL(18,9)", + "dest_name": "qt_rate", + "dest_type": "numeric(18,9)", + "description": null + }, + { + "source_name": "qrn", + "source_type": "INT", + "dest_name": "qrn", + "dest_type": "integer", + "description": null + }, + { + "source_name": "url", + "source_type": "VARCHAR(73)", + "dest_name": "url", + "dest_type": "text", + "description": null + }, + { + "source_name": "tacticalmodifier", + "source_type": "VARCHAR(8000)", + "dest_name": "tacticalmodifier", + "dest_type": "text", + "description": null + }, + { + "source_name": "FinalRecommendedPrice", + "source_type": "DECIMAL(18,9)", + "dest_name": "finalrecommendedprice", + "dest_type": "numeric(18,9)", + "description": null + }, + { + "source_name": "LowerPriceLimit", + "source_type": "DECIMAL(38,9)", + "dest_name": "lowerpricelimit", + "dest_type": "numeric(38,9)", + "description": null + }, + { + "source_name": "UpperPriceLimit", + "source_type": "DECIMAL(38,9)", + "dest_name": "upperpricelimit", + "dest_type": "numeric(38,9)", + "description": null + }, + { + "source_name": "curstdus", + "source_type": "NUMERIC(38,6)", + "dest_name": "curstdus", + "dest_type": "numeric(38,6)", + "description": null + }, + { + "source_name": "futstdus", + "source_type": "NUMERIC(38,6)", + "dest_name": "futstdus", + "dest_type": "numeric(38,6)", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/live_quotes.sql b/config/modules/live_quotes.sql new file mode 100644 index 0000000..8378981 --- /dev/null +++ b/config/modules/live_quotes.sql @@ -0,0 +1,43 @@ +SELECT + [qid] AS qid, + [qline] AS qline, + RTRIM([rep]) AS rep, + RTRIM([approverusername]) AS approverusername, + [touched] AS touched, + [expires] AS expires, + [request] AS request, + RTRIM([qtitle]) AS qtitle, + [qstatid] AS qstatid, + RTRIM([qstat]) AS qstat, + [quotenumber] AS quotenumber, + RTRIM([billto]) AS billto, + RTRIM([shipto]) AS shipto, + RTRIM([qchan]) AS qchan, + RTRIM([qcustomer]) AS qcustomer, + RTRIM([part]) AS part, + RTRIM([qoptions]) AS qoptions, + RTRIM([partbuilt]) AS partbuilt, + RTRIM([colgrp]) AS colgrp, + RTRIM([colc]) AS colc, + RTRIM([coltier]) AS coltier, + RTRIM([brand]) AS brand, + RTRIM([dataseg]) AS dataseg, + RTRIM([v1ds]) AS v1ds, + RTRIM([comment]) AS comment, + [units_each] AS units_each, + [price] AS price, + [sales] AS sales, + [histprice] AS histprice, + [targetp] AS targetp, + [LastSalesPrice] AS lastsalesprice, + RTRIM([r_curr]) AS r_curr, + [qt_rate] AS qt_rate, + [qrn] AS qrn, + RTRIM([url]) AS url, + RTRIM([tacticalmodifier]) AS tacticalmodifier, + [FinalRecommendedPrice] AS finalrecommendedprice, + [LowerPriceLimit] AS lowerpricelimit, + [UpperPriceLimit] AS upperpricelimit, + [curstdus] AS curstdus, + [futstdus] AS futstdus +FROM [FANALYSIS].[RLARP].[live_quotes] diff --git a/config/modules/marktable.json b/config/modules/marktable.json new file mode 100644 index 0000000..56aaede --- /dev/null +++ b/config/modules/marktable.json @@ -0,0 +1,575 @@ +{ + "name": "marktable", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.marktable", + "staging_table": "pipekit_staging.marktable", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Marketing Product Specs File", + "columns": [ + { + "source_name": "M1PROD", + "source_type": "CHAR(10)", + "dest_name": "m1prod", + "dest_type": "text", + "description": "Product" + }, + { + "source_name": "M1SDES", + "source_type": "CHAR(30)", + "dest_name": "m1sdes", + "dest_type": "text", + "description": "Product Short Description" + }, + { + "source_name": "M1LDES", + "source_type": "CHAR(75)", + "dest_name": "m1ldes", + "dest_type": "text", + "description": "Product Long Description" + }, + { + "source_name": "M1MAJG", + "source_type": "CHAR(3)", + "dest_name": "m1majg", + "dest_type": "text", + "description": "Major Group" + }, + { + "source_name": "M1MING", + "source_type": "CHAR(3)", + "dest_name": "m1ming", + "dest_type": "text", + "description": "Minor Group" + }, + { + "source_name": "M1MJSP", + "source_type": "CHAR(3)", + "dest_name": "m1mjsp", + "dest_type": "text", + "description": "Major Sales" + }, + { + "source_name": "M1MNSP", + "source_type": "CHAR(3)", + "dest_name": "m1mnsp", + "dest_type": "text", + "description": "Minor Sales" + }, + { + "source_name": "M1TRDS", + "source_type": "CHAR(10)", + "dest_name": "m1trds", + "dest_type": "text", + "description": "Trade Size" + }, + { + "source_name": "M1HSZE", + "source_type": "NUMERIC(6,2)", + "dest_name": "m1hsze", + "dest_type": "numeric(6,2)", + "description": "Hanger Size" + }, + { + "source_name": "M1CCFG", + "source_type": "CHAR(20)", + "dest_name": "m1ccfg", + "dest_type": "text", + "description": "Cell Configuration" + }, + { + "source_name": "M1SYMB", + "source_type": "CHAR(15)", + "dest_name": "m1symb", + "dest_type": "text", + "description": "Symbol" + }, + { + "source_name": "M1TSLT", + "source_type": "CHAR(1)", + "dest_name": "m1tslt", + "dest_type": "text", + "description": "Tag Slot" + }, + { + "source_name": "M1STAT", + "source_type": "CHAR(1)", + "dest_name": "m1stat", + "dest_type": "text", + "description": "Product Status" + }, + { + "source_name": "M1WGHT", + "source_type": "DECIMAL(8,5)", + "dest_name": "m1wght", + "dest_type": "numeric(8,5)", + "description": "Weight" + }, + { + "source_name": "M1WUNT", + "source_type": "CHAR(2)", + "dest_name": "m1wunt", + "dest_type": "text", + "description": "Weight Unit" + }, + { + "source_name": "M1MDCIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1mdciu", + "dest_type": "numeric(10,2)", + "description": "Max Dry" + }, + { + "source_name": "M1MLUUU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1mluuu", + "dest_type": "numeric(10,2)", + "description": "Max Liquid metric and Unit" + }, + { + "source_name": "M1ODU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1odu", + "dest_type": "numeric(10,2)", + "description": "Outside Dimensions" + }, + { + "source_name": "M1IDU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1idu", + "dest_type": "numeric(10,2)", + "description": "Inside Dimensions" + }, + { + "source_name": "M1HTU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1htu", + "dest_type": "numeric(10,2)", + "description": "Height" + }, + { + "source_name": "M1OWIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1owiu", + "dest_type": "numeric(10,2)", + "description": "Outside Width" + }, + { + "source_name": "M1OLIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1oliu", + "dest_type": "numeric(10,2)", + "description": "Outside Length" + }, + { + "source_name": "M1IWIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1iwiu", + "dest_type": "numeric(10,2)", + "description": "Inside Width" + }, + { + "source_name": "M1ILIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1iliu", + "dest_type": "numeric(10,2)", + "description": "Inside Length" + }, + { + "source_name": "M1PSU", + "source_type": "CHAR(14)", + "dest_name": "m1psu", + "dest_type": "text", + "description": "Pallet Size" + }, + { + "source_name": "M1PHU", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1phu", + "dest_type": "numeric(10,2)", + "description": "Pallet Height" + }, + { + "source_name": "M1MDUOMU", + "source_type": "CHAR(5)", + "dest_name": "m1mduomu", + "dest_type": "text", + "description": "Max Dry UOM" + }, + { + "source_name": "M1MLUOMU", + "source_type": "CHAR(5)", + "dest_name": "m1mluomu", + "dest_type": "text", + "description": "Max Liquid UOM" + }, + { + "source_name": "M1ODUOMU", + "source_type": "CHAR(5)", + "dest_name": "m1oduomu", + "dest_type": "text", + "description": "Outside Dimensions UOM" + }, + { + "source_name": "M1IDUOMU", + "source_type": "CHAR(5)", + "dest_name": "m1iduomu", + "dest_type": "text", + "description": "Inside Dimensions UOM" + }, + { + "source_name": "M1HUOMU", + "source_type": "CHAR(5)", + "dest_name": "m1huomu", + "dest_type": "text", + "description": "Height UOM" + }, + { + "source_name": "M1OLWOMU", + "source_type": "CHAR(5)", + "dest_name": "m1olwomu", + "dest_type": "text", + "description": "Outside Width UOM" + }, + { + "source_name": "M1OLUOMU", + "source_type": "CHAR(5)", + "dest_name": "m1oluomu", + "dest_type": "text", + "description": "Outside Length UOM" + }, + { + "source_name": "M1IWUOMU", + "source_type": "CHAR(5)", + "dest_name": "m1iwuomu", + "dest_type": "text", + "description": "Inside Width UOM" + }, + { + "source_name": "M1ILUOMU", + "source_type": "CHAR(5)", + "dest_name": "m1iluomu", + "dest_type": "text", + "description": "Inside Length UOM" + }, + { + "source_name": "M1PHUOMU", + "source_type": "CHAR(5)", + "dest_name": "m1phuomu", + "dest_type": "text", + "description": "Pallet Height UOM" + }, + { + "source_name": "M1MDCIM", + "source_type": "NUMERIC(11,5)", + "dest_name": "m1mdcim", + "dest_type": "numeric(11,5)", + "description": "Max Dry" + }, + { + "source_name": "M1MLUUM", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1mluum", + "dest_type": "numeric(10,2)", + "description": "Max Liquid metric and Unit" + }, + { + "source_name": "M1ODM", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1odm", + "dest_type": "numeric(10,2)", + "description": "Outside Dimensions" + }, + { + "source_name": "M1IDM", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1idm", + "dest_type": "numeric(10,2)", + "description": "Inside Dimensions" + }, + { + "source_name": "M1HTM", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1htm", + "dest_type": "numeric(10,2)", + "description": "Height" + }, + { + "source_name": "M1OWIM", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1owim", + "dest_type": "numeric(10,2)", + "description": "Outside Width" + }, + { + "source_name": "M1OLIM", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1olim", + "dest_type": "numeric(10,2)", + "description": "Outside Length" + }, + { + "source_name": "M1IWIM", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1iwim", + "dest_type": "numeric(10,2)", + "description": "Inside Width" + }, + { + "source_name": "M1ILIM", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1ilim", + "dest_type": "numeric(10,2)", + "description": "Inside Length" + }, + { + "source_name": "M1PSM", + "source_type": "CHAR(14)", + "dest_name": "m1psm", + "dest_type": "text", + "description": "Pallet Size" + }, + { + "source_name": "M1PHM", + "source_type": "NUMERIC(10,2)", + "dest_name": "m1phm", + "dest_type": "numeric(10,2)", + "description": "Pallet Height" + }, + { + "source_name": "M1MDUOMM", + "source_type": "CHAR(5)", + "dest_name": "m1mduomm", + "dest_type": "text", + "description": "Max Dry UOM" + }, + { + "source_name": "M1MLUOMM", + "source_type": "CHAR(5)", + "dest_name": "m1mluomm", + "dest_type": "text", + "description": "Max Liquid UOM" + }, + { + "source_name": "M1ODUOMM", + "source_type": "CHAR(5)", + "dest_name": "m1oduomm", + "dest_type": "text", + "description": "Outside Dimensions UOM" + }, + { + "source_name": "M1IDUOMM", + "source_type": "CHAR(5)", + "dest_name": "m1iduomm", + "dest_type": "text", + "description": "Inside Dimensions UOM" + }, + { + "source_name": "M1HUOMM", + "source_type": "CHAR(5)", + "dest_name": "m1huomm", + "dest_type": "text", + "description": "Height UOM" + }, + { + "source_name": "M1OLWOMM", + "source_type": "CHAR(5)", + "dest_name": "m1olwomm", + "dest_type": "text", + "description": "Outside Width UOM" + }, + { + "source_name": "M1OLUOMM", + "source_type": "CHAR(5)", + "dest_name": "m1oluomm", + "dest_type": "text", + "description": "Outside Length UOM" + }, + { + "source_name": "M1IWUOMM", + "source_type": "CHAR(5)", + "dest_name": "m1iwuomm", + "dest_type": "text", + "description": "Inside Width UOM" + }, + { + "source_name": "M1ILUOMM", + "source_type": "CHAR(5)", + "dest_name": "m1iluomm", + "dest_type": "text", + "description": "Inside Length UOM" + }, + { + "source_name": "M1PHUOMM", + "source_type": "CHAR(5)", + "dest_name": "m1phuomm", + "dest_type": "text", + "description": "Pallet Height UOM" + }, + { + "source_name": "M1TCPT", + "source_type": "CHAR(45)", + "dest_name": "m1tcpt", + "dest_type": "text", + "description": "Tray Compatiblity" + }, + { + "source_name": "M1PCPT", + "source_type": "CHAR(45)", + "dest_name": "m1pcpt", + "dest_type": "text", + "description": "Pot Compatibilty" + }, + { + "source_name": "M1HCPT", + "source_type": "CHAR(45)", + "dest_name": "m1hcpt", + "dest_type": "text", + "description": "Hanger Compatibilty" + }, + { + "source_name": "M1SCPT", + "source_type": "CHAR(45)", + "dest_name": "m1scpt", + "dest_type": "text", + "description": "Saucer Compatibilty" + }, + { + "source_name": "M1CBSQ", + "source_type": "NUMERIC(12,0)", + "dest_name": "m1cbsq", + "dest_type": "numeric(12,0)", + "description": "Case/Bundle/Sleeve Quantity" + }, + { + "source_name": "M1BPQ", + "source_type": "NUMERIC(12,0)", + "dest_name": "m1bpq", + "dest_type": "numeric(12,0)", + "description": "Bulk Pallet Quantity" + }, + { + "source_name": "M1CBSP", + "source_type": "NUMERIC(12,0)", + "dest_name": "m1cbsp", + "dest_type": "numeric(12,0)", + "description": "Case/Bundle/Sleeve per PLT" + }, + { + "source_name": "M1PAGE", + "source_type": "CHAR(32)", + "dest_name": "m1page", + "dest_type": "text", + "description": "Catalog Pages" + }, + { + "source_name": "M1STKC", + "source_type": "CHAR(32)", + "dest_name": "m1stkc", + "dest_type": "text", + "description": "Stocked Colors" + }, + { + "source_name": "M1FORMAT", + "source_type": "CHAR(20)", + "dest_name": "m1format", + "dest_type": "text", + "description": "FORMAT" + }, + { + "source_name": "M1FORM_UOM", + "source_type": "CHAR(15)", + "dest_name": "m1form_uom", + "dest_type": "text", + "description": "FORMAT_UOM" + }, + { + "source_name": "M1SHAPE", + "source_type": "CHAR(15)", + "dest_name": "m1shape", + "dest_type": "text", + "description": "SHAPE" + }, + { + "source_name": "M1FUNC", + "source_type": "CHAR(30)", + "dest_name": "m1func", + "dest_type": "text", + "description": "FUNCTION" + }, + { + "source_name": "M1PRTGRP", + "source_type": "CHAR(10)", + "dest_name": "m1prtgrp", + "dest_type": "text", + "description": "Part Group" + }, + { + "source_name": "M1FEATURE", + "source_type": "CHAR(30)", + "dest_name": "m1feature", + "dest_type": "text", + "description": "Feature" + }, + { + "source_name": "M1PRICEG", + "source_type": "CHAR(50)", + "dest_name": "m1priceg", + "dest_type": "text", + "description": "Priceg" + }, + { + "source_name": "M1FAMILY", + "source_type": "CHAR(40)", + "dest_name": "m1family", + "dest_type": "text", + "description": "Profile/Family" + }, + { + "source_name": "M1IMGURL", + "source_type": "CHAR(100)", + "dest_name": "m1imgurl", + "dest_type": "text", + "description": "Image Url" + }, + { + "source_name": "M1HEADER", + "source_type": "CHAR(30)", + "dest_name": "m1header", + "dest_type": "text", + "description": "Header" + }, + { + "source_name": "M1BIGGROUP", + "source_type": "CHAR(25)", + "dest_name": "m1biggroup", + "dest_type": "text", + "description": "Big group" + }, + { + "source_name": "M1BASEPART", + "source_type": "CHAR(8)", + "dest_name": "m1basepart", + "dest_type": "text", + "description": "Base Part" + }, + { + "source_name": "M1SPONSOR", + "source_type": "CHAR(15)", + "dest_name": "m1sponsor", + "dest_type": "text", + "description": "Sponsor" + }, + { + "source_name": "M1COMPAT", + "source_type": "CHAR(180)", + "dest_name": "m1compat", + "dest_type": "text", + "description": "COMPATIBLES" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/marktable.sql b/config/modules/marktable.sql new file mode 100644 index 0000000..c357e5d --- /dev/null +++ b/config/modules/marktable.sql @@ -0,0 +1,82 @@ +SELECT + RTRIM(M1PROD) AS m1prod, + RTRIM(M1SDES) AS m1sdes, + RTRIM(M1LDES) AS m1ldes, + RTRIM(M1MAJG) AS m1majg, + RTRIM(M1MING) AS m1ming, + RTRIM(M1MJSP) AS m1mjsp, + RTRIM(M1MNSP) AS m1mnsp, + RTRIM(M1TRDS) AS m1trds, + M1HSZE AS m1hsze, + RTRIM(M1CCFG) AS m1ccfg, + RTRIM(M1SYMB) AS m1symb, + RTRIM(M1TSLT) AS m1tslt, + RTRIM(M1STAT) AS m1stat, + M1WGHT AS m1wght, + RTRIM(M1WUNT) AS m1wunt, + M1MDCIU AS m1mdciu, + M1MLUUU AS m1mluuu, + M1ODU AS m1odu, + M1IDU AS m1idu, + M1HTU AS m1htu, + M1OWIU AS m1owiu, + M1OLIU AS m1oliu, + M1IWIU AS m1iwiu, + M1ILIU AS m1iliu, + RTRIM(M1PSU) AS m1psu, + M1PHU AS m1phu, + RTRIM(M1MDUOMU) AS m1mduomu, + RTRIM(M1MLUOMU) AS m1mluomu, + RTRIM(M1ODUOMU) AS m1oduomu, + RTRIM(M1IDUOMU) AS m1iduomu, + RTRIM(M1HUOMU) AS m1huomu, + RTRIM(M1OLWOMU) AS m1olwomu, + RTRIM(M1OLUOMU) AS m1oluomu, + RTRIM(M1IWUOMU) AS m1iwuomu, + RTRIM(M1ILUOMU) AS m1iluomu, + RTRIM(M1PHUOMU) AS m1phuomu, + M1MDCIM AS m1mdcim, + M1MLUUM AS m1mluum, + M1ODM AS m1odm, + M1IDM AS m1idm, + M1HTM AS m1htm, + M1OWIM AS m1owim, + M1OLIM AS m1olim, + M1IWIM AS m1iwim, + M1ILIM AS m1ilim, + RTRIM(M1PSM) AS m1psm, + M1PHM AS m1phm, + RTRIM(M1MDUOMM) AS m1mduomm, + RTRIM(M1MLUOMM) AS m1mluomm, + RTRIM(M1ODUOMM) AS m1oduomm, + RTRIM(M1IDUOMM) AS m1iduomm, + RTRIM(M1HUOMM) AS m1huomm, + RTRIM(M1OLWOMM) AS m1olwomm, + RTRIM(M1OLUOMM) AS m1oluomm, + RTRIM(M1IWUOMM) AS m1iwuomm, + RTRIM(M1ILUOMM) AS m1iluomm, + RTRIM(M1PHUOMM) AS m1phuomm, + RTRIM(M1TCPT) AS m1tcpt, + RTRIM(M1PCPT) AS m1pcpt, + RTRIM(M1HCPT) AS m1hcpt, + RTRIM(M1SCPT) AS m1scpt, + M1CBSQ AS m1cbsq, + M1BPQ AS m1bpq, + M1CBSP AS m1cbsp, + RTRIM(M1PAGE) AS m1page, + RTRIM(M1STKC) AS m1stkc, + RTRIM(M1FORMAT) AS m1format, + RTRIM(M1FORM_UOM) AS m1form_uom, + RTRIM(M1SHAPE) AS m1shape, + RTRIM(M1FUNC) AS m1func, + RTRIM(M1PRTGRP) AS m1prtgrp, + RTRIM(M1FEATURE) AS m1feature, + RTRIM(M1PRICEG) AS m1priceg, + RTRIM(M1FAMILY) AS m1family, + RTRIM(M1IMGURL) AS m1imgurl, + RTRIM(M1HEADER) AS m1header, + RTRIM(M1BIGGROUP) AS m1biggroup, + RTRIM(M1BASEPART) AS m1basepart, + RTRIM(M1SPONSOR) AS m1sponsor, + RTRIM(M1COMPAT) AS m1compat +FROM LGPGM.MARKTABLE diff --git a/config/modules/mast.json b/config/modules/mast.json new file mode 100644 index 0000000..1564c19 --- /dev/null +++ b/config/modules/mast.json @@ -0,0 +1,274 @@ +{ + "name": "mast", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.mast", + "staging_table": "pipekit_staging.mast", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "G/L Chart of Accounts header 6.1", + "columns": [ + { + "source_name": "AZCOMP", + "source_type": "NUMERIC(2,0)", + "dest_name": "azcomp", + "dest_type": "numeric(2,0)", + "description": "Company Number" + }, + { + "source_name": "AZGL#1", + "source_type": "NUMERIC(4,0)", + "dest_name": "azgl#1", + "dest_type": "numeric(4,0)", + "description": "G/L Account#1" + }, + { + "source_name": "AZGL#2", + "source_type": "NUMERIC(6,0)", + "dest_name": "azgl#2", + "dest_type": "numeric(6,0)", + "description": "G/L Account#2" + }, + { + "source_name": "AZBTYP", + "source_type": "NUMERIC(2,0)", + "dest_name": "azbtyp", + "dest_type": "numeric(2,0)", + "description": "Budget Type" + }, + { + "source_name": "AZTITL", + "source_type": "CHAR(30)", + "dest_name": "aztitl", + "dest_type": "text", + "description": "Account Title" + }, + { + "source_name": "AZATYP", + "source_type": "CHAR(1)", + "dest_name": "azatyp", + "dest_type": "text", + "description": "Account Type" + }, + { + "source_name": "AZGROP", + "source_type": "CHAR(7)", + "dest_name": "azgrop", + "dest_type": "text", + "description": "Account Group" + }, + { + "source_name": "AZSTAT", + "source_type": "CHAR(1)", + "dest_name": "azstat", + "dest_type": "text", + "description": "Account Status Code" + }, + { + "source_name": "AZUVER", + "source_type": "CHAR(10)", + "dest_name": "azuver", + "dest_type": "text", + "description": "USRDEF Verification Template" + }, + { + "source_name": "AZGIFI", + "source_type": "NUMERIC(4,0)", + "dest_name": "azgifi", + "dest_type": "numeric(4,0)", + "description": "General Index of Financial Info" + }, + { + "source_name": "AZPJMN", + "source_type": "CHAR(1)", + "dest_name": "azpjmn", + "dest_type": "text", + "description": "Project Mandatory" + }, + { + "source_name": "AZCODE", + "source_type": "CHAR(30)", + "dest_name": "azcode", + "dest_type": "text", + "description": "G/L Account Code" + }, + { + "source_name": "AZFTCD", + "source_type": "CHAR(30)", + "dest_name": "azftcd", + "dest_type": "text", + "description": "Formatted Account Code" + }, + { + "source_name": "AZFLG1", + "source_type": "CHAR(1)", + "dest_name": "azflg1", + "dest_type": "text", + "description": "Future Use Flg1" + }, + { + "source_name": "AZFLG2", + "source_type": "CHAR(1)", + "dest_name": "azflg2", + "dest_type": "text", + "description": "Future Use Flg2" + }, + { + "source_name": "AZFLG3", + "source_type": "CHAR(1)", + "dest_name": "azflg3", + "dest_type": "text", + "description": "Future Use Flg3" + }, + { + "source_name": "AZFLG4", + "source_type": "CHAR(1)", + "dest_name": "azflg4", + "dest_type": "text", + "description": "Future Use Flg4" + }, + { + "source_name": "AZFLG5", + "source_type": "CHAR(1)", + "dest_name": "azflg5", + "dest_type": "text", + "description": "Future Use Flg5" + }, + { + "source_name": "AZFUT1", + "source_type": "CHAR(10)", + "dest_name": "azfut1", + "dest_type": "text", + "description": "Future Use Fut1" + }, + { + "source_name": "AZFUT2", + "source_type": "CHAR(10)", + "dest_name": "azfut2", + "dest_type": "text", + "description": "Future Use Fut2" + }, + { + "source_name": "AZFUT3", + "source_type": "CHAR(10)", + "dest_name": "azfut3", + "dest_type": "text", + "description": "Future Use Fut3" + }, + { + "source_name": "AZFUT4", + "source_type": "CHAR(20)", + "dest_name": "azfut4", + "dest_type": "text", + "description": "Future Use Fut4" + }, + { + "source_name": "AZFUT5", + "source_type": "CHAR(20)", + "dest_name": "azfut5", + "dest_type": "text", + "description": "Future Use Fut5" + }, + { + "source_name": "AZFUT6", + "source_type": "CHAR(20)", + "dest_name": "azfut6", + "dest_type": "text", + "description": "Future Use Fut6" + }, + { + "source_name": "AZFUT7", + "source_type": "CHAR(30)", + "dest_name": "azfut7", + "dest_type": "text", + "description": "Future Use Fut7" + }, + { + "source_name": "AZFUT8", + "source_type": "NUMERIC(11,2)", + "dest_name": "azfut8", + "dest_type": "numeric(11,2)", + "description": "Future Use Fut8" + }, + { + "source_name": "AZFUT9", + "source_type": "NUMERIC(11,2)", + "dest_name": "azfut9", + "dest_type": "numeric(11,2)", + "description": "Future Use Fut9" + }, + { + "source_name": "AZFUT10", + "source_type": "NUMERIC(11,2)", + "dest_name": "azfut10", + "dest_type": "numeric(11,2)", + "description": "Future Use Fut10" + }, + { + "source_name": "AZFUT11", + "source_type": "NUMERIC(15,5)", + "dest_name": "azfut11", + "dest_type": "numeric(15,5)", + "description": "Future Use Fut11" + }, + { + "source_name": "AZFUT12", + "source_type": "NUMERIC(15,5)", + "dest_name": "azfut12", + "dest_type": "numeric(15,5)", + "description": "Future Use Fut12" + }, + { + "source_name": "AZCLSC", + "source_type": "CHAR(1)", + "dest_name": "azclsc", + "dest_type": "text", + "description": "Class Code" + }, + { + "source_name": "AZBSLN", + "source_type": "NUMERIC(3,0)", + "dest_name": "azbsln", + "dest_type": "numeric(3,0)", + "description": "Balance Sheet Line" + }, + { + "source_name": "AZISLN", + "source_type": "NUMERIC(3,0)", + "dest_name": "azisln", + "dest_type": "numeric(3,0)", + "description": "Income Stmt Line" + }, + { + "source_name": "AZTTL2", + "source_type": "CHAR(30)", + "dest_name": "azttl2", + "dest_type": "text", + "description": "Second Title" + }, + { + "source_name": "AZICMA", + "source_type": "CHAR(1)", + "dest_name": "azicma", + "dest_type": "text", + "description": "Intercompany Account" + }, + { + "source_name": "AZCURC", + "source_type": "CHAR(2)", + "dest_name": "azcurc", + "dest_type": "text", + "description": "Currency Code" + }, + { + "source_name": "AZCATC", + "source_type": "CHAR(10)", + "dest_name": "azcatc", + "dest_type": "text", + "description": "G/L Category Code" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/mast.sql b/config/modules/mast.sql new file mode 100644 index 0000000..ecbd3f9 --- /dev/null +++ b/config/modules/mast.sql @@ -0,0 +1,39 @@ +SELECT + AZCOMP AS azcomp, + "AZGL#1" AS "azgl#1", + "AZGL#2" AS "azgl#2", + AZBTYP AS azbtyp, + RTRIM(AZTITL) AS aztitl, + RTRIM(AZATYP) AS azatyp, + RTRIM(AZGROP) AS azgrop, + RTRIM(AZSTAT) AS azstat, + RTRIM(AZUVER) AS azuver, + AZGIFI AS azgifi, + RTRIM(AZPJMN) AS azpjmn, + RTRIM(AZCODE) AS azcode, + RTRIM(AZFTCD) AS azftcd, + RTRIM(AZFLG1) AS azflg1, + RTRIM(AZFLG2) AS azflg2, + RTRIM(AZFLG3) AS azflg3, + RTRIM(AZFLG4) AS azflg4, + RTRIM(AZFLG5) AS azflg5, + RTRIM(AZFUT1) AS azfut1, + RTRIM(AZFUT2) AS azfut2, + RTRIM(AZFUT3) AS azfut3, + RTRIM(AZFUT4) AS azfut4, + RTRIM(AZFUT5) AS azfut5, + RTRIM(AZFUT6) AS azfut6, + RTRIM(AZFUT7) AS azfut7, + AZFUT8 AS azfut8, + AZFUT9 AS azfut9, + AZFUT10 AS azfut10, + AZFUT11 AS azfut11, + AZFUT12 AS azfut12, + RTRIM(AZCLSC) AS azclsc, + AZBSLN AS azbsln, + AZISLN AS azisln, + RTRIM(AZTTL2) AS azttl2, + RTRIM(AZICMA) AS azicma, + RTRIM(AZCURC) AS azcurc, + RTRIM(AZCATC) AS azcatc +FROM LGDAT.MAST diff --git a/config/modules/mkptgroup.json b/config/modules/mkptgroup.json new file mode 100644 index 0000000..04bba25 --- /dev/null +++ b/config/modules/mkptgroup.json @@ -0,0 +1,29 @@ +{ + "name": "mkptgroup", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.mkptgroup", + "staging_table": "pipekit_staging.mkptgroup", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Marketing Part Group", + "columns": [ + { + "source_name": "MAPGROUP", + "source_type": "CHAR(10)", + "dest_name": "mapgroup", + "dest_type": "text", + "description": "PART GROUP" + }, + { + "source_name": "MAPGDESC", + "source_type": "CHAR(60)", + "dest_name": "mapgdesc", + "dest_type": "text", + "description": "GROUP DESC" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/mkptgroup.sql b/config/modules/mkptgroup.sql new file mode 100644 index 0000000..b6504f5 --- /dev/null +++ b/config/modules/mkptgroup.sql @@ -0,0 +1,4 @@ +SELECT + RTRIM(MAPGROUP) AS mapgroup, + RTRIM(MAPGDESC) AS mapgdesc +FROM LGPGM.MKPTGROUP diff --git a/config/modules/moldmast.json b/config/modules/moldmast.json new file mode 100644 index 0000000..291c969 --- /dev/null +++ b/config/modules/moldmast.json @@ -0,0 +1,477 @@ +{ + "name": "moldmast", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.moldmast", + "staging_table": "pipekit_staging.moldmast", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Mold Master File", + "columns": [ + { + "source_name": "MMMOLD", + "source_type": "CHAR(8)", + "dest_name": "mmmold", + "dest_type": "text", + "description": "Mold" + }, + { + "source_name": "MMSDES", + "source_type": "CHAR(30)", + "dest_name": "mmsdes", + "dest_type": "text", + "description": "Product Short Description" + }, + { + "source_name": "MMLDES", + "source_type": "CHAR(75)", + "dest_name": "mmldes", + "dest_type": "text", + "description": "Product Long Description" + }, + { + "source_name": "MMMDCIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmmdciu", + "dest_type": "numeric(10,2)", + "description": "Max Dry" + }, + { + "source_name": "MMMLUUU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmmluuu", + "dest_type": "numeric(10,2)", + "description": "Max Liquid metric and Unit" + }, + { + "source_name": "MMODU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmodu", + "dest_type": "numeric(10,2)", + "description": "Outside Dimensions" + }, + { + "source_name": "MMIDU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmidu", + "dest_type": "numeric(10,2)", + "description": "Inside Dimensions" + }, + { + "source_name": "MMHTU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmhtu", + "dest_type": "numeric(10,2)", + "description": "Height" + }, + { + "source_name": "MMOWIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmowiu", + "dest_type": "numeric(10,2)", + "description": "Outside Width" + }, + { + "source_name": "MMOLIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmoliu", + "dest_type": "numeric(10,2)", + "description": "Outside Length" + }, + { + "source_name": "MMIWIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmiwiu", + "dest_type": "numeric(10,2)", + "description": "Inside Width" + }, + { + "source_name": "MMILIU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmiliu", + "dest_type": "numeric(10,2)", + "description": "Inside Length" + }, + { + "source_name": "MMPSU", + "source_type": "CHAR(14)", + "dest_name": "mmpsu", + "dest_type": "text", + "description": "Pallet Size" + }, + { + "source_name": "MMPHU", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmphu", + "dest_type": "numeric(10,2)", + "description": "Pallet Height" + }, + { + "source_name": "MMMDUOMU", + "source_type": "CHAR(5)", + "dest_name": "mmmduomu", + "dest_type": "text", + "description": "Max Dry UOM" + }, + { + "source_name": "MMMLUOMU", + "source_type": "CHAR(5)", + "dest_name": "mmmluomu", + "dest_type": "text", + "description": "Max Liquid UOM" + }, + { + "source_name": "MMODUOMU", + "source_type": "CHAR(5)", + "dest_name": "mmoduomu", + "dest_type": "text", + "description": "Outside Dimensions UOM" + }, + { + "source_name": "MMIDUOMU", + "source_type": "CHAR(5)", + "dest_name": "mmiduomu", + "dest_type": "text", + "description": "Inside Dimensions UOM" + }, + { + "source_name": "MMHUOMU", + "source_type": "CHAR(5)", + "dest_name": "mmhuomu", + "dest_type": "text", + "description": "Height UOM" + }, + { + "source_name": "MMOLWOMU", + "source_type": "CHAR(5)", + "dest_name": "mmolwomu", + "dest_type": "text", + "description": "Outside Width UOM" + }, + { + "source_name": "MMOLUOMU", + "source_type": "CHAR(5)", + "dest_name": "mmoluomu", + "dest_type": "text", + "description": "Outside Length UOM" + }, + { + "source_name": "MMIWUOMU", + "source_type": "CHAR(5)", + "dest_name": "mmiwuomu", + "dest_type": "text", + "description": "Inside Width UOM" + }, + { + "source_name": "MMILUOMU", + "source_type": "CHAR(5)", + "dest_name": "mmiluomu", + "dest_type": "text", + "description": "Inside Length UOM" + }, + { + "source_name": "MMPHUOMU", + "source_type": "CHAR(5)", + "dest_name": "mmphuomu", + "dest_type": "text", + "description": "Pallet Height UOM" + }, + { + "source_name": "MMMDCIM", + "source_type": "NUMERIC(11,5)", + "dest_name": "mmmdcim", + "dest_type": "numeric(11,5)", + "description": "Max Dry" + }, + { + "source_name": "MMMLUUM", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmmluum", + "dest_type": "numeric(10,2)", + "description": "Max Liquid metric and Unit" + }, + { + "source_name": "MMODM", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmodm", + "dest_type": "numeric(10,2)", + "description": "Outside Dimensions" + }, + { + "source_name": "MMIDM", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmidm", + "dest_type": "numeric(10,2)", + "description": "Inside Dimensions" + }, + { + "source_name": "MMHTM", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmhtm", + "dest_type": "numeric(10,2)", + "description": "Height" + }, + { + "source_name": "MMOWIM", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmowim", + "dest_type": "numeric(10,2)", + "description": "Outside Width" + }, + { + "source_name": "MMOLIM", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmolim", + "dest_type": "numeric(10,2)", + "description": "Outside Length" + }, + { + "source_name": "MMIWIM", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmiwim", + "dest_type": "numeric(10,2)", + "description": "Inside Width" + }, + { + "source_name": "MMILIM", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmilim", + "dest_type": "numeric(10,2)", + "description": "Inside Length" + }, + { + "source_name": "MMPSM", + "source_type": "CHAR(14)", + "dest_name": "mmpsm", + "dest_type": "text", + "description": "Pallet Size" + }, + { + "source_name": "MMPHM", + "source_type": "NUMERIC(10,2)", + "dest_name": "mmphm", + "dest_type": "numeric(10,2)", + "description": "Pallet Height" + }, + { + "source_name": "MMMDUOMM", + "source_type": "CHAR(5)", + "dest_name": "mmmduomm", + "dest_type": "text", + "description": "Max Dry UOM" + }, + { + "source_name": "MMMLUOMM", + "source_type": "CHAR(5)", + "dest_name": "mmmluomm", + "dest_type": "text", + "description": "Max Liquid UOM" + }, + { + "source_name": "MMODUOMM", + "source_type": "CHAR(5)", + "dest_name": "mmoduomm", + "dest_type": "text", + "description": "Outside Dimensions UOM" + }, + { + "source_name": "MMIDUOMM", + "source_type": "CHAR(5)", + "dest_name": "mmiduomm", + "dest_type": "text", + "description": "Inside Dimensions UOM" + }, + { + "source_name": "MMHUOMM", + "source_type": "CHAR(5)", + "dest_name": "mmhuomm", + "dest_type": "text", + "description": "Height UOM" + }, + { + "source_name": "MMOLWOMM", + "source_type": "CHAR(5)", + "dest_name": "mmolwomm", + "dest_type": "text", + "description": "Outside Width UOM" + }, + { + "source_name": "MMOLUOMM", + "source_type": "CHAR(5)", + "dest_name": "mmoluomm", + "dest_type": "text", + "description": "Outside Length UOM" + }, + { + "source_name": "MMIWUOMM", + "source_type": "CHAR(5)", + "dest_name": "mmiwuomm", + "dest_type": "text", + "description": "Inside Width UOM" + }, + { + "source_name": "MMILUOMM", + "source_type": "CHAR(5)", + "dest_name": "mmiluomm", + "dest_type": "text", + "description": "Inside Length UOM" + }, + { + "source_name": "MMPHUOMM", + "source_type": "CHAR(5)", + "dest_name": "mmphuomm", + "dest_type": "text", + "description": "Pallet Height UOM" + }, + { + "source_name": "MMFEATURE", + "source_type": "CHAR(30)", + "dest_name": "mmfeature", + "dest_type": "text", + "description": "Feature" + }, + { + "source_name": "MMFAMILY", + "source_type": "CHAR(40)", + "dest_name": "mmfamily", + "dest_type": "text", + "description": "Profile/Family" + }, + { + "source_name": "MMIMGURL", + "source_type": "CHAR(100)", + "dest_name": "mmimgurl", + "dest_type": "text", + "description": "Image Url" + }, + { + "source_name": "MMHEADER", + "source_type": "CHAR(30)", + "dest_name": "mmheader", + "dest_type": "text", + "description": "Header" + }, + { + "source_name": "MMBIGGROUP", + "source_type": "CHAR(25)", + "dest_name": "mmbiggroup", + "dest_type": "text", + "description": "Big group" + }, + { + "source_name": "MMSPONSOR", + "source_type": "CHAR(15)", + "dest_name": "mmsponsor", + "dest_type": "text", + "description": "Sponsor" + }, + { + "source_name": "MMCOMPAT", + "source_type": "CHAR(180)", + "dest_name": "mmcompat", + "dest_type": "text", + "description": "COMPATIBLES" + }, + { + "source_name": "MMHSORT", + "source_type": "DECIMAL(9,0)", + "dest_name": "mmhsort", + "dest_type": "numeric(9,0)", + "description": "HEADER SORT" + }, + { + "source_name": "MMDSORT", + "source_type": "DECIMAL(9,0)", + "dest_name": "mmdsort", + "dest_type": "numeric(9,0)", + "description": "DETAIL SORT" + }, + { + "source_name": "MMCCFG", + "source_type": "CHAR(20)", + "dest_name": "mmccfg", + "dest_type": "text", + "description": "Cell Configuration" + }, + { + "source_name": "MMFORMAT", + "source_type": "CHAR(20)", + "dest_name": "mmformat", + "dest_type": "text", + "description": "FORMAT" + }, + { + "source_name": "MMFORM_UOM", + "source_type": "CHAR(15)", + "dest_name": "mmform_uom", + "dest_type": "text", + "description": "FORMAT_UOM" + }, + { + "source_name": "MMFUNC", + "source_type": "CHAR(30)", + "dest_name": "mmfunc", + "dest_type": "text", + "description": "FUNCTION" + }, + { + "source_name": "MMPRTGRP", + "source_type": "CHAR(10)", + "dest_name": "mmprtgrp", + "dest_type": "text", + "description": "Part Group" + }, + { + "source_name": "MMPRICEG", + "source_type": "CHAR(50)", + "dest_name": "mmpriceg", + "dest_type": "text", + "description": "Priceg" + }, + { + "source_name": "MMSHAPE", + "source_type": "CHAR(15)", + "dest_name": "mmshape", + "dest_type": "text", + "description": "SHAPE" + }, + { + "source_name": "MMTSLT", + "source_type": "CHAR(1)", + "dest_name": "mmtslt", + "dest_type": "text", + "description": "Tag Slot" + }, + { + "source_name": "MMPLNT", + "source_type": "CHAR(21)", + "dest_name": "mmplnt", + "dest_type": "text", + "description": "Mmplnt" + }, + { + "source_name": "MMREAS", + "source_type": "CHAR(200)", + "dest_name": "mmreas", + "dest_type": "text", + "description": "MMreas" + }, + { + "source_name": "MMGRPSTAT", + "source_type": "CHAR(1)", + "dest_name": "mmgrpstat", + "dest_type": "text", + "description": "MMGrpStat" + }, + { + "source_name": "MMPRODGRP", + "source_type": "CHAR(10)", + "dest_name": "mmprodgrp", + "dest_type": "text", + "description": "MMProdGroup" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/moldmast.sql b/config/modules/moldmast.sql new file mode 100644 index 0000000..886b753 --- /dev/null +++ b/config/modules/moldmast.sql @@ -0,0 +1,68 @@ +SELECT + RTRIM(MMMOLD) AS mmmold, + RTRIM(MMSDES) AS mmsdes, + RTRIM(MMLDES) AS mmldes, + MMMDCIU AS mmmdciu, + MMMLUUU AS mmmluuu, + MMODU AS mmodu, + MMIDU AS mmidu, + MMHTU AS mmhtu, + MMOWIU AS mmowiu, + MMOLIU AS mmoliu, + MMIWIU AS mmiwiu, + MMILIU AS mmiliu, + RTRIM(MMPSU) AS mmpsu, + MMPHU AS mmphu, + RTRIM(MMMDUOMU) AS mmmduomu, + RTRIM(MMMLUOMU) AS mmmluomu, + RTRIM(MMODUOMU) AS mmoduomu, + RTRIM(MMIDUOMU) AS mmiduomu, + RTRIM(MMHUOMU) AS mmhuomu, + RTRIM(MMOLWOMU) AS mmolwomu, + RTRIM(MMOLUOMU) AS mmoluomu, + RTRIM(MMIWUOMU) AS mmiwuomu, + RTRIM(MMILUOMU) AS mmiluomu, + RTRIM(MMPHUOMU) AS mmphuomu, + MMMDCIM AS mmmdcim, + MMMLUUM AS mmmluum, + MMODM AS mmodm, + MMIDM AS mmidm, + MMHTM AS mmhtm, + MMOWIM AS mmowim, + MMOLIM AS mmolim, + MMIWIM AS mmiwim, + MMILIM AS mmilim, + RTRIM(MMPSM) AS mmpsm, + MMPHM AS mmphm, + RTRIM(MMMDUOMM) AS mmmduomm, + RTRIM(MMMLUOMM) AS mmmluomm, + RTRIM(MMODUOMM) AS mmoduomm, + RTRIM(MMIDUOMM) AS mmiduomm, + RTRIM(MMHUOMM) AS mmhuomm, + RTRIM(MMOLWOMM) AS mmolwomm, + RTRIM(MMOLUOMM) AS mmoluomm, + RTRIM(MMIWUOMM) AS mmiwuomm, + RTRIM(MMILUOMM) AS mmiluomm, + RTRIM(MMPHUOMM) AS mmphuomm, + RTRIM(MMFEATURE) AS mmfeature, + RTRIM(MMFAMILY) AS mmfamily, + RTRIM(MMIMGURL) AS mmimgurl, + RTRIM(MMHEADER) AS mmheader, + RTRIM(MMBIGGROUP) AS mmbiggroup, + RTRIM(MMSPONSOR) AS mmsponsor, + RTRIM(MMCOMPAT) AS mmcompat, + MMHSORT AS mmhsort, + MMDSORT AS mmdsort, + RTRIM(MMCCFG) AS mmccfg, + RTRIM(MMFORMAT) AS mmformat, + RTRIM(MMFORM_UOM) AS mmform_uom, + RTRIM(MMFUNC) AS mmfunc, + RTRIM(MMPRTGRP) AS mmprtgrp, + RTRIM(MMPRICEG) AS mmpriceg, + RTRIM(MMSHAPE) AS mmshape, + RTRIM(MMTSLT) AS mmtslt, + RTRIM(MMPLNT) AS mmplnt, + RTRIM(MMREAS) AS mmreas, + RTRIM(MMGRPSTAT) AS mmgrpstat, + RTRIM(MMPRODGRP) AS mmprodgrp +FROM LGPGM.MOLDMAST diff --git a/config/modules/name.json b/config/modules/name.json new file mode 100644 index 0000000..92fac73 --- /dev/null +++ b/config/modules/name.json @@ -0,0 +1,29 @@ +{ + "name": "name", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.name", + "staging_table": "pipekit_staging.name", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "G/L Master Codes File 6.0", + "columns": [ + { + "source_name": "A7", + "source_type": "CHAR(7)", + "dest_name": "a7", + "dest_type": "text", + "description": "Key" + }, + { + "source_name": "A249", + "source_type": "CHAR(249)", + "dest_name": "a249", + "dest_type": "text", + "description": "Rest of data" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/name.sql b/config/modules/name.sql new file mode 100644 index 0000000..e31d95e --- /dev/null +++ b/config/modules/name.sql @@ -0,0 +1,4 @@ +SELECT + RTRIM(A7) AS a7, + RTRIM(A249) AS a249 +FROM LGDAT.NAME diff --git a/config/modules/ocrh.json b/config/modules/ocrh.json new file mode 100644 index 0000000..b3c382c --- /dev/null +++ b/config/modules/ocrh.json @@ -0,0 +1,1240 @@ +{ + "name": "ocrh", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.ocrh", + "staging_table": "pipekit_staging.ocrh", + "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(9,0)", + "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(4,2)", + "description": "Commission percentage" + }, + { + "source_name": "DCCRAT", + "source_type": "NUMERIC(5,2)", + "dest_name": "dccrat", + "dest_type": "numeric(5,2)", + "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(3,0)", + "description": "Next description line no" + }, + { + "source_name": "DCTOTO", + "source_type": "NUMERIC(10,2)", + "dest_name": "dctoto", + "dest_type": "numeric(10,2)", + "description": "Net Total" + }, + { + "source_name": "DCTDIS", + "source_type": "NUMERIC(10,2)", + "dest_name": "dctdis", + "dest_type": "numeric(10,2)", + "description": "Total Discounts" + }, + { + "source_name": "DCTTAX", + "source_type": "NUMERIC(10,2)", + "dest_name": "dcttax", + "dest_type": "numeric(10,2)", + "description": "Tax Total" + }, + { + "source_name": "DCTFRT", + "source_type": "NUMERIC(10,2)", + "dest_name": "dctfrt", + "dest_type": "numeric(10,2)", + "description": "Freight Total" + }, + { + "source_name": "DCTWGT", + "source_type": "NUMERIC(10,2)", + "dest_name": "dctwgt", + "dest_type": "numeric(10,2)", + "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(10,2)", + "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(9,0)", + "description": "Last Invoice Created" + }, + { + "source_name": "DCOBAL", + "source_type": "NUMERIC(10,2)", + "dest_name": "dcobal", + "dest_type": "numeric(10,2)", + "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(9,0)", + "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(10,2)", + "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(10,2)", + "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(10,0)", + "description": "Future Field 10" + }, + { + "source_name": "DCFUT11", + "source_type": "NUMERIC(10,0)", + "dest_name": "dcfut11", + "dest_type": "numeric(10,0)", + "description": "Future Field 11" + }, + { + "source_name": "DCFUT12", + "source_type": "NUMERIC(11,2)", + "dest_name": "dcfut12", + "dest_type": "numeric(11,2)", + "description": "Future Field 12" + }, + { + "source_name": "DCFUT13", + "source_type": "NUMERIC(11,2)", + "dest_name": "dcfut13", + "dest_type": "numeric(11,2)", + "description": "Future Field 13" + }, + { + "source_name": "DCFUT14", + "source_type": "NUMERIC(15,5)", + "dest_name": "dcfut14", + "dest_type": "numeric(15,5)", + "description": "Future Field 14" + }, + { + "source_name": "DCFUT15", + "source_type": "NUMERIC(15,5)", + "dest_name": "dcfut15", + "dest_type": "numeric(15,5)", + "description": "Future Field 15" + }, + { + "source_name": "DCFUT16", + "source_type": "NUMERIC(15,5)", + "dest_name": "dcfut16", + "dest_type": "numeric(15,5)", + "description": "Future Field 16" + }, + { + "source_name": "DCFUT17", + "source_type": "NUMERIC(3,0)", + "dest_name": "dcfut17", + "dest_type": "numeric(3,0)", + "description": "Future Field 17" + }, + { + "source_name": "DCFUT18", + "source_type": "NUMERIC(3,0)", + "dest_name": "dcfut18", + "dest_type": "numeric(3,0)", + "description": "Future Field 18" + }, + { + "source_name": "DCFUT19", + "source_type": "NUMERIC(5,0)", + "dest_name": "dcfut19", + "dest_type": "numeric(5,0)", + "description": "Future Field 19" + }, + { + "source_name": "DCFUT20", + "source_type": "NUMERIC(5,0)", + "dest_name": "dcfut20", + "dest_type": "numeric(5,0)", + "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(4,0)", + "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(4,0)", + "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" + }, + { + "source_name": "DCFUT21", + "source_type": "CHAR(20)", + "dest_name": "dcfut21", + "dest_type": "text", + "description": "Future Field 21" + }, + { + "source_name": "DCFUT22", + "source_type": "CHAR(20)", + "dest_name": "dcfut22", + "dest_type": "text", + "description": "Future Field 22" + }, + { + "source_name": "DCFUT23", + "source_type": "CHAR(20)", + "dest_name": "dcfut23", + "dest_type": "text", + "description": "Future Field 23" + }, + { + "source_name": "DCFUT24", + "source_type": "CHAR(30)", + "dest_name": "dcfut24", + "dest_type": "text", + "description": "Future Field 24" + }, + { + "source_name": "DCFUT25", + "source_type": "CHAR(30)", + "dest_name": "dcfut25", + "dest_type": "text", + "description": "Future Field 25" + }, + { + "source_name": "DCFUT26", + "source_type": "CHAR(30)", + "dest_name": "dcfut26", + "dest_type": "text", + "description": "Future Field 26" + }, + { + "source_name": "DCSLSCH", + "source_type": "CHAR(10)", + "dest_name": "dcslsch", + "dest_type": "text", + "description": "Sales Channel Code" + }, + { + "source_name": "DCARBOI", + "source_type": "CHAR(1)", + "dest_name": "dcarboi", + "dest_type": "text", + "description": "Auto Release Bill by Order Invoice" + }, + { + "source_name": "DCBBORT", + "source_type": "CHAR(1)", + "dest_name": "dcbbort", + "dest_type": "text", + "description": "Bill by Order" + }, + { + "source_name": "DCPBBOR", + "source_type": "CHAR(1)", + "dest_name": "dcpbbor", + "dest_type": "text", + "description": "Post Bill by Order Invoice" + }, + { + "source_name": "DCSCPHN", + "source_type": "CHAR(20)", + "dest_name": "dcscphn", + "dest_type": "text", + "description": "Ship to Customer Phone" + }, + { + "source_name": "DC4473PN", + "source_type": "CHAR(20)", + "dest_name": "dc4473pn", + "dest_type": "text", + "description": "4473 Permit Number" + }, + { + "source_name": "DCSCONT", + "source_type": "CHAR(30)", + "dest_name": "dcscont", + "dest_type": "text", + "description": "Ship to Customer Contact" + }, + { + "source_name": "DCADRSN", + "source_type": "NUMERIC(10,0)", + "dest_name": "dcadrsn", + "dest_type": "numeric(10,0)", + "description": "Address Number" + }, + { + "source_name": "DCHFEE", + "source_type": "NUMERIC(11,2)", + "dest_name": "dchfee", + "dest_type": "numeric(11,2)", + "description": "Handling Fee Total" + }, + { + "source_name": "DCHFEETX", + "source_type": "NUMERIC(11,2)", + "dest_name": "dchfeetx", + "dest_type": "numeric(11,2)", + "description": "Freight Tax" + }, + { + "source_name": "DCAFAX", + "source_type": "CHAR(15)", + "dest_name": "dcafax", + "dest_type": "text", + "description": "Adhoc Fax Number" + }, + { + "source_name": "DCAEMAIL", + "source_type": "CHAR(50)", + "dest_name": "dcaemail", + "dest_type": "text", + "description": "Adhoc Email" + }, + { + "source_name": "DCFOID", + "source_type": "CHAR(20)", + "dest_name": "dcfoid", + "dest_type": "text", + "description": "State/County FOID" + } + ], + "watermarks": [ + { + "name": "ocrh_wm", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dcudat), DATE '1900-01-01') - 7 FROM cms.ocrh", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/ocrh.sql b/config/modules/ocrh.sql new file mode 100644 index 0000000..3f91101 --- /dev/null +++ b/config/modules/ocrh.sql @@ -0,0 +1,181 @@ +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, + RTRIM(DCFUT21) AS dcfut21, + RTRIM(DCFUT22) AS dcfut22, + RTRIM(DCFUT23) AS dcfut23, + RTRIM(DCFUT24) AS dcfut24, + RTRIM(DCFUT25) AS dcfut25, + RTRIM(DCFUT26) AS dcfut26, + RTRIM(DCSLSCH) AS dcslsch, + RTRIM(DCARBOI) AS dcarboi, + RTRIM(DCBBORT) AS dcbbort, + RTRIM(DCPBBOR) AS dcpbbor, + RTRIM(DCSCPHN) AS dcscphn, + RTRIM(DC4473PN) AS dc4473pn, + RTRIM(DCSCONT) AS dcscont, + DCADRSN AS dcadrsn, + DCHFEE AS dchfee, + DCHFEETX AS dchfeetx, + RTRIM(DCAFAX) AS dcafax, + RTRIM(DCAEMAIL) AS dcaemail, + RTRIM(DCFOID) AS dcfoid +FROM LGDAT.OCRH +WHERE + (dcudat BETWEEN '{ocrh_wm}' AND CURRENT_DATE) + OR (dcodat BETWEEN '{ocrh_wm}' AND CURRENT_DATE) + OR (dccdat BETWEEN '{ocrh_wm}' AND CURRENT_DATE) + diff --git a/config/modules/ocri.json b/config/modules/ocri.json new file mode 100644 index 0000000..72f464f --- /dev/null +++ b/config/modules/ocri.json @@ -0,0 +1,932 @@ +{ + "name": "ocri", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.ocri", + "staging_table": "pipekit_staging.ocri", + "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(9,0)", + "description": "Customer Order Number" + }, + { + "source_name": "DDITM#", + "source_type": "NUMERIC(3,0)", + "dest_name": "dditm#", + "dest_type": "numeric(3,0)", + "description": "Item Number" + }, + { + "source_name": "DDDES#", + "source_type": "NUMERIC(3,0)", + "dest_name": "dddes#", + "dest_type": "numeric(3,0)", + "description": "Description Number" + }, + { + "source_name": "DDQTOI", + "source_type": "NUMERIC(15,5)", + "dest_name": "ddqtoi", + "dest_type": "numeric(15,5)", + "description": "Quantity Ordered IU" + }, + { + "source_name": "DDQTBI", + "source_type": "NUMERIC(15,5)", + "dest_name": "ddqtbi", + "dest_type": "numeric(15,5)", + "description": "Quantity Backordered IU" + }, + { + "source_name": "DDQTSI", + "source_type": "NUMERIC(15,5)", + "dest_name": "ddqtsi", + "dest_type": "numeric(15,5)", + "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(12,5)", + "description": "Unit Price" + }, + { + "source_name": "DDTOTI", + "source_type": "NUMERIC(10,2)", + "dest_name": "ddtoti", + "dest_type": "numeric(10,2)", + "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(4,2)", + "description": "Comm. %" + }, + { + "source_name": "DDCRAT", + "source_type": "NUMERIC(5,2)", + "dest_name": "ddcrat", + "dest_type": "numeric(5,2)", + "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(15,5)", + "description": "Temporary - Used by Release" + }, + { + "source_name": "DDQTOO", + "source_type": "NUMERIC(10,2)", + "dest_name": "ddqtoo", + "dest_type": "numeric(10,2)", + "description": "Quantity Ordered OU" + }, + { + "source_name": "DDQTBO", + "source_type": "NUMERIC(15,5)", + "dest_name": "ddqtbo", + "dest_type": "numeric(15,5)", + "description": "Quantity Backordered OU" + }, + { + "source_name": "DDQTSO", + "source_type": "NUMERIC(15,5)", + "dest_name": "ddqtso", + "dest_type": "numeric(15,5)", + "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(15,5)", + "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(10,2)", + "description": "Base Total" + }, + { + "source_name": "DDTDIS", + "source_type": "NUMERIC(10,2)", + "dest_name": "ddtdis", + "dest_type": "numeric(10,2)", + "description": "Total Discounts" + }, + { + "source_name": "DDTTAX", + "source_type": "NUMERIC(10,2)", + "dest_name": "ddttax", + "dest_type": "numeric(10,2)", + "description": "Total Tax" + }, + { + "source_name": "DDTFRT", + "source_type": "NUMERIC(10,2)", + "dest_name": "ddtfrt", + "dest_type": "numeric(10,2)", + "description": "Total Freight" + }, + { + "source_name": "DDTWGT", + "source_type": "NUMERIC(10,2)", + "dest_name": "ddtwgt", + "dest_type": "numeric(10,2)", + "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(10,2)", + "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(7,0)", + "description": "Option List" + }, + { + "source_name": "DDCTMS", + "source_type": "TIMESTMP", + "dest_name": "ddctms", + "dest_type": "text", + "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(9,0)", + "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(15,5)", + "description": "Future Use" + }, + { + "source_name": "DDFUT8", + "source_type": "NUMERIC(15,5)", + "dest_name": "ddfut8", + "dest_type": "numeric(15,5)", + "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(9,0)", + "description": "Warranty Claim Number" + }, + { + "source_name": "DDWTCI", + "source_type": "NUMERIC(3,0)", + "dest_name": "ddwtci", + "dest_type": "numeric(3,0)", + "description": "Warranty Claim Dtl #" + }, + { + "source_name": "DDLDSQ", + "source_type": "NUMERIC(3,0)", + "dest_name": "ddldsq", + "dest_type": "numeric(3,0)", + "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(4,0)", + "description": "Promise Time" + }, + { + "source_name": "DDQTME", + "source_type": "NUMERIC(4,0)", + "dest_name": "ddqtme", + "dest_type": "numeric(4,0)", + "description": "Request Time" + }, + { + "source_name": "DDSTME", + "source_type": "NUMERIC(4,0)", + "dest_name": "ddstme", + "dest_type": "numeric(4,0)", + "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(4,0)", + "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(4,0)", + "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(3,0)", + "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(3,0)", + "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" + }, + { + "source_name": "DDFUT10", + "source_type": "CHAR(1)", + "dest_name": "ddfut10", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DDFUT11", + "source_type": "CHAR(1)", + "dest_name": "ddfut11", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DDFUT12", + "source_type": "CHAR(10)", + "dest_name": "ddfut12", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DDFUT13", + "source_type": "CHAR(10)", + "dest_name": "ddfut13", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DDFUT14", + "source_type": "CHAR(20)", + "dest_name": "ddfut14", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DDFUT15", + "source_type": "CHAR(20)", + "dest_name": "ddfut15", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DDFUT16", + "source_type": "CHAR(30)", + "dest_name": "ddfut16", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DDFUT17", + "source_type": "CHAR(30)", + "dest_name": "ddfut17", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DDFUT18", + "source_type": "NUMERIC(15,5)", + "dest_name": "ddfut18", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DDFUT19", + "source_type": "NUMERIC(15,5)", + "dest_name": "ddfut19", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DDFUT20", + "source_type": "NUMERIC(15,5)", + "dest_name": "ddfut20", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DDCONPT", + "source_type": "CHAR(1)", + "dest_name": "ddconpt", + "dest_type": "text", + "description": "Consignment Part" + }, + { + "source_name": "DDUFRT", + "source_type": "NUMERIC(12,4)", + "dest_name": "ddufrt", + "dest_type": "numeric(12,4)", + "description": "Per Unit Freight In Order Unit" + }, + { + "source_name": "DDHFEP", + "source_type": "NUMERIC(5,2)", + "dest_name": "ddhfep", + "dest_type": "numeric(5,2)", + "description": "Handling Fee Percentage" + }, + { + "source_name": "DDOGLDC", + "source_type": "CHAR(3)", + "dest_name": "ddogldc", + "dest_type": "text", + "description": "Original GL Sales Distribution Code" + }, + { + "source_name": "DDDRSF", + "source_type": "CHAR(10)", + "dest_name": "dddrsf", + "dest_type": "text", + "description": "Drop-ship Surcharge Flag" + }, + { + "source_name": "DDODBUY", + "source_type": "CHAR(1)", + "dest_name": "ddodbuy", + "dest_type": "text", + "description": "Direct Buy Flag" + }, + { + "source_name": "DDATSPG", + "source_type": "CHAR(10)", + "dest_name": "ddatspg", + "dest_type": "text", + "description": "ATS Pick Group" + }, + { + "source_name": "DDWCOD", + "source_type": "CHAR(10)", + "dest_name": "ddwcod", + "dest_type": "text", + "description": "Enhanced Warranty" + }, + { + "source_name": "DD3PNM", + "source_type": "NUMERIC(9,0)", + "dest_name": "dd3pnm", + "dest_type": "numeric(9,0)", + "description": "Warranted Product Number" + }, + { + "source_name": "DDWEOR", + "source_type": "NUMERIC(9,0)", + "dest_name": "ddweor", + "dest_type": "numeric(9,0)", + "description": "Service Contract Sales Order Number" + }, + { + "source_name": "DDWEOI", + "source_type": "NUMERIC(3,0)", + "dest_name": "ddweoi", + "dest_type": "numeric(3,0)", + "description": "Service Contract Sales Order Item Number" + }, + { + "source_name": "DDAGRM", + "source_type": "CHAR(10)", + "dest_name": "ddagrm", + "dest_type": "text", + "description": "Service Contract OCRI Linked Service Agreement" + }, + { + "source_name": "DDRNDR", + "source_type": "NUMERIC(6,0)", + "dest_name": "ddrndr", + "dest_type": "numeric(6,0)", + "description": "Return Authorization Document Number" + }, + { + "source_name": "DDRNDI", + "source_type": "NUMERIC(4,0)", + "dest_name": "ddrndi", + "dest_type": "numeric(4,0)", + "description": "Return Authorization Document Item Number" + } + ], + "watermarks": [ + { + "name": "ocri_wm", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dcudat), DATE '1900-01-01') - 7 FROM cms.ocrh", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/ocri.sql b/config/modules/ocri.sql new file mode 100644 index 0000000..2beb13b --- /dev/null +++ b/config/modules/ocri.sql @@ -0,0 +1,140 @@ +WITH changed AS ( + SELECT dcord# FROM lgdat.ocrh WHERE dcudat BETWEEN '{ocri_wm}' AND CURRENT_DATE + UNION + SELECT dcord# FROM lgdat.ocrh WHERE dcodat BETWEEN '{ocri_wm}' AND CURRENT_DATE + UNION + SELECT dcord# FROM lgdat.ocrh WHERE dccdat BETWEEN '{ocri_wm}' AND CURRENT_DATE +) +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, + RTRIM(DDFUT10) AS ddfut10, + RTRIM(DDFUT11) AS ddfut11, + RTRIM(DDFUT12) AS ddfut12, + RTRIM(DDFUT13) AS ddfut13, + RTRIM(DDFUT14) AS ddfut14, + RTRIM(DDFUT15) AS ddfut15, + RTRIM(DDFUT16) AS ddfut16, + RTRIM(DDFUT17) AS ddfut17, + DDFUT18 AS ddfut18, + DDFUT19 AS ddfut19, + DDFUT20 AS ddfut20, + RTRIM(DDCONPT) AS ddconpt, + DDUFRT AS ddufrt, + DDHFEP AS ddhfep, + RTRIM(DDOGLDC) AS ddogldc, + RTRIM(DDDRSF) AS dddrsf, + RTRIM(DDODBUY) AS ddodbuy, + RTRIM(DDATSPG) AS ddatspg, + RTRIM(DDWCOD) AS ddwcod, + DD3PNM AS dd3pnm, + DDWEOR AS ddweor, + DDWEOI AS ddweoi, + RTRIM(DDAGRM) AS ddagrm, + DDRNDR AS ddrndr, + DDRNDI AS ddrndi +FROM LGDAT.OCRI i +INNER JOIN changed c ON c.dcord# = i.ddord# diff --git a/config/modules/ocrs.json b/config/modules/ocrs.json new file mode 100644 index 0000000..6e66711 --- /dev/null +++ b/config/modules/ocrs.json @@ -0,0 +1,127 @@ +{ + "name": "ocrs", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.ocrs", + "staging_table": "pipekit_staging.ocrs", + "merge_strategy": "incremental", + "merge_key": "fford#", + "enabled": 1, + "dest_description": "Order Discounts/Charges 6.0", + "columns": [ + { + "source_name": "FFORD#", + "source_type": "NUMERIC(9,0)", + "dest_name": "fford#", + "dest_type": "numeric(9,0)", + "description": "Customer Order Number" + }, + { + "source_name": "FFITM#", + "source_type": "NUMERIC(3,0)", + "dest_name": "ffitm#", + "dest_type": "numeric(3,0)", + "description": "Item Number" + }, + { + "source_name": "FFDIS#", + "source_type": "NUMERIC(3,0)", + "dest_name": "ffdis#", + "dest_type": "numeric(3,0)", + "description": "Discount Number" + }, + { + "source_name": "FFDISC", + "source_type": "CHAR(3)", + "dest_name": "ffdisc", + "dest_type": "text", + "description": "Discount Code" + }, + { + "source_name": "FFDDES", + "source_type": "CHAR(30)", + "dest_name": "ffddes", + "dest_type": "text", + "description": "Discount Description" + }, + { + "source_name": "FFDRCR", + "source_type": "CHAR(1)", + "dest_name": "ffdrcr", + "dest_type": "text", + "description": "Debit Credit" + }, + { + "source_name": "FFBANT", + "source_type": "CHAR(1)", + "dest_name": "ffbant", + "dest_type": "text", + "description": "Rate Base" + }, + { + "source_name": "FFPERC", + "source_type": "NUMERIC(8,5)", + "dest_name": "ffperc", + "dest_type": "numeric(8,5)", + "description": "Discount Percent" + }, + { + "source_name": "FFDAMT", + "source_type": "NUMERIC(13,5)", + "dest_name": "ffdamt", + "dest_type": "numeric(13,5)", + "description": "Discount Amount" + }, + { + "source_name": "FFAPER", + "source_type": "CHAR(1)", + "dest_name": "ffaper", + "dest_type": "text", + "description": "Fixed or per Unit" + }, + { + "source_name": "FFDEXT", + "source_type": "NUMERIC(10,2)", + "dest_name": "ffdext", + "dest_type": "numeric(10,2)", + "description": "Discount Extension" + }, + { + "source_name": "FFAUNT", + "source_type": "CHAR(3)", + "dest_name": "ffaunt", + "dest_type": "text", + "description": "Amount Per-Unit" + }, + { + "source_name": "FFRTEF", + "source_type": "CHAR(1)", + "dest_name": "ffrtef", + "dest_type": "text", + "description": "Rate Flag" + }, + { + "source_name": "FFRNDD", + "source_type": "NUMERIC(2,0)", + "dest_name": "ffrndd", + "dest_type": "numeric(2,0)", + "description": "Rounding # of Decimals" + }, + { + "source_name": "FFAPLY", + "source_type": "CHAR(1)", + "dest_name": "ffaply", + "dest_type": "text", + "description": "Fixed Discount Applied" + } + ], + "watermarks": [ + { + "name": "ocrs_wm", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dcudat), DATE '1900-01-01') - 7 FROM cms.ocrh", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/ocrs.sql b/config/modules/ocrs.sql new file mode 100644 index 0000000..14077d5 --- /dev/null +++ b/config/modules/ocrs.sql @@ -0,0 +1,23 @@ +WITH changed AS ( + SELECT dcord# FROM lgdat.ocrh WHERE dcudat BETWEEN '{ocrs_wm}' AND CURRENT_DATE + UNION SELECT dcord# FROM lgdat.ocrh WHERE dcodat BETWEEN '{ocrs_wm}' AND CURRENT_DATE + UNION SELECT dcord# FROM lgdat.ocrh WHERE dccdat BETWEEN '{ocrs_wm}' AND CURRENT_DATE +) +SELECT + "FFORD#" AS "fford#", + "FFITM#" AS "ffitm#", + "FFDIS#" AS "ffdis#", + RTRIM(FFDISC) AS ffdisc, + RTRIM(FFDDES) AS ffddes, + RTRIM(FFDRCR) AS ffdrcr, + RTRIM(FFBANT) AS ffbant, + FFPERC AS ffperc, + FFDAMT AS ffdamt, + RTRIM(FFAPER) AS ffaper, + FFDEXT AS ffdext, + RTRIM(FFAUNT) AS ffaunt, + RTRIM(FFRTEF) AS ffrtef, + FFRNDD AS ffrndd, + RTRIM(FFAPLY) AS ffaply +FROM LGDAT.OCRS +WHERE "FFORD#" IN (SELECT dcord# FROM changed) diff --git a/config/modules/oid.json b/config/modules/oid.json new file mode 100644 index 0000000..3aa369e --- /dev/null +++ b/config/modules/oid.json @@ -0,0 +1,631 @@ +{ + "name": "oid", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.oid", + "staging_table": "pipekit_staging.oid", + "merge_strategy": "incremental", + "merge_key": "diinv#", + "enabled": 1, + "dest_description": "Invoice detail file 6.1", + "columns": [ + { + "source_name": "DIINV#", + "source_type": "NUMERIC(9,0)", + "dest_name": "diinv#", + "dest_type": "numeric(9,0)", + "description": "Invoice Number" + }, + { + "source_name": "DILIN#", + "source_type": "NUMERIC(3,0)", + "dest_name": "dilin#", + "dest_type": "numeric(3,0)", + "description": "Detail Number" + }, + { + "source_name": "DIORD#", + "source_type": "NUMERIC(9,0)", + "dest_name": "diord#", + "dest_type": "numeric(9,0)", + "description": "Customer Order Number" + }, + { + "source_name": "DIITM#", + "source_type": "NUMERIC(3,0)", + "dest_name": "diitm#", + "dest_type": "numeric(3,0)", + "description": "Item Number" + }, + { + "source_name": "DIQTBO", + "source_type": "NUMERIC(15,5)", + "dest_name": "diqtbo", + "dest_type": "numeric(15,5)", + "description": "Quantity Backordered" + }, + { + "source_name": "DIQTSH", + "source_type": "NUMERIC(15,5)", + "dest_name": "diqtsh", + "dest_type": "numeric(15,5)", + "description": "Quantity Shipped" + }, + { + "source_name": "DIUNIT", + "source_type": "CHAR(3)", + "dest_name": "diunit", + "dest_type": "text", + "description": "Unit of Measure" + }, + { + "source_name": "DIPRIC", + "source_type": "NUMERIC(12,5)", + "dest_name": "dipric", + "dest_type": "numeric(12,5)", + "description": "Unit Price" + }, + { + "source_name": "DIPRUN", + "source_type": "CHAR(3)", + "dest_name": "diprun", + "dest_type": "text", + "description": "Pricing Unit" + }, + { + "source_name": "DIRETP", + "source_type": "NUMERIC(12,5)", + "dest_name": "diretp", + "dest_type": "numeric(12,5)", + "description": "Last Retro Price" + }, + { + "source_name": "DIRETU", + "source_type": "CHAR(3)", + "dest_name": "diretu", + "dest_type": "text", + "description": "Retro Price Unit" + }, + { + "source_name": "DIEXT", + "source_type": "NUMERIC(10,2)", + "dest_name": "diext", + "dest_type": "numeric(10,2)", + "description": "Extension" + }, + { + "source_name": "DIPSTX", + "source_type": "CHAR(1)", + "dest_name": "dipstx", + "dest_type": "text", + "description": "PST Exempt" + }, + { + "source_name": "DIFTXC", + "source_type": "CHAR(3)", + "dest_name": "diftxc", + "dest_type": "text", + "description": "FST Code" + }, + { + "source_name": "DITXGR", + "source_type": "CHAR(3)", + "dest_name": "ditxgr", + "dest_type": "text", + "description": "Tax Group" + }, + { + "source_name": "DITXRT", + "source_type": "CHAR(1)", + "dest_name": "ditxrt", + "dest_type": "text", + "description": "Tax Rate" + }, + { + "source_name": "DIDESC", + "source_type": "CHAR(30)", + "dest_name": "didesc", + "dest_type": "text", + "description": "Description" + }, + { + "source_name": "DIMAJR", + "source_type": "CHAR(3)", + "dest_name": "dimajr", + "dest_type": "text", + "description": "Major Sales Code" + }, + { + "source_name": "DIMINR", + "source_type": "CHAR(3)", + "dest_name": "diminr", + "dest_type": "text", + "description": "Minor Sales Code" + }, + { + "source_name": "DIPART", + "source_type": "CHAR(20)", + "dest_name": "dipart", + "dest_type": "text", + "description": "Part Number" + }, + { + "source_name": "DIPREP", + "source_type": "CHAR(1)", + "dest_name": "diprep", + "dest_type": "text", + "description": "Prepaid bl.flag" + }, + { + "source_name": "DIRELN", + "source_type": "CHAR(8)", + "dest_name": "direln", + "dest_type": "text", + "description": "Release Number" + }, + { + "source_name": "DIGLCD", + "source_type": "CHAR(3)", + "dest_name": "diglcd", + "dest_type": "text", + "description": "G/L Sales Code" + }, + { + "source_name": "DIREAS", + "source_type": "CHAR(2)", + "dest_name": "direas", + "dest_type": "text", + "description": "Reason Code" + }, + { + "source_name": "DISLMN", + "source_type": "CHAR(5)", + "dest_name": "dislmn", + "dest_type": "text", + "description": "Salesman Code" + }, + { + "source_name": "DICPCT", + "source_type": "NUMERIC(4,2)", + "dest_name": "dicpct", + "dest_type": "numeric(4,2)", + "description": "Comm. %" + }, + { + "source_name": "DICRAT", + "source_type": "NUMERIC(5,2)", + "dest_name": "dicrat", + "dest_type": "numeric(5,2)", + "description": "Comm. Rate" + }, + { + "source_name": "DICOST", + "source_type": "NUMERIC(12,5)", + "dest_name": "dicost", + "dest_type": "numeric(12,5)", + "description": "Unit Cost" + }, + { + "source_name": "DICTEX", + "source_type": "NUMERIC(12,5)", + "dest_name": "dictex", + "dest_type": "numeric(12,5)", + "description": "Cost Extension" + }, + { + "source_name": "DIQTSO", + "source_type": "NUMERIC(15,5)", + "dest_name": "diqtso", + "dest_type": "numeric(15,5)", + "description": "Quantity Shipped Or." + }, + { + "source_name": "DIORUN", + "source_type": "CHAR(3)", + "dest_name": "diorun", + "dest_type": "text", + "description": "Order Unit" + }, + { + "source_name": "DIQTSP", + "source_type": "NUMERIC(15,5)", + "dest_name": "diqtsp", + "dest_type": "numeric(15,5)", + "description": "Quantity Shipped Pr." + }, + { + "source_name": "DIEXTN", + "source_type": "NUMERIC(10,2)", + "dest_name": "diextn", + "dest_type": "numeric(10,2)", + "description": "Extension No disc/tax" + }, + { + "source_name": "DITDIS", + "source_type": "NUMERIC(10,2)", + "dest_name": "ditdis", + "dest_type": "numeric(10,2)", + "description": "Total Discounts" + }, + { + "source_name": "DIPSTA", + "source_type": "NUMERIC(10,2)", + "dest_name": "dipsta", + "dest_type": "numeric(10,2)", + "description": "PST Amount" + }, + { + "source_name": "DIFSTA", + "source_type": "NUMERIC(10,2)", + "dest_name": "difsta", + "dest_type": "numeric(10,2)", + "description": "FST Amount" + }, + { + "source_name": "DITAXA", + "source_type": "NUMERIC(10,2)", + "dest_name": "ditaxa", + "dest_type": "numeric(10,2)", + "description": "Tax Amount" + }, + { + "source_name": "DIFTAM", + "source_type": "NUMERIC(10,2)", + "dest_name": "diftam", + "dest_type": "numeric(10,2)", + "description": "Prepaid Freight Amount" + }, + { + "source_name": "DISTKL", + "source_type": "CHAR(6)", + "dest_name": "distkl", + "dest_type": "text", + "description": "Stock Location" + }, + { + "source_name": "DILBCT", + "source_type": "NUMERIC(12,5)", + "dest_name": "dilbct", + "dest_type": "numeric(12,5)", + "description": "Labour Unit Cost" + }, + { + "source_name": "DIBRCT", + "source_type": "NUMERIC(12,5)", + "dest_name": "dibrct", + "dest_type": "numeric(12,5)", + "description": "Burden Unit Cost" + }, + { + "source_name": "DIMLCT", + "source_type": "NUMERIC(12,5)", + "dest_name": "dimlct", + "dest_type": "numeric(12,5)", + "description": "Matl Unit Cost" + }, + { + "source_name": "DIOTCT", + "source_type": "NUMERIC(12,5)", + "dest_name": "diotct", + "dest_type": "numeric(12,5)", + "description": "Other Unit Cost" + }, + { + "source_name": "DIRAN", + "source_type": "CHAR(20)", + "dest_name": "diran", + "dest_type": "text", + "description": "RAN Number" + }, + { + "source_name": "DIOLST", + "source_type": "NUMERIC(7,0)", + "dest_name": "diolst", + "dest_type": "numeric(7,0)", + "description": "Option List" + }, + { + "source_name": "DIFUT1", + "source_type": "CHAR(1)", + "dest_name": "difut1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT2", + "source_type": "CHAR(1)", + "dest_name": "difut2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT3", + "source_type": "CHAR(1)", + "dest_name": "difut3", + "dest_type": "text", + "description": "Service Contract Invoice?" + }, + { + "source_name": "DIFUT4", + "source_type": "CHAR(10)", + "dest_name": "difut4", + "dest_type": "text", + "description": "Original GL Sales Distribution Code" + }, + { + "source_name": "DIFUT5", + "source_type": "CHAR(10)", + "dest_name": "difut5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT6", + "source_type": "CHAR(20)", + "dest_name": "difut6", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIBRFC", + "source_type": "NUMERIC(12,5)", + "dest_name": "dibrfc", + "dest_type": "numeric(12,5)", + "description": "Burden Unit (Fixed)" + }, + { + "source_name": "DIBRVC", + "source_type": "NUMERIC(12,5)", + "dest_name": "dibrvc", + "dest_type": "numeric(12,5)", + "description": "Burden Unit (Var)" + }, + { + "source_name": "DIFUT7", + "source_type": "NUMERIC(15,5)", + "dest_name": "difut7", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DIFUT8", + "source_type": "NUMERIC(15,5)", + "dest_name": "difut8", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DIBLHL", + "source_type": "CHAR(1)", + "dest_name": "diblhl", + "dest_type": "text", + "description": "Bill -and-hold Type" + }, + { + "source_name": "DIIRNK", + "source_type": "NUMERIC(10,0)", + "dest_name": "diirnk", + "dest_type": "numeric(10,0)", + "description": "Invoice Record No" + }, + { + "source_name": "DISTPR", + "source_type": "NUMERIC(4,0)", + "dest_name": "distpr", + "dest_type": "numeric(4,0)", + "description": "Stock Trans Period" + }, + { + "source_name": "DIPJCD", + "source_type": "CHAR(20)", + "dest_name": "dipjcd", + "dest_type": "text", + "description": "Project Code" + }, + { + "source_name": "DIWCN", + "source_type": "NUMERIC(9,0)", + "dest_name": "diwcn", + "dest_type": "numeric(9,0)", + "description": "Warranty Claim Number" + }, + { + "source_name": "DIWCDN", + "source_type": "NUMERIC(3,0)", + "dest_name": "diwcdn", + "dest_type": "numeric(3,0)", + "description": "Warranty Claim Detail" + }, + { + "source_name": "DIADAL", + "source_type": "CHAR(1)", + "dest_name": "diadal", + "dest_type": "text", + "description": "Advertising Allowance" + }, + { + "source_name": "DIACRN", + "source_type": "NUMERIC(9,0)", + "dest_name": "diacrn", + "dest_type": "numeric(9,0)", + "description": "Advertising Allowance Credit Note #" + }, + { + "source_name": "DIACRL", + "source_type": "NUMERIC(3,0)", + "dest_name": "diacrl", + "dest_type": "numeric(3,0)", + "description": "Advertising Allowance Credit Note Line #" + }, + { + "source_name": "DIVSXF", + "source_type": "CHAR(1)", + "dest_name": "divsxf", + "dest_type": "text", + "description": "Invoice Created for Virtual Sales" + }, + { + "source_name": "DISRVC", + "source_type": "CHAR(1)", + "dest_name": "disrvc", + "dest_type": "text", + "description": "Service Charge OID" + }, + { + "source_name": "DIEXCR", + "source_type": "NUMERIC(11,6)", + "dest_name": "diexcr", + "dest_type": "numeric(11,6)", + "description": "Currency Exchange Rate" + }, + { + "source_name": "DIFDAT", + "source_type": "DATE", + "dest_name": "difdat", + "dest_type": "date", + "description": "Service Charge Inv Period From Date" + }, + { + "source_name": "DITDAT", + "source_type": "DATE", + "dest_name": "ditdat", + "dest_type": "date", + "description": "Service Charge Inv Period To Date" + }, + { + "source_name": "DIRBIV", + "source_type": "NUMERIC(9,0)", + "dest_name": "dirbiv", + "dest_type": "numeric(9,0)", + "description": "Last Retro Billing Invoice No." + }, + { + "source_name": "DIRBIL", + "source_type": "NUMERIC(3,0)", + "dest_name": "dirbil", + "dest_type": "numeric(3,0)", + "description": "Last Retro Billing Invoice Line No" + }, + { + "source_name": "DISONM", + "source_type": "CHAR(10)", + "dest_name": "disonm", + "dest_type": "text", + "description": "Service Ticket Number" + }, + { + "source_name": "DISOLN", + "source_type": "NUMERIC(3,0)", + "dest_name": "disoln", + "dest_type": "numeric(3,0)", + "description": "Service Ticket Line No" + }, + { + "source_name": "DIMMEL", + "source_type": "CHAR(1)", + "dest_name": "dimmel", + "dest_type": "text", + "description": "Min/Max Lock" + }, + { + "source_name": "DIOITM", + "source_type": "NUMERIC(3,0)", + "dest_name": "dioitm", + "dest_type": "numeric(3,0)", + "description": "Item Number" + }, + { + "source_name": "DIFUT9", + "source_type": "CHAR(1)", + "dest_name": "difut9", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT10", + "source_type": "CHAR(1)", + "dest_name": "difut10", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT11", + "source_type": "CHAR(1)", + "dest_name": "difut11", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT12", + "source_type": "CHAR(10)", + "dest_name": "difut12", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT13", + "source_type": "CHAR(10)", + "dest_name": "difut13", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT14", + "source_type": "CHAR(10)", + "dest_name": "difut14", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT15", + "source_type": "CHAR(20)", + "dest_name": "difut15", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT16", + "source_type": "CHAR(20)", + "dest_name": "difut16", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT17", + "source_type": "CHAR(20)", + "dest_name": "difut17", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DIFUT18", + "source_type": "NUMERIC(15,5)", + "dest_name": "difut18", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DIFUT19", + "source_type": "NUMERIC(15,5)", + "dest_name": "difut19", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DIFUT20", + "source_type": "NUMERIC(15,5)", + "dest_name": "difut20", + "dest_type": "numeric(15,5)", + "description": "Future Use" + } + ], + "watermarks": [ + { + "name": "oid_wm", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dhidat), DATE '1900-01-01') - 30 FROM cms.oih WHERE dhidat <= CURRENT_DATE", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/oid.sql b/config/modules/oid.sql new file mode 100644 index 0000000..68cd9f9 --- /dev/null +++ b/config/modules/oid.sql @@ -0,0 +1,95 @@ +WITH changed AS ( + SELECT "DHINV#" FROM lgdat.oih WHERE DHIDAT BETWEEN '{oid_wm}' AND CURRENT_DATE + UNION SELECT "DHINV#" FROM lgdat.oih WHERE DHPDAT BETWEEN '{oid_wm}' AND CURRENT_DATE + UNION SELECT "DHINV#" FROM lgdat.oih WHERE DHPOST <> 'Y' +) +SELECT + "DIINV#" AS "diinv#", + "DILIN#" AS "dilin#", + "DIORD#" AS "diord#", + "DIITM#" AS "diitm#", + DIQTBO AS diqtbo, + DIQTSH AS diqtsh, + RTRIM(DIUNIT) AS diunit, + DIPRIC AS dipric, + RTRIM(DIPRUN) AS diprun, + DIRETP AS diretp, + RTRIM(DIRETU) AS diretu, + DIEXT AS diext, + RTRIM(DIPSTX) AS dipstx, + RTRIM(DIFTXC) AS diftxc, + RTRIM(DITXGR) AS ditxgr, + RTRIM(DITXRT) AS ditxrt, + RTRIM(DIDESC) AS didesc, + RTRIM(DIMAJR) AS dimajr, + RTRIM(DIMINR) AS diminr, + RTRIM(DIPART) AS dipart, + RTRIM(DIPREP) AS diprep, + RTRIM(DIRELN) AS direln, + RTRIM(DIGLCD) AS diglcd, + RTRIM(DIREAS) AS direas, + RTRIM(DISLMN) AS dislmn, + DICPCT AS dicpct, + DICRAT AS dicrat, + DICOST AS dicost, + DICTEX AS dictex, + DIQTSO AS diqtso, + RTRIM(DIORUN) AS diorun, + DIQTSP AS diqtsp, + DIEXTN AS diextn, + DITDIS AS ditdis, + DIPSTA AS dipsta, + DIFSTA AS difsta, + DITAXA AS ditaxa, + DIFTAM AS diftam, + RTRIM(DISTKL) AS distkl, + DILBCT AS dilbct, + DIBRCT AS dibrct, + DIMLCT AS dimlct, + DIOTCT AS diotct, + RTRIM(DIRAN) AS diran, + DIOLST AS diolst, + RTRIM(DIFUT1) AS difut1, + RTRIM(DIFUT2) AS difut2, + RTRIM(DIFUT3) AS difut3, + RTRIM(DIFUT4) AS difut4, + RTRIM(DIFUT5) AS difut5, + RTRIM(DIFUT6) AS difut6, + DIBRFC AS dibrfc, + DIBRVC AS dibrvc, + DIFUT7 AS difut7, + DIFUT8 AS difut8, + RTRIM(DIBLHL) AS diblhl, + DIIRNK AS diirnk, + DISTPR AS distpr, + RTRIM(DIPJCD) AS dipjcd, + DIWCN AS diwcn, + DIWCDN AS diwcdn, + RTRIM(DIADAL) AS diadal, + DIACRN AS diacrn, + DIACRL AS diacrl, + RTRIM(DIVSXF) AS divsxf, + RTRIM(DISRVC) AS disrvc, + DIEXCR AS diexcr, + CASE WHEN DIFDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DIFDAT END AS difdat, + CASE WHEN DITDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DITDAT END AS ditdat, + DIRBIV AS dirbiv, + DIRBIL AS dirbil, + RTRIM(DISONM) AS disonm, + DISOLN AS disoln, + RTRIM(DIMMEL) AS dimmel, + DIOITM AS dioitm, + RTRIM(DIFUT9) AS difut9, + RTRIM(DIFUT10) AS difut10, + RTRIM(DIFUT11) AS difut11, + RTRIM(DIFUT12) AS difut12, + RTRIM(DIFUT13) AS difut13, + RTRIM(DIFUT14) AS difut14, + RTRIM(DIFUT15) AS difut15, + RTRIM(DIFUT16) AS difut16, + RTRIM(DIFUT17) AS difut17, + DIFUT18 AS difut18, + DIFUT19 AS difut19, + DIFUT20 AS difut20 +FROM LGDAT.OID +WHERE "DIINV#" IN (SELECT "DHINV#" FROM changed) diff --git a/config/modules/oih.json b/config/modules/oih.json new file mode 100644 index 0000000..196a385 --- /dev/null +++ b/config/modules/oih.json @@ -0,0 +1,932 @@ +{ + "name": "oih", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.oih", + "staging_table": "pipekit_staging.oih", + "merge_strategy": "incremental", + "merge_key": "dhinv#", + "enabled": 1, + "dest_description": "Invoice Header File 6.1", + "columns": [ + { + "source_name": "DHINV#", + "source_type": "NUMERIC(9,0)", + "dest_name": "dhinv#", + "dest_type": "numeric(9,0)", + "description": "Invoice Number" + }, + { + "source_name": "DHIDAT", + "source_type": "DATE", + "dest_name": "dhidat", + "dest_type": "date", + "description": "Invoice Date" + }, + { + "source_name": "DHPTCP", + "source_type": "CHAR(1)", + "dest_name": "dhptcp", + "dest_type": "text", + "description": "Complete/ Partial" + }, + { + "source_name": "DHCONS", + "source_type": "CHAR(1)", + "dest_name": "dhcons", + "dest_type": "text", + "description": "Consolidated (Y/N)" + }, + { + "source_name": "DHPOST", + "source_type": "CHAR(1)", + "dest_name": "dhpost", + "dest_type": "text", + "description": "Invoice Posted to A/R G/L" + }, + { + "source_name": "DHBCS#", + "source_type": "CHAR(8)", + "dest_name": "dhbcs#", + "dest_type": "text", + "description": "Bill-to Customer" + }, + { + "source_name": "DHSCS#", + "source_type": "CHAR(8)", + "dest_name": "dhscs#", + "dest_type": "text", + "description": "Ship-to Customer" + }, + { + "source_name": "DHBNAM", + "source_type": "CHAR(30)", + "dest_name": "dhbnam", + "dest_type": "text", + "description": "Bill-to Name" + }, + { + "source_name": "DHBPOS", + "source_type": "CHAR(30)", + "dest_name": "dhbpos", + "dest_type": "text", + "description": "Bill-to Post Code" + }, + { + "source_name": "DHATTN", + "source_type": "CHAR(25)", + "dest_name": "dhattn", + "dest_type": "text", + "description": "Attention" + }, + { + "source_name": "DHTRCD", + "source_type": "CHAR(2)", + "dest_name": "dhtrcd", + "dest_type": "text", + "description": "Terms Code" + }, + { + "source_name": "DHRINV", + "source_type": "NUMERIC(9,0)", + "dest_name": "dhrinv", + "dest_type": "numeric(9,0)", + "description": "Reference Invoice" + }, + { + "source_name": "DHNU12", + "source_type": "CHAR(12)", + "dest_name": "dhnu12", + "dest_type": "text", + "description": "Used By Cash OE" + }, + { + "source_name": "DHFTAM", + "source_type": "NUMERIC(10,2)", + "dest_name": "dhftam", + "dest_type": "numeric(10,2)", + "description": "Total Prepaid Freight" + }, + { + "source_name": "DHSNAM", + "source_type": "CHAR(30)", + "dest_name": "dhsnam", + "dest_type": "text", + "description": "Ship-to Name" + }, + { + "source_name": "DHSAD1", + "source_type": "CHAR(35)", + "dest_name": "dhsad1", + "dest_type": "text", + "description": "Ship-to Address1" + }, + { + "source_name": "DHSAD2", + "source_type": "CHAR(35)", + "dest_name": "dhsad2", + "dest_type": "text", + "description": "Ship-to Address2" + }, + { + "source_name": "DHSAD3", + "source_type": "CHAR(35)", + "dest_name": "dhsad3", + "dest_type": "text", + "description": "Ship-to Address3" + }, + { + "source_name": "DHSAD4", + "source_type": "CHAR(35)", + "dest_name": "dhsad4", + "dest_type": "text", + "description": "Ship-to Address4" + }, + { + "source_name": "DHSAD5", + "source_type": "CHAR(35)", + "dest_name": "dhsad5", + "dest_type": "text", + "description": "Ship-to Address5" + }, + { + "source_name": "DHSAD6", + "source_type": "CHAR(35)", + "dest_name": "dhsad6", + "dest_type": "text", + "description": "Ship-to Address6" + }, + { + "source_name": "DHSAD7", + "source_type": "CHAR(35)", + "dest_name": "dhsad7", + "dest_type": "text", + "description": "Ship-to Address7" + }, + { + "source_name": "DHSAD8", + "source_type": "CHAR(35)", + "dest_name": "dhsad8", + "dest_type": "text", + "description": "Ship-to Address8" + }, + { + "source_name": "DHSAD9", + "source_type": "CHAR(35)", + "dest_name": "dhsad9", + "dest_type": "text", + "description": "Ship-to Address9" + }, + { + "source_name": "DHSAD10", + "source_type": "CHAR(35)", + "dest_name": "dhsad10", + "dest_type": "text", + "description": "Ship-to Address10" + }, + { + "source_name": "DHSPOS", + "source_type": "CHAR(30)", + "dest_name": "dhspos", + "dest_type": "text", + "description": "Ship-to Post Code" + }, + { + "source_name": "DHSCTY", + "source_type": "CHAR(30)", + "dest_name": "dhscty", + "dest_type": "text", + "description": "Shipto City" + }, + { + "source_name": "DHSPOV", + "source_type": "CHAR(3)", + "dest_name": "dhspov", + "dest_type": "text", + "description": "Shipto State/ Province Code" + }, + { + "source_name": "DHSCRY", + "source_type": "CHAR(3)", + "dest_name": "dhscry", + "dest_type": "text", + "description": "Shipto Country Code" + }, + { + "source_name": "DHCPO", + "source_type": "CHAR(30)", + "dest_name": "dhcpo", + "dest_type": "text", + "description": "Customer Purchase Order" + }, + { + "source_name": "DHQUOT", + "source_type": "CHAR(12)", + "dest_name": "dhquot", + "dest_type": "text", + "description": "Quote Number" + }, + { + "source_name": "DHCURR", + "source_type": "CHAR(2)", + "dest_name": "dhcurr", + "dest_type": "text", + "description": "Currency Code" + }, + { + "source_name": "DHSDAT", + "source_type": "DATE", + "dest_name": "dhsdat", + "dest_type": "date", + "description": "Ship Date" + }, + { + "source_name": "DHSHVI", + "source_type": "CHAR(30)", + "dest_name": "dhshvi", + "dest_type": "text", + "description": "Ship Via" + }, + { + "source_name": "DHSLMN", + "source_type": "CHAR(5)", + "dest_name": "dhslmn", + "dest_type": "text", + "description": "Salesman Code" + }, + { + "source_name": "DHCPCT", + "source_type": "NUMERIC(4,2)", + "dest_name": "dhcpct", + "dest_type": "numeric(4,2)", + "description": "Commission percentage" + }, + { + "source_name": "DHCRAT", + "source_type": "NUMERIC(5,2)", + "dest_name": "dhcrat", + "dest_type": "numeric(5,2)", + "description": "Commission rate" + }, + { + "source_name": "DHNU5", + "source_type": "CHAR(5)", + "dest_name": "dhnu5", + "dest_type": "text", + "description": "time zone" + }, + { + "source_name": "DHFSTL", + "source_type": "CHAR(20)", + "dest_name": "dhfstl", + "dest_type": "text", + "description": "FST Licence Number" + }, + { + "source_name": "DHPSTL", + "source_type": "CHAR(20)", + "dest_name": "dhpstl", + "dest_type": "text", + "description": "PST Licence Number" + }, + { + "source_name": "DHPPCL", + "source_type": "CHAR(1)", + "dest_name": "dhppcl", + "dest_type": "text", + "description": "Prepaid Collect" + }, + { + "source_name": "DHBMOD", + "source_type": "CHAR(1)", + "dest_name": "dhbmod", + "dest_type": "text", + "description": "blank-std, D-dep, F-final" + }, + { + "source_name": "DHPRTS", + "source_type": "CHAR(1)", + "dest_name": "dhprts", + "dest_type": "text", + "description": "Invoice Printed" + }, + { + "source_name": "DHBOLN", + "source_type": "NUMERIC(9,0)", + "dest_name": "dhboln", + "dest_type": "numeric(9,0)", + "description": "BOL Number" + }, + { + "source_name": "DHPACK", + "source_type": "CHAR(30)", + "dest_name": "dhpack", + "dest_type": "text", + "description": "Packing Slip No" + }, + { + "source_name": "DHINCR", + "source_type": "CHAR(1)", + "dest_name": "dhincr", + "dest_type": "text", + "description": "Invoice Credit" + }, + { + "source_name": "DHORD#", + "source_type": "NUMERIC(9,0)", + "dest_name": "dhord#", + "dest_type": "numeric(9,0)", + "description": "Customer Order Number" + }, + { + "source_name": "DHTOTI", + "source_type": "DECIMAL(11,2)", + "dest_name": "dhtoti", + "dest_type": "numeric(11,2)", + "description": "Include FST & PST" + }, + { + "source_name": "DHTOTD", + "source_type": "DECIMAL(11,2)", + "dest_name": "dhtotd", + "dest_type": "numeric(11,2)", + "description": "Total Discount" + }, + { + "source_name": "DHTPST", + "source_type": "DECIMAL(11,2)", + "dest_name": "dhtpst", + "dest_type": "numeric(11,2)", + "description": "Total PST" + }, + { + "source_name": "DHTFST", + "source_type": "DECIMAL(11,2)", + "dest_name": "dhtfst", + "dest_type": "numeric(11,2)", + "description": "Total FST" + }, + { + "source_name": "DHTTAX", + "source_type": "DECIMAL(11,2)", + "dest_name": "dhttax", + "dest_type": "numeric(11,2)", + "description": "Total Tax" + }, + { + "source_name": "DHTCST", + "source_type": "DECIMAL(11,2)", + "dest_name": "dhtcst", + "dest_type": "numeric(11,2)", + "description": "Total Cost" + }, + { + "source_name": "DHTOTL", + "source_type": "CHAR(1)", + "dest_name": "dhtotl", + "dest_type": "text", + "description": "Invoice Totaled" + }, + { + "source_name": "DHPSTR", + "source_type": "NUMERIC(4,2)", + "dest_name": "dhpstr", + "dest_type": "numeric(4,2)", + "description": "PST Rate" + }, + { + "source_name": "DHSTKR", + "source_type": "CHAR(6)", + "dest_name": "dhstkr", + "dest_type": "text", + "description": "Warehouse Location" + }, + { + "source_name": "DHPROV", + "source_type": "CHAR(3)", + "dest_name": "dhprov", + "dest_type": "text", + "description": "Province /State Code" + }, + { + "source_name": "DHCTRY", + "source_type": "CHAR(3)", + "dest_name": "dhctry", + "dest_type": "text", + "description": "Country Code" + }, + { + "source_name": "DHBOLP", + "source_type": "CHAR(1)", + "dest_name": "dhbolp", + "dest_type": "text", + "description": "BOL Printed" + }, + { + "source_name": "DHTAX", + "source_type": "CHAR(1)", + "dest_name": "dhtax", + "dest_type": "text", + "description": "Tax Code" + }, + { + "source_name": "DHPSTC", + "source_type": "CHAR(1)", + "dest_name": "dhpstc", + "dest_type": "text", + "description": "PST Code" + }, + { + "source_name": "DHTERR", + "source_type": "CHAR(4)", + "dest_name": "dhterr", + "dest_type": "text", + "description": "Territory Code" + }, + { + "source_name": "DHHBCK", + "source_type": "NUMERIC(2,0)", + "dest_name": "dhhbck", + "dest_type": "numeric(2,0)", + "description": "Holdback Percent" + }, + { + "source_name": "DHHDAT", + "source_type": "DATE", + "dest_name": "dhhdat", + "dest_type": "date", + "description": "Holdback Due Date" + }, + { + "source_name": "DHARYR", + "source_type": "NUMERIC(2,0)", + "dest_name": "dharyr", + "dest_type": "numeric(2,0)", + "description": "A/R Year" + }, + { + "source_name": "DHARPR", + "source_type": "NUMERIC(2,0)", + "dest_name": "dharpr", + "dest_type": "numeric(2,0)", + "description": "A/R Period" + }, + { + "source_name": "DHEXRT", + "source_type": "DECIMAL(11,6)", + "dest_name": "dhexrt", + "dest_type": "numeric(11,6)", + "description": "Currency Exchange" + }, + { + "source_name": "DHEDIS", + "source_type": "CHAR(1)", + "dest_name": "dhedis", + "dest_type": "text", + "description": "EDI Send Status" + }, + { + "source_name": "DHEDIA", + "source_type": "CHAR(1)", + "dest_name": "dhedia", + "dest_type": "text", + "description": "EDI Acknowledge Status" + }, + { + "source_name": "DHEDAT", + "source_type": "DATE", + "dest_name": "dhedat", + "dest_type": "date", + "description": "EDI Send Date" + }, + { + "source_name": "DHADAT", + "source_type": "DATE", + "dest_name": "dhadat", + "dest_type": "date", + "description": "EDI Ack Date" + }, + { + "source_name": "DHSTOR", + "source_type": "CHAR(17)", + "dest_name": "dhstor", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFOBC", + "source_type": "CHAR(3)", + "dest_name": "dhfobc", + "dest_type": "text", + "description": "FOB Code" + }, + { + "source_name": "DHSLCS", + "source_type": "CHAR(8)", + "dest_name": "dhslcs", + "dest_type": "text", + "description": "Sold from Customer" + }, + { + "source_name": "DHCRTY", + "source_type": "CHAR(1)", + "dest_name": "dhcrty", + "dest_type": "text", + "description": "Need authorization" + }, + { + "source_name": "DHCRDT", + "source_type": "CHAR(2)", + "dest_name": "dhcrdt", + "dest_type": "text", + "description": "Credit card code" + }, + { + "source_name": "DHCRD#", + "source_type": "CHAR(16)", + "dest_name": "dhcrd#", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "DHEXPR", + "source_type": "CHAR(8)", + "dest_name": "dhexpr", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "DHHODR", + "source_type": "CHAR(30)", + "dest_name": "dhhodr", + "dest_type": "text", + "description": "Obsoleted" + }, + { + "source_name": "DHCRNM", + "source_type": "NUMERIC(10,2)", + "dest_name": "dhcrnm", + "dest_type": "numeric(10,2)", + "description": "Need Authorized Amount" + }, + { + "source_name": "DHFUT1", + "source_type": "CHAR(10)", + "dest_name": "dhfut1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT2", + "source_type": "CHAR(10)", + "dest_name": "dhfut2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT3", + "source_type": "CHAR(10)", + "dest_name": "dhfut3", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT4", + "source_type": "CHAR(20)", + "dest_name": "dhfut4", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT5", + "source_type": "CHAR(30)", + "dest_name": "dhfut5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT6", + "source_type": "NUMERIC(15,5)", + "dest_name": "dhfut6", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DHFLG1", + "source_type": "CHAR(1)", + "dest_name": "dhflg1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFLG2", + "source_type": "CHAR(1)", + "dest_name": "dhflg2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFLG3", + "source_type": "CHAR(1)", + "dest_name": "dhflg3", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFLG4", + "source_type": "CHAR(1)", + "dest_name": "dhflg4", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFLG5", + "source_type": "CHAR(1)", + "dest_name": "dhflg5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHCLEN", + "source_type": "CHAR(20)", + "dest_name": "dhclen", + "dest_type": "text", + "description": "Customer Client Number" + }, + { + "source_name": "DHPLNT", + "source_type": "CHAR(3)", + "dest_name": "dhplnt", + "dest_type": "text", + "description": "Plant Code" + }, + { + "source_name": "DHCOMP", + "source_type": "NUMERIC(2,0)", + "dest_name": "dhcomp", + "dest_type": "numeric(2,0)", + "description": "Company Number" + }, + { + "source_name": "DHSTCN", + "source_type": "CHAR(8)", + "dest_name": "dhstcn", + "dest_type": "text", + "description": "Ship-To Consumer" + }, + { + "source_name": "DHDLRC", + "source_type": "CHAR(10)", + "dest_name": "dhdlrc", + "dest_type": "text", + "description": "Dealer Code" + }, + { + "source_name": "DHDDSR", + "source_type": "CHAR(10)", + "dest_name": "dhddsr", + "dest_type": "text", + "description": "Dealer Dir. Sales Ref#" + }, + { + "source_name": "DHEREF", + "source_type": "CHAR(20)", + "dest_name": "dheref", + "dest_type": "text", + "description": "External Reference" + }, + { + "source_name": "DHYYPP", + "source_type": "NUMERIC(4,0)", + "dest_name": "dhyypp", + "dest_type": "numeric(4,0)", + "description": "G/L Year G/L Period" + }, + { + "source_name": "DHSTTP", + "source_type": "CHAR(1)", + "dest_name": "dhsttp", + "dest_type": "text", + "description": "Ship-To Type" + }, + { + "source_name": "DHDDIR", + "source_type": "CHAR(1)", + "dest_name": "dhddir", + "dest_type": "text", + "description": "Dealer Direct" + }, + { + "source_name": "DHDEXP", + "source_type": "CHAR(1)", + "dest_name": "dhdexp", + "dest_type": "text", + "description": "Domestic Export Sale" + }, + { + "source_name": "DHVSXF", + "source_type": "CHAR(1)", + "dest_name": "dhvsxf", + "dest_type": "text", + "description": "Created from Virtual Sales" + }, + { + "source_name": "DHRBIV", + "source_type": "CHAR(1)", + "dest_name": "dhrbiv", + "dest_type": "text", + "description": "Retro Billing Invoice Type" + }, + { + "source_name": "DHPUSR", + "source_type": "CHAR(10)", + "dest_name": "dhpusr", + "dest_type": "text", + "description": "Posted By" + }, + { + "source_name": "DHPDAT", + "source_type": "DATE", + "dest_name": "dhpdat", + "dest_type": "date", + "description": "Posted Date" + }, + { + "source_name": "DHPTIM", + "source_type": "NUMERIC(6,0)", + "dest_name": "dhptim", + "dest_type": "numeric(6,0)", + "description": "Posted Time" + }, + { + "source_name": "DHREF3", + "source_type": "CHAR(30)", + "dest_name": "dhref3", + "dest_type": "text", + "description": "Invoice Shipment Reference" + }, + { + "source_name": "DHITIM", + "source_type": "NUMERIC(4,0)", + "dest_name": "dhitim", + "dest_type": "numeric(4,0)", + "description": "Invoice Time HHSS" + }, + { + "source_name": "DHHLDP", + "source_type": "CHAR(1)", + "dest_name": "dhhldp", + "dest_type": "text", + "description": "Hold From Posting" + }, + { + "source_name": "DHBBORD", + "source_type": "CHAR(1)", + "dest_name": "dhbbord", + "dest_type": "text", + "description": "Bill By Order" + }, + { + "source_name": "DHPBBORD", + "source_type": "CHAR(1)", + "dest_name": "dhpbbord", + "dest_type": "text", + "description": "Post Bill by Order Invoice" + }, + { + "source_name": "DHFUT7", + "source_type": "CHAR(1)", + "dest_name": "dhfut7", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT8", + "source_type": "CHAR(1)", + "dest_name": "dhfut8", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT9", + "source_type": "CHAR(1)", + "dest_name": "dhfut9", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT10", + "source_type": "CHAR(1)", + "dest_name": "dhfut10", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT11", + "source_type": "CHAR(10)", + "dest_name": "dhfut11", + "dest_type": "text", + "description": "GLIC Key" + }, + { + "source_name": "DHFUT12", + "source_type": "CHAR(10)", + "dest_name": "dhfut12", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT13", + "source_type": "CHAR(10)", + "dest_name": "dhfut13", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT14", + "source_type": "CHAR(10)", + "dest_name": "dhfut14", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT15", + "source_type": "CHAR(20)", + "dest_name": "dhfut15", + "dest_type": "text", + "description": "Manual Override Exchange Rate" + }, + { + "source_name": "DHFUT16", + "source_type": "CHAR(20)", + "dest_name": "dhfut16", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT17", + "source_type": "CHAR(20)", + "dest_name": "dhfut17", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT18", + "source_type": "CHAR(30)", + "dest_name": "dhfut18", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT19", + "source_type": "CHAR(30)", + "dest_name": "dhfut19", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "DHFUT20", + "source_type": "NUMERIC(15,5)", + "dest_name": "dhfut20", + "dest_type": "numeric(15,5)", + "description": "A/R Century+Year" + }, + { + "source_name": "DHFUT21", + "source_type": "NUMERIC(15,5)", + "dest_name": "dhfut21", + "dest_type": "numeric(15,5)", + "description": "G/L Century+Year+Period" + }, + { + "source_name": "DHFUT22", + "source_type": "NUMERIC(15,5)", + "dest_name": "dhfut22", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DHFUT23", + "source_type": "NUMERIC(15,5)", + "dest_name": "dhfut23", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "DHFUT24", + "source_type": "NUMERIC(15,5)", + "dest_name": "dhfut24", + "dest_type": "numeric(15,5)", + "description": "Future Use" + } + ], + "watermarks": [ + { + "name": "oih_wm", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dhidat), DATE '1900-01-01') - 30 FROM cms.oih WHERE dhidat <= CURRENT_DATE", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/oih.sql b/config/modules/oih.sql new file mode 100644 index 0000000..04e4225 --- /dev/null +++ b/config/modules/oih.sql @@ -0,0 +1,136 @@ +SELECT + "DHINV#" AS "dhinv#", + CASE WHEN DHIDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DHIDAT END AS dhidat, + RTRIM(DHPTCP) AS dhptcp, + RTRIM(DHCONS) AS dhcons, + RTRIM(DHPOST) AS dhpost, + RTRIM("DHBCS#") AS "dhbcs#", + RTRIM("DHSCS#") AS "dhscs#", + RTRIM(DHBNAM) AS dhbnam, + RTRIM(DHBPOS) AS dhbpos, + RTRIM(DHATTN) AS dhattn, + RTRIM(DHTRCD) AS dhtrcd, + DHRINV AS dhrinv, + RTRIM(DHNU12) AS dhnu12, + DHFTAM AS dhftam, + RTRIM(DHSNAM) AS dhsnam, + RTRIM(DHSAD1) AS dhsad1, + RTRIM(DHSAD2) AS dhsad2, + RTRIM(DHSAD3) AS dhsad3, + RTRIM(DHSAD4) AS dhsad4, + RTRIM(DHSAD5) AS dhsad5, + RTRIM(DHSAD6) AS dhsad6, + RTRIM(DHSAD7) AS dhsad7, + RTRIM(DHSAD8) AS dhsad8, + RTRIM(DHSAD9) AS dhsad9, + RTRIM(DHSAD10) AS dhsad10, + RTRIM(DHSPOS) AS dhspos, + RTRIM(DHSCTY) AS dhscty, + RTRIM(DHSPOV) AS dhspov, + RTRIM(DHSCRY) AS dhscry, + RTRIM(DHCPO) AS dhcpo, + RTRIM(DHQUOT) AS dhquot, + RTRIM(DHCURR) AS dhcurr, + CASE WHEN DHSDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DHSDAT END AS dhsdat, + RTRIM(DHSHVI) AS dhshvi, + RTRIM(DHSLMN) AS dhslmn, + DHCPCT AS dhcpct, + DHCRAT AS dhcrat, + RTRIM(DHNU5) AS dhnu5, + RTRIM(DHFSTL) AS dhfstl, + RTRIM(DHPSTL) AS dhpstl, + RTRIM(DHPPCL) AS dhppcl, + RTRIM(DHBMOD) AS dhbmod, + RTRIM(DHPRTS) AS dhprts, + DHBOLN AS dhboln, + RTRIM(DHPACK) AS dhpack, + RTRIM(DHINCR) AS dhincr, + "DHORD#" AS "dhord#", + DHTOTI AS dhtoti, + DHTOTD AS dhtotd, + DHTPST AS dhtpst, + DHTFST AS dhtfst, + DHTTAX AS dhttax, + DHTCST AS dhtcst, + RTRIM(DHTOTL) AS dhtotl, + DHPSTR AS dhpstr, + RTRIM(DHSTKR) AS dhstkr, + RTRIM(DHPROV) AS dhprov, + RTRIM(DHCTRY) AS dhctry, + RTRIM(DHBOLP) AS dhbolp, + RTRIM(DHTAX) AS dhtax, + RTRIM(DHPSTC) AS dhpstc, + RTRIM(DHTERR) AS dhterr, + DHHBCK AS dhhbck, + CASE WHEN DHHDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DHHDAT END AS dhhdat, + DHARYR AS dharyr, + DHARPR AS dharpr, + DHEXRT AS dhexrt, + RTRIM(DHEDIS) AS dhedis, + RTRIM(DHEDIA) AS dhedia, + CASE WHEN DHEDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DHEDAT END AS dhedat, + CASE WHEN DHADAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DHADAT END AS dhadat, + RTRIM(DHSTOR) AS dhstor, + RTRIM(DHFOBC) AS dhfobc, + RTRIM(DHSLCS) AS dhslcs, + RTRIM(DHCRTY) AS dhcrty, + RTRIM(DHCRDT) AS dhcrdt, + RTRIM("DHCRD#") AS "dhcrd#", + RTRIM(DHEXPR) AS dhexpr, + RTRIM(DHHODR) AS dhhodr, + DHCRNM AS dhcrnm, + RTRIM(DHFUT1) AS dhfut1, + RTRIM(DHFUT2) AS dhfut2, + RTRIM(DHFUT3) AS dhfut3, + RTRIM(DHFUT4) AS dhfut4, + RTRIM(DHFUT5) AS dhfut5, + DHFUT6 AS dhfut6, + RTRIM(DHFLG1) AS dhflg1, + RTRIM(DHFLG2) AS dhflg2, + RTRIM(DHFLG3) AS dhflg3, + RTRIM(DHFLG4) AS dhflg4, + RTRIM(DHFLG5) AS dhflg5, + RTRIM(DHCLEN) AS dhclen, + RTRIM(DHPLNT) AS dhplnt, + DHCOMP AS dhcomp, + RTRIM(DHSTCN) AS dhstcn, + RTRIM(DHDLRC) AS dhdlrc, + RTRIM(DHDDSR) AS dhddsr, + RTRIM(DHEREF) AS dheref, + DHYYPP AS dhyypp, + RTRIM(DHSTTP) AS dhsttp, + RTRIM(DHDDIR) AS dhddir, + RTRIM(DHDEXP) AS dhdexp, + RTRIM(DHVSXF) AS dhvsxf, + RTRIM(DHRBIV) AS dhrbiv, + RTRIM(DHPUSR) AS dhpusr, + CASE WHEN DHPDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE DHPDAT END AS dhpdat, + DHPTIM AS dhptim, + RTRIM(DHREF3) AS dhref3, + DHITIM AS dhitim, + RTRIM(DHHLDP) AS dhhldp, + RTRIM(DHBBORD) AS dhbbord, + RTRIM(DHPBBORD) AS dhpbbord, + RTRIM(DHFUT7) AS dhfut7, + RTRIM(DHFUT8) AS dhfut8, + RTRIM(DHFUT9) AS dhfut9, + RTRIM(DHFUT10) AS dhfut10, + RTRIM(DHFUT11) AS dhfut11, + RTRIM(DHFUT12) AS dhfut12, + RTRIM(DHFUT13) AS dhfut13, + RTRIM(DHFUT14) AS dhfut14, + RTRIM(DHFUT15) AS dhfut15, + RTRIM(DHFUT16) AS dhfut16, + RTRIM(DHFUT17) AS dhfut17, + RTRIM(DHFUT18) AS dhfut18, + RTRIM(DHFUT19) AS dhfut19, + DHFUT20 AS dhfut20, + DHFUT21 AS dhfut21, + DHFUT22 AS dhfut22, + DHFUT23 AS dhfut23, + DHFUT24 AS dhfut24 +FROM LGDAT.OIH +WHERE + (DHIDAT BETWEEN '{oih_wm}' AND CURRENT_DATE) -- new invoices by invoice date + OR (DHPDAT BETWEEN '{oih_wm}' AND CURRENT_DATE) -- posting flip + backdated retro-billing posted recently + OR (DHPOST <> 'Y') -- always pull unposted (~23 rows) diff --git a/config/modules/ois.json b/config/modules/ois.json new file mode 100644 index 0000000..bc547de --- /dev/null +++ b/config/modules/ois.json @@ -0,0 +1,120 @@ +{ + "name": "ois", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.ois", + "staging_table": "pipekit_staging.ois", + "merge_strategy": "incremental", + "merge_key": "flinv#", + "enabled": 1, + "dest_description": "Invoice detail discount/charge 6.0", + "columns": [ + { + "source_name": "FLINV#", + "source_type": "NUMERIC(9,0)", + "dest_name": "flinv#", + "dest_type": "numeric(9,0)", + "description": "Invoice Number" + }, + { + "source_name": "FLLIN#", + "source_type": "NUMERIC(3,0)", + "dest_name": "fllin#", + "dest_type": "numeric(3,0)", + "description": "Detail Number" + }, + { + "source_name": "FLDIS#", + "source_type": "NUMERIC(3,0)", + "dest_name": "fldis#", + "dest_type": "numeric(3,0)", + "description": "Discount Number" + }, + { + "source_name": "FLDISC", + "source_type": "CHAR(3)", + "dest_name": "fldisc", + "dest_type": "text", + "description": "Discount Code" + }, + { + "source_name": "FLDDES", + "source_type": "CHAR(30)", + "dest_name": "flddes", + "dest_type": "text", + "description": "Discount Description" + }, + { + "source_name": "FLDRCR", + "source_type": "CHAR(1)", + "dest_name": "fldrcr", + "dest_type": "text", + "description": "Debit Credit" + }, + { + "source_name": "FLBANT", + "source_type": "CHAR(1)", + "dest_name": "flbant", + "dest_type": "text", + "description": "Rate Base" + }, + { + "source_name": "FLPERC", + "source_type": "NUMERIC(8,5)", + "dest_name": "flperc", + "dest_type": "numeric(8,5)", + "description": "Discount Percent" + }, + { + "source_name": "FLDAMT", + "source_type": "NUMERIC(13,5)", + "dest_name": "fldamt", + "dest_type": "numeric(13,5)", + "description": "Discount Amount" + }, + { + "source_name": "FLAPER", + "source_type": "CHAR(1)", + "dest_name": "flaper", + "dest_type": "text", + "description": "Fixed or per Unit" + }, + { + "source_name": "FLDEXT", + "source_type": "NUMERIC(10,2)", + "dest_name": "fldext", + "dest_type": "numeric(10,2)", + "description": "Discount Extension" + }, + { + "source_name": "FLAUNT", + "source_type": "CHAR(3)", + "dest_name": "flaunt", + "dest_type": "text", + "description": "Amount Per-Unit" + }, + { + "source_name": "FLRTEF", + "source_type": "CHAR(1)", + "dest_name": "flrtef", + "dest_type": "text", + "description": "Rate Flag" + }, + { + "source_name": "FLRNDD", + "source_type": "NUMERIC(2,0)", + "dest_name": "flrndd", + "dest_type": "numeric(2,0)", + "description": "Rounding # of Decimals" + } + ], + "watermarks": [ + { + "name": "ois_wm", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dhidat), DATE '1900-01-01') - 30 FROM cms.oih WHERE dhidat <= CURRENT_DATE", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/ois.sql b/config/modules/ois.sql new file mode 100644 index 0000000..e74325d --- /dev/null +++ b/config/modules/ois.sql @@ -0,0 +1,22 @@ +WITH changed AS ( + SELECT "DHINV#" FROM lgdat.oih WHERE DHIDAT BETWEEN '{ois_wm}' AND CURRENT_DATE + UNION SELECT "DHINV#" FROM lgdat.oih WHERE DHPDAT BETWEEN '{ois_wm}' AND CURRENT_DATE + UNION SELECT "DHINV#" FROM lgdat.oih WHERE DHPOST <> 'Y' +) +SELECT + "FLINV#" AS "flinv#", + "FLLIN#" AS "fllin#", + "FLDIS#" AS "fldis#", + RTRIM(FLDISC) AS fldisc, + RTRIM(FLDDES) AS flddes, + RTRIM(FLDRCR) AS fldrcr, + RTRIM(FLBANT) AS flbant, + FLPERC AS flperc, + FLDAMT AS fldamt, + RTRIM(FLAPER) AS flaper, + FLDEXT AS fldext, + RTRIM(FLAUNT) AS flaunt, + RTRIM(FLRTEF) AS flrtef, + FLRNDD AS flrndd +FROM LGDAT.OIS +WHERE "FLINV#" IN (SELECT "DHINV#" FROM changed) diff --git a/config/modules/osm_aop.json b/config/modules/osm_aop.json new file mode 100644 index 0000000..eb2b752 --- /dev/null +++ b/config/modules/osm_aop.json @@ -0,0 +1,1058 @@ +{ + "name": "osm_aop", + "source_connection": "usmidsap02", + "dest_connection": "sqlserver", + "dest_table": "rlarp.osm_aop_2027", + "staging_table": "pipekit_staging.osm_aop", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "origin_system", + "source_type": "text", + "dest_name": "origin_system", + "dest_type": "text", + "description": null + }, + { + "source_name": "version", + "source_type": "text", + "dest_name": "version", + "dest_type": "text", + "description": null + }, + { + "source_name": "voseas", + "source_type": "text", + "dest_name": "voseas", + "dest_type": "text", + "description": null + }, + { + "source_name": "iter", + "source_type": "text", + "dest_name": "iter", + "dest_type": "text", + "description": null + }, + { + "source_name": "oseas", + "source_type": "integer", + "dest_name": "oseas", + "dest_type": "integer", + "description": null + }, + { + "source_name": "omon", + "source_type": "text", + "dest_name": "omon", + "dest_type": "text", + "description": null + }, + { + "source_name": "odate", + "source_type": "date", + "dest_name": "odate", + "dest_type": "date", + "description": null + }, + { + "source_name": "oday", + "source_type": "text", + "dest_name": "oday", + "dest_type": "text", + "description": null + }, + { + "source_name": "om", + "source_type": "text", + "dest_name": "om", + "dest_type": "text", + "description": null + }, + { + "source_name": "oy", + "source_type": "text", + "dest_name": "oy", + "dest_type": "text", + "description": null + }, + { + "source_name": "oytd", + "source_type": "text", + "dest_name": "oytd", + "dest_type": "text", + "description": null + }, + { + "source_name": "rseas", + "source_type": "integer", + "dest_name": "rseas", + "dest_type": "integer", + "description": null + }, + { + "source_name": "rmon", + "source_type": "text", + "dest_name": "rmon", + "dest_type": "text", + "description": null + }, + { + "source_name": "rdate", + "source_type": "date", + "dest_name": "rdate", + "dest_type": "date", + "description": null + }, + { + "source_name": "rday", + "source_type": "text", + "dest_name": "rday", + "dest_type": "text", + "description": null + }, + { + "source_name": "rm", + "source_type": "text", + "dest_name": "rm", + "dest_type": "text", + "description": null + }, + { + "source_name": "ry", + "source_type": "text", + "dest_name": "ry", + "dest_type": "text", + "description": null + }, + { + "source_name": "rytd", + "source_type": "text", + "dest_name": "rytd", + "dest_type": "text", + "description": null + }, + { + "source_name": "sseas", + "source_type": "integer", + "dest_name": "sseas", + "dest_type": "integer", + "description": null + }, + { + "source_name": "smon", + "source_type": "text", + "dest_name": "smon", + "dest_type": "text", + "description": null + }, + { + "source_name": "sdate", + "source_type": "date", + "dest_name": "sdate", + "dest_type": "date", + "description": null + }, + { + "source_name": "sday", + "source_type": "text", + "dest_name": "sday", + "dest_type": "text", + "description": null + }, + { + "source_name": "sm", + "source_type": "text", + "dest_name": "sm", + "dest_type": "text", + "description": null + }, + { + "source_name": "sy", + "source_type": "text", + "dest_name": "sy", + "dest_type": "text", + "description": null + }, + { + "source_name": "sytd", + "source_type": "text", + "dest_name": "sytd", + "dest_type": "text", + "description": null + }, + { + "source_name": "sseas_e", + "source_type": "integer", + "dest_name": "sseas_e", + "dest_type": "integer", + "description": null + }, + { + "source_name": "smon_e", + "source_type": "text", + "dest_name": "smon_e", + "dest_type": "text", + "description": null + }, + { + "source_name": "pseas", + "source_type": "integer", + "dest_name": "pseas", + "dest_type": "integer", + "description": null + }, + { + "source_name": "pmon", + "source_type": "text", + "dest_name": "pmon", + "dest_type": "text", + "description": null + }, + { + "source_name": "pdate", + "source_type": "date", + "dest_name": "pdate", + "dest_type": "date", + "description": null + }, + { + "source_name": "pday", + "source_type": "text", + "dest_name": "pday", + "dest_type": "text", + "description": null + }, + { + "source_name": "pm", + "source_type": "text", + "dest_name": "pm", + "dest_type": "text", + "description": null + }, + { + "source_name": "py", + "source_type": "text", + "dest_name": "py", + "dest_type": "text", + "description": null + }, + { + "source_name": "pytd", + "source_type": "text", + "dest_name": "pytd", + "dest_type": "text", + "description": null + }, + { + "source_name": "ostatus", + "source_type": "text", + "dest_name": "ostatus", + "dest_type": "text", + "description": null + }, + { + "source_name": "flag_s", + "source_type": "text", + "dest_name": "flag_s", + "dest_type": "text", + "description": null + }, + { + "source_name": "flag_o", + "source_type": "text", + "dest_name": "flag_o", + "dest_type": "text", + "description": null + }, + { + "source_name": "ordnum", + "source_type": "text", + "dest_name": "ordnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "ordline", + "source_type": "text", + "dest_name": "ordline", + "dest_type": "text", + "description": null + }, + { + "source_name": "invnum", + "source_type": "text", + "dest_name": "invnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "invline", + "source_type": "text", + "dest_name": "invline", + "dest_type": "text", + "description": null + }, + { + "source_name": "quoten", + "source_type": "text", + "dest_name": "quoten", + "dest_type": "text", + "description": null + }, + { + "source_name": "quotel", + "source_type": "text", + "dest_name": "quotel", + "dest_type": "text", + "description": null + }, + { + "source_name": "ordquote", + "source_type": "text", + "dest_name": "ordquote", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_dba", + "source_type": "text", + "dest_name": "bill_dba", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_cust", + "source_type": "text", + "dest_name": "bill_cust", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_class", + "source_type": "text", + "dest_name": "bill_class", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_ctry", + "source_type": "text", + "dest_name": "bill_ctry", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_prov", + "source_type": "text", + "dest_name": "bill_prov", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_post", + "source_type": "text", + "dest_name": "bill_post", + "dest_type": "text", + "description": null + }, + { + "source_name": "ship_dba", + "source_type": "text", + "dest_name": "ship_dba", + "dest_type": "text", + "description": null + }, + { + "source_name": "ship_cust", + "source_type": "text", + "dest_name": "ship_cust", + "dest_type": "text", + "description": null + }, + { + "source_name": "ship_class", + "source_type": "text", + "dest_name": "ship_class", + "dest_type": "text", + "description": null + }, + { + "source_name": "dest_ctry", + "source_type": "text", + "dest_name": "dest_ctry", + "dest_type": "text", + "description": null + }, + { + "source_name": "dest_prov", + "source_type": "text", + "dest_name": "dest_prov", + "dest_type": "text", + "description": null + }, + { + "source_name": "dest_post", + "source_type": "text", + "dest_name": "dest_post", + "dest_type": "text", + "description": null + }, + { + "source_name": "chan", + "source_type": "text", + "dest_name": "chan", + "dest_type": "text", + "description": null + }, + { + "source_name": "chansub", + "source_type": "text", + "dest_name": "chansub", + "dest_type": "text", + "description": null + }, + { + "source_name": "chanretail", + "source_type": "text", + "dest_name": "chanretail", + "dest_type": "text", + "description": null + }, + { + "source_name": "chanwide", + "source_type": "text", + "dest_name": "chanwide", + "dest_type": "text", + "description": null + }, + { + "source_name": "customer", + "source_type": "text", + "dest_name": "customer", + "dest_type": "text", + "description": null + }, + { + "source_name": "customer_tier", + "source_type": "text", + "dest_name": "customer_tier", + "dest_type": "text", + "description": null + }, + { + "source_name": "dsm", + "source_type": "text", + "dest_name": "dsm", + "dest_type": "text", + "description": null + }, + { + "source_name": "csr", + "source_type": "text", + "dest_name": "csr", + "dest_type": "text", + "description": null + }, + { + "source_name": "director", + "source_type": "text", + "dest_name": "director", + "dest_type": "text", + "description": null + }, + { + "source_name": "quota_rep", + "source_type": "text", + "dest_name": "quota_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "default_rep", + "source_type": "text", + "dest_name": "default_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "retail_rep", + "source_type": "text", + "dest_name": "retail_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "inside_rep", + "source_type": "text", + "dest_name": "inside_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "keyaccount_rep", + "source_type": "text", + "dest_name": "keyaccount_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "geo", + "source_type": "text", + "dest_name": "geo", + "dest_type": "text", + "description": null + }, + { + "source_name": "nursery_region", + "source_type": "text", + "dest_name": "nursery_region", + "dest_type": "text", + "description": null + }, + { + "source_name": "greenhouse_region", + "source_type": "text", + "dest_name": "greenhouse_region", + "dest_type": "text", + "description": null + }, + { + "source_name": "general_region", + "source_type": "text", + "dest_name": "general_region", + "dest_type": "text", + "description": null + }, + { + "source_name": "promo", + "source_type": "text", + "dest_name": "promo", + "dest_type": "text", + "description": null + }, + { + "source_name": "glec", + "source_type": "text", + "dest_name": "glec", + "dest_type": "text", + "description": null + }, + { + "source_name": "segm", + "source_type": "text", + "dest_name": "segm", + "dest_type": "text", + "description": null + }, + { + "source_name": "fs_line", + "source_type": "text", + "dest_name": "fs_line", + "dest_type": "text", + "description": null + }, + { + "source_name": "plnt", + "source_type": "text", + "dest_name": "plnt", + "dest_type": "text", + "description": null + }, + { + "source_name": "part", + "source_type": "text", + "dest_name": "part", + "dest_type": "text", + "description": null + }, + { + "source_name": "partd", + "source_type": "text", + "dest_name": "partd", + "dest_type": "text", + "description": null + }, + { + "source_name": "stlc", + "source_type": "text", + "dest_name": "stlc", + "dest_type": "text", + "description": null + }, + { + "source_name": "stlcd", + "source_type": "text", + "dest_name": "stlcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "partgroup", + "source_type": "text", + "dest_name": "partgroup", + "dest_type": "text", + "description": null + }, + { + "source_name": "partgroupd", + "source_type": "text", + "dest_name": "partgroupd", + "dest_type": "text", + "description": null + }, + { + "source_name": "pricegroup", + "source_type": "text", + "dest_name": "pricegroup", + "dest_type": "text", + "description": null + }, + { + "source_name": "product", + "source_type": "text", + "dest_name": "product", + "dest_type": "text", + "description": null + }, + { + "source_name": "listg", + "source_type": "text", + "dest_name": "listg", + "dest_type": "text", + "description": null + }, + { + "source_name": "biggroup", + "source_type": "text", + "dest_name": "biggroup", + "dest_type": "text", + "description": null + }, + { + "source_name": "leadtime", + "source_type": "text", + "dest_name": "leadtime", + "dest_type": "text", + "description": null + }, + { + "source_name": "colc", + "source_type": "text", + "dest_name": "colc", + "dest_type": "text", + "description": null + }, + { + "source_name": "colcd", + "source_type": "text", + "dest_name": "colcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "colgrp", + "source_type": "text", + "dest_name": "colgrp", + "dest_type": "text", + "description": null + }, + { + "source_name": "coltierd", + "source_type": "text", + "dest_name": "coltierd", + "dest_type": "text", + "description": null + }, + { + "source_name": "sizc", + "source_type": "text", + "dest_name": "sizc", + "dest_type": "text", + "description": null + }, + { + "source_name": "uomp", + "source_type": "text", + "dest_name": "uomp", + "dest_type": "text", + "description": null + }, + { + "source_name": "suffix", + "source_type": "text", + "dest_name": "suffix", + "dest_type": "text", + "description": null + }, + { + "source_name": "suffixd", + "source_type": "text", + "dest_name": "suffixd", + "dest_type": "text", + "description": null + }, + { + "source_name": "accs_ps", + "source_type": "text", + "dest_name": "accs_ps", + "dest_type": "text", + "description": null + }, + { + "source_name": "brnd", + "source_type": "text", + "dest_name": "brnd", + "dest_type": "text", + "description": null + }, + { + "source_name": "programd", + "source_type": "text", + "dest_name": "programd", + "dest_type": "text", + "description": null + }, + { + "source_name": "program", + "source_type": "text", + "dest_name": "program", + "dest_type": "text", + "description": null + }, + { + "source_name": "cgbrand", + "source_type": "text", + "dest_name": "cgbrand", + "dest_type": "text", + "description": null + }, + { + "source_name": "v0dataseg", + "source_type": "text", + "dest_name": "v0dataseg", + "dest_type": "text", + "description": null + }, + { + "source_name": "dataseg", + "source_type": "text", + "dest_name": "dataseg", + "dest_type": "text", + "description": null + }, + { + "source_name": "majgd", + "source_type": "text", + "dest_name": "majgd", + "dest_type": "text", + "description": null + }, + { + "source_name": "mingd", + "source_type": "text", + "dest_name": "mingd", + "dest_type": "text", + "description": null + }, + { + "source_name": "majsd", + "source_type": "text", + "dest_name": "majsd", + "dest_type": "text", + "description": null + }, + { + "source_name": "minsd", + "source_type": "text", + "dest_name": "minsd", + "dest_type": "text", + "description": null + }, + { + "source_name": "assc", + "source_type": "text", + "dest_name": "assc", + "dest_type": "text", + "description": null + }, + { + "source_name": "clss", + "source_type": "text", + "dest_name": "clss", + "dest_type": "text", + "description": null + }, + { + "source_name": "plcd", + "source_type": "text", + "dest_name": "plcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "c_currency", + "source_type": "text", + "dest_name": "c_currency", + "dest_type": "text", + "description": null + }, + { + "source_name": "c_rate", + "source_type": "numeric", + "dest_name": "c_rate", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "r_currency", + "source_type": "text", + "dest_name": "r_currency", + "dest_type": "text", + "description": null + }, + { + "source_name": "r_rate", + "source_type": "numeric", + "dest_name": "r_rate", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "unit", + "source_type": "text", + "dest_name": "unit", + "dest_type": "text", + "description": null + }, + { + "source_name": "qty", + "source_type": "numeric(38,2)", + "dest_name": "qty", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "qtyord", + "source_type": "numeric(38,2)", + "dest_name": "qtyord", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "pltq", + "source_type": "numeric(38,2)", + "dest_name": "pltq", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "pallets", + "source_type": "numeric(38,2)", + "dest_name": "pallets", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "pounds", + "source_type": "numeric(38,2)", + "dest_name": "pounds", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "sales_usd", + "source_type": "numeric(38,2)", + "dest_name": "sales_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "sales_local", + "source_type": "numeric(38,2)", + "dest_name": "sales_local", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "quoted_usd", + "source_type": "numeric(38,2)", + "dest_name": "quoted_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "target_usd", + "source_type": "numeric(38,2)", + "dest_name": "target_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "list_usd", + "source_type": "numeric(38,2)", + "dest_name": "list_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_loc", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_loc", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_cur_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_cur_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_cur_loc", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_cur_loc", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_curm_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_curm_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_curl_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_curl_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_curv_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_curv_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_curf_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_curf_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_fut_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_fut_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_fut_loc", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_fut_loc", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_futm_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_futm_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_futl_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_futl_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_futv_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_futv_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_futf_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_futf_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "margin_hist_usd", + "source_type": "numeric(38,2)", + "dest_name": "margin_hist_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "calc_status", + "source_type": "text", + "dest_name": "calc_status", + "dest_type": "text", + "description": null + }, + { + "source_name": "flag", + "source_type": "text", + "dest_name": "flag", + "dest_type": "text", + "description": null + }, + { + "source_name": "pricing", + "source_type": "jsonb", + "dest_name": "pricing", + "dest_type": "jsonb", + "description": null + }, + { + "source_name": "pending_rep", + "source_type": "text", + "dest_name": "pending_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "pending_director", + "source_type": "text", + "dest_name": "pending_director", + "dest_type": "text", + "description": null + }, + { + "source_name": "channel_new", + "source_type": "text", + "dest_name": "channel_new", + "dest_type": "text", + "description": null + }, + { + "source_name": "segment_new", + "source_type": "text", + "dest_name": "segment_new", + "dest_type": "text", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/osm_aop.sql b/config/modules/osm_aop.sql new file mode 100644 index 0000000..f48e2ac --- /dev/null +++ b/config/modules/osm_aop.sql @@ -0,0 +1,151 @@ +SELECT + origin_system AS origin_system, + version AS version, + voseas AS voseas, + iter AS iter, + oseas AS oseas, + omon AS omon, + odate AS odate, + oday AS oday, + om AS om, + oy AS oy, + oytd AS oytd, + rseas AS rseas, + rmon AS rmon, + rdate AS rdate, + rday AS rday, + rm AS rm, + ry AS ry, + rytd AS rytd, + sseas AS sseas, + smon AS smon, + sdate AS sdate, + sday AS sday, + sm AS sm, + sy AS sy, + sytd AS sytd, + sseas_e AS sseas_e, + smon_e AS smon_e, + pseas AS pseas, + pmon AS pmon, + pdate AS pdate, + pday AS pday, + pm AS pm, + py AS py, + pytd AS pytd, + ostatus AS ostatus, + flag_s AS flag_s, + flag_o AS flag_o, + ordnum AS ordnum, + ordline AS ordline, + invnum AS invnum, + invline AS invline, + quoten AS quoten, + quotel AS quotel, + ordquote AS ordquote, + bill_dba AS bill_dba, + bill_cust AS bill_cust, + bill_class AS bill_class, + bill_ctry AS bill_ctry, + bill_prov AS bill_prov, + bill_post AS bill_post, + ship_dba AS ship_dba, + ship_cust AS ship_cust, + ship_class AS ship_class, + dest_ctry AS dest_ctry, + dest_prov AS dest_prov, + dest_post AS dest_post, + chan AS chan, + chansub AS chansub, + chanretail AS chanretail, + chanwide AS chanwide, + customer AS customer, + customer_tier AS customer_tier, + dsm AS dsm, + csr AS csr, + director AS director, + quota_rep AS quota_rep, + default_rep AS default_rep, + retail_rep AS retail_rep, + inside_rep AS inside_rep, + keyaccount_rep AS keyaccount_rep, + geo AS geo, + nursery_region AS nursery_region, + greenhouse_region AS greenhouse_region, + general_region AS general_region, + promo AS promo, + glec AS glec, + segm AS segm, + fs_line AS fs_line, + plnt AS plnt, + part AS part, + partd AS partd, + stlc AS stlc, + stlcd AS stlcd, + partgroup AS partgroup, + partgroupd AS partgroupd, + pricegroup AS pricegroup, + product AS product, + listg AS listg, + biggroup AS biggroup, + leadtime AS leadtime, + colc AS colc, + colcd AS colcd, + colgrp AS colgrp, + coltierd AS coltierd, + sizc AS sizc, + uomp AS uomp, + suffix AS suffix, + suffixd AS suffixd, + accs_ps AS accs_ps, + brnd AS brnd, + programd AS programd, + program AS program, + cgbrand AS cgbrand, + v0dataseg AS v0dataseg, + dataseg AS dataseg, + majgd AS majgd, + mingd AS mingd, + majsd AS majsd, + minsd AS minsd, + assc AS assc, + clss AS clss, + plcd AS plcd, + c_currency AS c_currency, + c_rate AS c_rate, + r_currency AS r_currency, + r_rate AS r_rate, + unit AS unit, + qty AS qty, + qtyord AS qtyord, + pltq AS pltq, + pallets AS pallets, + pounds AS pounds, + sales_usd AS sales_usd, + sales_local AS sales_local, + quoted_usd AS quoted_usd, + target_usd AS target_usd, + list_usd AS list_usd, + stdcost_usd AS stdcost_usd, + stdcost_loc AS stdcost_loc, + stdcost_cur_usd AS stdcost_cur_usd, + stdcost_cur_loc AS stdcost_cur_loc, + stdcost_curm_usd AS stdcost_curm_usd, + stdcost_curl_usd AS stdcost_curl_usd, + stdcost_curv_usd AS stdcost_curv_usd, + stdcost_curf_usd AS stdcost_curf_usd, + stdcost_fut_usd AS stdcost_fut_usd, + stdcost_fut_loc AS stdcost_fut_loc, + stdcost_futm_usd AS stdcost_futm_usd, + stdcost_futl_usd AS stdcost_futl_usd, + stdcost_futv_usd AS stdcost_futv_usd, + stdcost_futf_usd AS stdcost_futf_usd, + margin_hist_usd AS margin_hist_usd, + calc_status AS calc_status, + flag AS flag, + pricing AS pricing, + pending_rep AS pending_rep, + pending_director AS pending_director, + channel_new AS channel_new, + segment_new AS segment_new +FROM rlarp.osm_aop diff --git a/config/modules/osm_fc.json b/config/modules/osm_fc.json new file mode 100644 index 0000000..c82864b --- /dev/null +++ b/config/modules/osm_fc.json @@ -0,0 +1,1058 @@ +{ + "name": "osm_fc", + "source_connection": "usmidsap02", + "dest_connection": "sqlserver", + "dest_table": "rlarp.osm_fc", + "staging_table": "pipekit_staging.osm_fc", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "origin_system", + "source_type": "text", + "dest_name": "origin_system", + "dest_type": "text", + "description": null + }, + { + "source_name": "version", + "source_type": "text", + "dest_name": "version", + "dest_type": "text", + "description": null + }, + { + "source_name": "voseas", + "source_type": "text", + "dest_name": "voseas", + "dest_type": "text", + "description": null + }, + { + "source_name": "iter", + "source_type": "text", + "dest_name": "iter", + "dest_type": "text", + "description": null + }, + { + "source_name": "oseas", + "source_type": "integer", + "dest_name": "oseas", + "dest_type": "integer", + "description": null + }, + { + "source_name": "omon", + "source_type": "text", + "dest_name": "omon", + "dest_type": "text", + "description": null + }, + { + "source_name": "odate", + "source_type": "date", + "dest_name": "odate", + "dest_type": "date", + "description": null + }, + { + "source_name": "oday", + "source_type": "text", + "dest_name": "oday", + "dest_type": "text", + "description": null + }, + { + "source_name": "om", + "source_type": "text", + "dest_name": "om", + "dest_type": "text", + "description": null + }, + { + "source_name": "oy", + "source_type": "text", + "dest_name": "oy", + "dest_type": "text", + "description": null + }, + { + "source_name": "oytd", + "source_type": "text", + "dest_name": "oytd", + "dest_type": "text", + "description": null + }, + { + "source_name": "rseas", + "source_type": "integer", + "dest_name": "rseas", + "dest_type": "integer", + "description": null + }, + { + "source_name": "rmon", + "source_type": "text", + "dest_name": "rmon", + "dest_type": "text", + "description": null + }, + { + "source_name": "rdate", + "source_type": "date", + "dest_name": "rdate", + "dest_type": "date", + "description": null + }, + { + "source_name": "rday", + "source_type": "text", + "dest_name": "rday", + "dest_type": "text", + "description": null + }, + { + "source_name": "rm", + "source_type": "text", + "dest_name": "rm", + "dest_type": "text", + "description": null + }, + { + "source_name": "ry", + "source_type": "text", + "dest_name": "ry", + "dest_type": "text", + "description": null + }, + { + "source_name": "rytd", + "source_type": "text", + "dest_name": "rytd", + "dest_type": "text", + "description": null + }, + { + "source_name": "sseas", + "source_type": "integer", + "dest_name": "sseas", + "dest_type": "integer", + "description": null + }, + { + "source_name": "smon", + "source_type": "text", + "dest_name": "smon", + "dest_type": "text", + "description": null + }, + { + "source_name": "sdate", + "source_type": "date", + "dest_name": "sdate", + "dest_type": "date", + "description": null + }, + { + "source_name": "sday", + "source_type": "text", + "dest_name": "sday", + "dest_type": "text", + "description": null + }, + { + "source_name": "sm", + "source_type": "text", + "dest_name": "sm", + "dest_type": "text", + "description": null + }, + { + "source_name": "sy", + "source_type": "text", + "dest_name": "sy", + "dest_type": "text", + "description": null + }, + { + "source_name": "sytd", + "source_type": "text", + "dest_name": "sytd", + "dest_type": "text", + "description": null + }, + { + "source_name": "sseas_e", + "source_type": "integer", + "dest_name": "sseas_e", + "dest_type": "integer", + "description": null + }, + { + "source_name": "smon_e", + "source_type": "text", + "dest_name": "smon_e", + "dest_type": "text", + "description": null + }, + { + "source_name": "pseas", + "source_type": "integer", + "dest_name": "pseas", + "dest_type": "integer", + "description": null + }, + { + "source_name": "pmon", + "source_type": "text", + "dest_name": "pmon", + "dest_type": "text", + "description": null + }, + { + "source_name": "pdate", + "source_type": "date", + "dest_name": "pdate", + "dest_type": "date", + "description": null + }, + { + "source_name": "pday", + "source_type": "text", + "dest_name": "pday", + "dest_type": "text", + "description": null + }, + { + "source_name": "pm", + "source_type": "text", + "dest_name": "pm", + "dest_type": "text", + "description": null + }, + { + "source_name": "py", + "source_type": "text", + "dest_name": "py", + "dest_type": "text", + "description": null + }, + { + "source_name": "pytd", + "source_type": "text", + "dest_name": "pytd", + "dest_type": "text", + "description": null + }, + { + "source_name": "ostatus", + "source_type": "text", + "dest_name": "ostatus", + "dest_type": "text", + "description": null + }, + { + "source_name": "flag_s", + "source_type": "text", + "dest_name": "flag_s", + "dest_type": "text", + "description": null + }, + { + "source_name": "flag_o", + "source_type": "text", + "dest_name": "flag_o", + "dest_type": "text", + "description": null + }, + { + "source_name": "ordnum", + "source_type": "text", + "dest_name": "ordnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "ordline", + "source_type": "text", + "dest_name": "ordline", + "dest_type": "text", + "description": null + }, + { + "source_name": "invnum", + "source_type": "text", + "dest_name": "invnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "invline", + "source_type": "text", + "dest_name": "invline", + "dest_type": "text", + "description": null + }, + { + "source_name": "quoten", + "source_type": "text", + "dest_name": "quoten", + "dest_type": "text", + "description": null + }, + { + "source_name": "quotel", + "source_type": "text", + "dest_name": "quotel", + "dest_type": "text", + "description": null + }, + { + "source_name": "ordquote", + "source_type": "text", + "dest_name": "ordquote", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_dba", + "source_type": "text", + "dest_name": "bill_dba", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_cust", + "source_type": "text", + "dest_name": "bill_cust", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_class", + "source_type": "text", + "dest_name": "bill_class", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_ctry", + "source_type": "text", + "dest_name": "bill_ctry", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_prov", + "source_type": "text", + "dest_name": "bill_prov", + "dest_type": "text", + "description": null + }, + { + "source_name": "bill_post", + "source_type": "text", + "dest_name": "bill_post", + "dest_type": "text", + "description": null + }, + { + "source_name": "ship_dba", + "source_type": "text", + "dest_name": "ship_dba", + "dest_type": "text", + "description": null + }, + { + "source_name": "ship_cust", + "source_type": "text", + "dest_name": "ship_cust", + "dest_type": "text", + "description": null + }, + { + "source_name": "ship_class", + "source_type": "text", + "dest_name": "ship_class", + "dest_type": "text", + "description": null + }, + { + "source_name": "dest_ctry", + "source_type": "text", + "dest_name": "dest_ctry", + "dest_type": "text", + "description": null + }, + { + "source_name": "dest_prov", + "source_type": "text", + "dest_name": "dest_prov", + "dest_type": "text", + "description": null + }, + { + "source_name": "dest_post", + "source_type": "text", + "dest_name": "dest_post", + "dest_type": "text", + "description": null + }, + { + "source_name": "chan", + "source_type": "text", + "dest_name": "chan", + "dest_type": "text", + "description": null + }, + { + "source_name": "chansub", + "source_type": "text", + "dest_name": "chansub", + "dest_type": "text", + "description": null + }, + { + "source_name": "chanretail", + "source_type": "text", + "dest_name": "chanretail", + "dest_type": "text", + "description": null + }, + { + "source_name": "chanwide", + "source_type": "text", + "dest_name": "chanwide", + "dest_type": "text", + "description": null + }, + { + "source_name": "customer", + "source_type": "text", + "dest_name": "customer", + "dest_type": "text", + "description": null + }, + { + "source_name": "customer_tier", + "source_type": "text", + "dest_name": "customer_tier", + "dest_type": "text", + "description": null + }, + { + "source_name": "dsm", + "source_type": "text", + "dest_name": "dsm", + "dest_type": "text", + "description": null + }, + { + "source_name": "csr", + "source_type": "text", + "dest_name": "csr", + "dest_type": "text", + "description": null + }, + { + "source_name": "director", + "source_type": "text", + "dest_name": "director", + "dest_type": "text", + "description": null + }, + { + "source_name": "quota_rep", + "source_type": "text", + "dest_name": "quota_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "default_rep", + "source_type": "text", + "dest_name": "default_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "retail_rep", + "source_type": "text", + "dest_name": "retail_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "inside_rep", + "source_type": "text", + "dest_name": "inside_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "keyaccount_rep", + "source_type": "text", + "dest_name": "keyaccount_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "geo", + "source_type": "text", + "dest_name": "geo", + "dest_type": "text", + "description": null + }, + { + "source_name": "nursery_region", + "source_type": "text", + "dest_name": "nursery_region", + "dest_type": "text", + "description": null + }, + { + "source_name": "greenhouse_region", + "source_type": "text", + "dest_name": "greenhouse_region", + "dest_type": "text", + "description": null + }, + { + "source_name": "general_region", + "source_type": "text", + "dest_name": "general_region", + "dest_type": "text", + "description": null + }, + { + "source_name": "promo", + "source_type": "text", + "dest_name": "promo", + "dest_type": "text", + "description": null + }, + { + "source_name": "glec", + "source_type": "text", + "dest_name": "glec", + "dest_type": "text", + "description": null + }, + { + "source_name": "segm", + "source_type": "text", + "dest_name": "segm", + "dest_type": "text", + "description": null + }, + { + "source_name": "fs_line", + "source_type": "text", + "dest_name": "fs_line", + "dest_type": "text", + "description": null + }, + { + "source_name": "plnt", + "source_type": "text", + "dest_name": "plnt", + "dest_type": "text", + "description": null + }, + { + "source_name": "part", + "source_type": "text", + "dest_name": "part", + "dest_type": "text", + "description": null + }, + { + "source_name": "partd", + "source_type": "text", + "dest_name": "partd", + "dest_type": "text", + "description": null + }, + { + "source_name": "stlc", + "source_type": "text", + "dest_name": "stlc", + "dest_type": "text", + "description": null + }, + { + "source_name": "stlcd", + "source_type": "text", + "dest_name": "stlcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "partgroup", + "source_type": "text", + "dest_name": "partgroup", + "dest_type": "text", + "description": null + }, + { + "source_name": "partgroupd", + "source_type": "text", + "dest_name": "partgroupd", + "dest_type": "text", + "description": null + }, + { + "source_name": "pricegroup", + "source_type": "text", + "dest_name": "pricegroup", + "dest_type": "text", + "description": null + }, + { + "source_name": "product", + "source_type": "text", + "dest_name": "product", + "dest_type": "text", + "description": null + }, + { + "source_name": "listg", + "source_type": "text", + "dest_name": "listg", + "dest_type": "text", + "description": null + }, + { + "source_name": "biggroup", + "source_type": "text", + "dest_name": "biggroup", + "dest_type": "text", + "description": null + }, + { + "source_name": "leadtime", + "source_type": "text", + "dest_name": "leadtime", + "dest_type": "text", + "description": null + }, + { + "source_name": "colc", + "source_type": "text", + "dest_name": "colc", + "dest_type": "text", + "description": null + }, + { + "source_name": "colcd", + "source_type": "text", + "dest_name": "colcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "colgrp", + "source_type": "text", + "dest_name": "colgrp", + "dest_type": "text", + "description": null + }, + { + "source_name": "coltierd", + "source_type": "text", + "dest_name": "coltierd", + "dest_type": "text", + "description": null + }, + { + "source_name": "sizc", + "source_type": "text", + "dest_name": "sizc", + "dest_type": "text", + "description": null + }, + { + "source_name": "uomp", + "source_type": "text", + "dest_name": "uomp", + "dest_type": "text", + "description": null + }, + { + "source_name": "suffix", + "source_type": "text", + "dest_name": "suffix", + "dest_type": "text", + "description": null + }, + { + "source_name": "suffixd", + "source_type": "text", + "dest_name": "suffixd", + "dest_type": "text", + "description": null + }, + { + "source_name": "accs_ps", + "source_type": "text", + "dest_name": "accs_ps", + "dest_type": "text", + "description": null + }, + { + "source_name": "brnd", + "source_type": "text", + "dest_name": "brnd", + "dest_type": "text", + "description": null + }, + { + "source_name": "programd", + "source_type": "text", + "dest_name": "programd", + "dest_type": "text", + "description": null + }, + { + "source_name": "program", + "source_type": "text", + "dest_name": "program", + "dest_type": "text", + "description": null + }, + { + "source_name": "cgbrand", + "source_type": "text", + "dest_name": "cgbrand", + "dest_type": "text", + "description": null + }, + { + "source_name": "v0dataseg", + "source_type": "text", + "dest_name": "v0dataseg", + "dest_type": "text", + "description": null + }, + { + "source_name": "dataseg", + "source_type": "text", + "dest_name": "dataseg", + "dest_type": "text", + "description": null + }, + { + "source_name": "majgd", + "source_type": "text", + "dest_name": "majgd", + "dest_type": "text", + "description": null + }, + { + "source_name": "mingd", + "source_type": "text", + "dest_name": "mingd", + "dest_type": "text", + "description": null + }, + { + "source_name": "majsd", + "source_type": "text", + "dest_name": "majsd", + "dest_type": "text", + "description": null + }, + { + "source_name": "minsd", + "source_type": "text", + "dest_name": "minsd", + "dest_type": "text", + "description": null + }, + { + "source_name": "assc", + "source_type": "text", + "dest_name": "assc", + "dest_type": "text", + "description": null + }, + { + "source_name": "clss", + "source_type": "text", + "dest_name": "clss", + "dest_type": "text", + "description": null + }, + { + "source_name": "plcd", + "source_type": "text", + "dest_name": "plcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "c_currency", + "source_type": "text", + "dest_name": "c_currency", + "dest_type": "text", + "description": null + }, + { + "source_name": "c_rate", + "source_type": "numeric", + "dest_name": "c_rate", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "r_currency", + "source_type": "text", + "dest_name": "r_currency", + "dest_type": "text", + "description": null + }, + { + "source_name": "r_rate", + "source_type": "numeric", + "dest_name": "r_rate", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "unit", + "source_type": "text", + "dest_name": "unit", + "dest_type": "text", + "description": null + }, + { + "source_name": "qty", + "source_type": "numeric(38,2)", + "dest_name": "qty", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "qtyord", + "source_type": "numeric(38,2)", + "dest_name": "qtyord", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "pltq", + "source_type": "numeric(38,2)", + "dest_name": "pltq", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "pallets", + "source_type": "numeric(38,2)", + "dest_name": "pallets", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "pounds", + "source_type": "numeric(38,2)", + "dest_name": "pounds", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "sales_usd", + "source_type": "numeric(38,2)", + "dest_name": "sales_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "sales_local", + "source_type": "numeric(38,2)", + "dest_name": "sales_local", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "quoted_usd", + "source_type": "numeric(38,2)", + "dest_name": "quoted_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "target_usd", + "source_type": "numeric(38,2)", + "dest_name": "target_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "list_usd", + "source_type": "numeric(38,2)", + "dest_name": "list_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_loc", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_loc", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_cur_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_cur_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_cur_loc", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_cur_loc", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_curm_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_curm_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_curl_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_curl_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_curv_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_curv_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_curf_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_curf_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_fut_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_fut_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_fut_loc", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_fut_loc", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_futm_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_futm_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_futl_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_futl_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_futv_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_futv_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "stdcost_futf_usd", + "source_type": "numeric(38,2)", + "dest_name": "stdcost_futf_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "margin_hist_usd", + "source_type": "numeric(38,2)", + "dest_name": "margin_hist_usd", + "dest_type": "numeric(38,2)", + "description": null + }, + { + "source_name": "calc_status", + "source_type": "text", + "dest_name": "calc_status", + "dest_type": "text", + "description": null + }, + { + "source_name": "flag", + "source_type": "text", + "dest_name": "flag", + "dest_type": "text", + "description": null + }, + { + "source_name": "pricing", + "source_type": "jsonb", + "dest_name": "pricing", + "dest_type": "jsonb", + "description": null + }, + { + "source_name": "pending_rep", + "source_type": "text", + "dest_name": "pending_rep", + "dest_type": "text", + "description": null + }, + { + "source_name": "pending_director", + "source_type": "text", + "dest_name": "pending_director", + "dest_type": "text", + "description": null + }, + { + "source_name": "channel_new", + "source_type": "text", + "dest_name": "channel_new", + "dest_type": "text", + "description": null + }, + { + "source_name": "segment_new", + "source_type": "text", + "dest_name": "segment_new", + "dest_type": "text", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/osm_fc.sql b/config/modules/osm_fc.sql new file mode 100644 index 0000000..c02c88c --- /dev/null +++ b/config/modules/osm_fc.sql @@ -0,0 +1,151 @@ +SELECT + origin_system AS origin_system, + version AS version, + voseas AS voseas, + iter AS iter, + oseas AS oseas, + omon AS omon, + odate AS odate, + oday AS oday, + om AS om, + oy AS oy, + oytd AS oytd, + rseas AS rseas, + rmon AS rmon, + rdate AS rdate, + rday AS rday, + rm AS rm, + ry AS ry, + rytd AS rytd, + sseas AS sseas, + smon AS smon, + sdate AS sdate, + sday AS sday, + sm AS sm, + sy AS sy, + sytd AS sytd, + sseas_e AS sseas_e, + smon_e AS smon_e, + pseas AS pseas, + pmon AS pmon, + pdate AS pdate, + pday AS pday, + pm AS pm, + py AS py, + pytd AS pytd, + ostatus AS ostatus, + flag_s AS flag_s, + flag_o AS flag_o, + ordnum AS ordnum, + ordline AS ordline, + invnum AS invnum, + invline AS invline, + quoten AS quoten, + quotel AS quotel, + ordquote AS ordquote, + bill_dba AS bill_dba, + bill_cust AS bill_cust, + bill_class AS bill_class, + bill_ctry AS bill_ctry, + bill_prov AS bill_prov, + bill_post AS bill_post, + ship_dba AS ship_dba, + ship_cust AS ship_cust, + ship_class AS ship_class, + dest_ctry AS dest_ctry, + dest_prov AS dest_prov, + dest_post AS dest_post, + chan AS chan, + chansub AS chansub, + chanretail AS chanretail, + chanwide AS chanwide, + customer AS customer, + customer_tier AS customer_tier, + dsm AS dsm, + csr AS csr, + director AS director, + quota_rep AS quota_rep, + default_rep AS default_rep, + retail_rep AS retail_rep, + inside_rep AS inside_rep, + keyaccount_rep AS keyaccount_rep, + geo AS geo, + nursery_region AS nursery_region, + greenhouse_region AS greenhouse_region, + general_region AS general_region, + promo AS promo, + glec AS glec, + segm AS segm, + fs_line AS fs_line, + plnt AS plnt, + part AS part, + partd AS partd, + stlc AS stlc, + stlcd AS stlcd, + partgroup AS partgroup, + partgroupd AS partgroupd, + pricegroup AS pricegroup, + product AS product, + listg AS listg, + biggroup AS biggroup, + leadtime AS leadtime, + colc AS colc, + colcd AS colcd, + colgrp AS colgrp, + coltierd AS coltierd, + sizc AS sizc, + uomp AS uomp, + suffix AS suffix, + suffixd AS suffixd, + accs_ps AS accs_ps, + brnd AS brnd, + programd AS programd, + program AS program, + cgbrand AS cgbrand, + v0dataseg AS v0dataseg, + dataseg AS dataseg, + majgd AS majgd, + mingd AS mingd, + majsd AS majsd, + minsd AS minsd, + assc AS assc, + clss AS clss, + plcd AS plcd, + c_currency AS c_currency, + c_rate AS c_rate, + r_currency AS r_currency, + r_rate AS r_rate, + unit AS unit, + qty AS qty, + qtyord AS qtyord, + pltq AS pltq, + pallets AS pallets, + pounds AS pounds, + sales_usd AS sales_usd, + sales_local AS sales_local, + quoted_usd AS quoted_usd, + target_usd AS target_usd, + list_usd AS list_usd, + stdcost_usd AS stdcost_usd, + stdcost_loc AS stdcost_loc, + stdcost_cur_usd AS stdcost_cur_usd, + stdcost_cur_loc AS stdcost_cur_loc, + stdcost_curm_usd AS stdcost_curm_usd, + stdcost_curl_usd AS stdcost_curl_usd, + stdcost_curv_usd AS stdcost_curv_usd, + stdcost_curf_usd AS stdcost_curf_usd, + stdcost_fut_usd AS stdcost_fut_usd, + stdcost_fut_loc AS stdcost_fut_loc, + stdcost_futm_usd AS stdcost_futm_usd, + stdcost_futl_usd AS stdcost_futl_usd, + stdcost_futv_usd AS stdcost_futv_usd, + stdcost_futf_usd AS stdcost_futf_usd, + margin_hist_usd AS margin_hist_usd, + calc_status AS calc_status, + flag AS flag, + pricing AS pricing, + pending_rep AS pending_rep, + pending_director AS pending_director, + channel_new AS channel_new, + segment_new AS segment_new +FROM rlarp.osm_fc diff --git a/config/modules/rm00101.json b/config/modules/rm00101.json new file mode 100644 index 0000000..6ed92a9 --- /dev/null +++ b/config/modules/rm00101.json @@ -0,0 +1,736 @@ +{ + "name": "rm00101", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.rm00101", + "staging_table": "pipekit_staging.rm00101", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "GP customer/salesperson/item master (broadened, migrated from /opt/sync 2026-07-21)", + "columns": [ + { + "source_name": "CUSTNMBR", + "source_type": "CHAR(15)", + "dest_name": "custnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CUSTNAME", + "source_type": "CHAR(65)", + "dest_name": "custname", + "dest_type": "text", + "description": null + }, + { + "source_name": "COUNTRY", + "source_type": "CHAR(61)", + "dest_name": "country", + "dest_type": "text", + "description": null + }, + { + "source_name": "STATE", + "source_type": "CHAR(29)", + "dest_name": "state", + "dest_type": "text", + "description": null + }, + { + "source_name": "CITY", + "source_type": "CHAR(35)", + "dest_name": "city", + "dest_type": "text", + "description": null + }, + { + "source_name": "USERDEF1", + "source_type": "CHAR(21)", + "dest_name": "userdef1", + "dest_type": "text", + "description": null + }, + { + "source_name": "RATETPID", + "source_type": "CHAR(15)", + "dest_name": "ratetpid", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRCLEVEL", + "source_type": "CHAR(11)", + "dest_name": "prclevel", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLPRSNID", + "source_type": "CHAR(15)", + "dest_name": "slprsnid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CUSTCLAS", + "source_type": "CHAR(15)", + "dest_name": "custclas", + "dest_type": "text", + "description": null + }, + { + "source_name": "CPRCSTNM", + "source_type": "CHAR(15)", + "dest_name": "cprcstnm", + "dest_type": "text", + "description": null + }, + { + "source_name": "CNTCPRSN", + "source_type": "CHAR(61)", + "dest_name": "cntcprsn", + "dest_type": "text", + "description": null + }, + { + "source_name": "STMTNAME", + "source_type": "CHAR(65)", + "dest_name": "stmtname", + "dest_type": "text", + "description": null + }, + { + "source_name": "SHRTNAME", + "source_type": "CHAR(15)", + "dest_name": "shrtname", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADRSCODE", + "source_type": "CHAR(15)", + "dest_name": "adrscode", + "dest_type": "text", + "description": null + }, + { + "source_name": "UPSZONE", + "source_type": "CHAR(3)", + "dest_name": "upszone", + "dest_type": "text", + "description": null + }, + { + "source_name": "SHIPMTHD", + "source_type": "CHAR(15)", + "dest_name": "shipmthd", + "dest_type": "text", + "description": null + }, + { + "source_name": "TAXSCHID", + "source_type": "CHAR(15)", + "dest_name": "taxschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS1", + "source_type": "CHAR(61)", + "dest_name": "address1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS2", + "source_type": "CHAR(61)", + "dest_name": "address2", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS3", + "source_type": "CHAR(61)", + "dest_name": "address3", + "dest_type": "text", + "description": null + }, + { + "source_name": "ZIP", + "source_type": "CHAR(11)", + "dest_name": "zip", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE1", + "source_type": "CHAR(21)", + "dest_name": "phone1", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE2", + "source_type": "CHAR(21)", + "dest_name": "phone2", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE3", + "source_type": "CHAR(21)", + "dest_name": "phone3", + "dest_type": "text", + "description": null + }, + { + "source_name": "FAX", + "source_type": "CHAR(21)", + "dest_name": "fax", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRBTADCD", + "source_type": "CHAR(15)", + "dest_name": "prbtadcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRSTADCD", + "source_type": "CHAR(15)", + "dest_name": "prstadcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "STADDRCD", + "source_type": "CHAR(15)", + "dest_name": "staddrcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "CHEKBKID", + "source_type": "CHAR(15)", + "dest_name": "chekbkid", + "dest_type": "text", + "description": null + }, + { + "source_name": "PYMTRMID", + "source_type": "CHAR(21)", + "dest_name": "pymtrmid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CRLMTTYP", + "source_type": "SMALLINT", + "dest_name": "crlmttyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CRLMTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "crlmtamt", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "CRLMTPER", + "source_type": "SMALLINT", + "dest_name": "crlmtper", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CRLMTPAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "crlmtpam", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "CURNCYID", + "source_type": "CHAR(15)", + "dest_name": "curncyid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CUSTDISC", + "source_type": "SMALLINT", + "dest_name": "custdisc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MINPYTYP", + "source_type": "SMALLINT", + "dest_name": "minpytyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MINPYDLR", + "source_type": "NUMERIC(19,5)", + "dest_name": "minpydlr", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "MINPYPCT", + "source_type": "SMALLINT", + "dest_name": "minpypct", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FNCHATYP", + "source_type": "SMALLINT", + "dest_name": "fnchatyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FNCHPCNT", + "source_type": "SMALLINT", + "dest_name": "fnchpcnt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FINCHDLR", + "source_type": "NUMERIC(19,5)", + "dest_name": "finchdlr", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "MXWOFTYP", + "source_type": "SMALLINT", + "dest_name": "mxwoftyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MXWROFAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "mxwrofam", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "COMMENT1", + "source_type": "CHAR(31)", + "dest_name": "comment1", + "dest_type": "text", + "description": null + }, + { + "source_name": "COMMENT2", + "source_type": "CHAR(31)", + "dest_name": "comment2", + "dest_type": "text", + "description": null + }, + { + "source_name": "USERDEF2", + "source_type": "CHAR(21)", + "dest_name": "userdef2", + "dest_type": "text", + "description": null + }, + { + "source_name": "TAXEXMT1", + "source_type": "CHAR(25)", + "dest_name": "taxexmt1", + "dest_type": "text", + "description": null + }, + { + "source_name": "TAXEXMT2", + "source_type": "CHAR(25)", + "dest_name": "taxexmt2", + "dest_type": "text", + "description": null + }, + { + "source_name": "TXRGNNUM", + "source_type": "CHAR(25)", + "dest_name": "txrgnnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "BALNCTYP", + "source_type": "SMALLINT", + "dest_name": "balnctyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "STMTCYCL", + "source_type": "SMALLINT", + "dest_name": "stmtcycl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BANKNAME", + "source_type": "CHAR(31)", + "dest_name": "bankname", + "dest_type": "text", + "description": null + }, + { + "source_name": "BNKBRNCH", + "source_type": "CHAR(21)", + "dest_name": "bnkbrnch", + "dest_type": "text", + "description": null + }, + { + "source_name": "SALSTERR", + "source_type": "CHAR(15)", + "dest_name": "salsterr", + "dest_type": "text", + "description": null + }, + { + "source_name": "DEFCACTY", + "source_type": "SMALLINT", + "dest_name": "defcacty", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "RMCSHACC", + "source_type": "INT", + "dest_name": "rmcshacc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RMARACC", + "source_type": "INT", + "dest_name": "rmaracc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RMSLSACC", + "source_type": "INT", + "dest_name": "rmslsacc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RMIVACC", + "source_type": "INT", + "dest_name": "rmivacc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RMCOSACC", + "source_type": "INT", + "dest_name": "rmcosacc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RMTAKACC", + "source_type": "INT", + "dest_name": "rmtakacc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RMAVACC", + "source_type": "INT", + "dest_name": "rmavacc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RMFCGACC", + "source_type": "INT", + "dest_name": "rmfcgacc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RMWRACC", + "source_type": "INT", + "dest_name": "rmwracc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RMSORACC", + "source_type": "INT", + "dest_name": "rmsoracc", + "dest_type": "integer", + "description": null + }, + { + "source_name": "FRSTINDT", + "source_type": "DATETIME", + "dest_name": "frstindt", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "INACTIVE", + "source_type": "TINYINT", + "dest_name": "inactive", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "HOLD", + "source_type": "TINYINT", + "dest_name": "hold", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CRCARDID", + "source_type": "CHAR(15)", + "dest_name": "crcardid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CRCRDNUM", + "source_type": "CHAR(21)", + "dest_name": "crcrdnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "CCRDXPDT", + "source_type": "DATETIME", + "dest_name": "ccrdxpdt", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "KPDSTHST", + "source_type": "TINYINT", + "dest_name": "kpdsthst", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "KPCALHST", + "source_type": "TINYINT", + "dest_name": "kpcalhst", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "KPERHIST", + "source_type": "TINYINT", + "dest_name": "kperhist", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "KPTRXHST", + "source_type": "TINYINT", + "dest_name": "kptrxhst", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "CREATDDT", + "source_type": "DATETIME", + "dest_name": "creatddt", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "MODIFDT", + "source_type": "DATETIME", + "dest_name": "modifdt", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "Revalue_Customer", + "source_type": "TINYINT", + "dest_name": "revalue_customer", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Post_Results_To", + "source_type": "SMALLINT", + "dest_name": "post_results_to", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FINCHID", + "source_type": "CHAR(15)", + "dest_name": "finchid", + "dest_type": "text", + "description": null + }, + { + "source_name": "GOVCRPID", + "source_type": "CHAR(31)", + "dest_name": "govcrpid", + "dest_type": "text", + "description": null + }, + { + "source_name": "GOVINDID", + "source_type": "CHAR(31)", + "dest_name": "govindid", + "dest_type": "text", + "description": null + }, + { + "source_name": "DISGRPER", + "source_type": "SMALLINT", + "dest_name": "disgrper", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DUEGRPER", + "source_type": "SMALLINT", + "dest_name": "duegrper", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DOCFMTID", + "source_type": "CHAR(15)", + "dest_name": "docfmtid", + "dest_type": "text", + "description": null + }, + { + "source_name": "Send_Email_Statements", + "source_type": "TINYINT", + "dest_name": "send_email_statements", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "USERLANG", + "source_type": "SMALLINT", + "dest_name": "userlang", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "GPSFOINTEGRATIONID", + "source_type": "CHAR(31)", + "dest_name": "gpsfointegrationid", + "dest_type": "text", + "description": null + }, + { + "source_name": "INTEGRATIONSOURCE", + "source_type": "SMALLINT", + "dest_name": "integrationsource", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INTEGRATIONID", + "source_type": "CHAR(31)", + "dest_name": "integrationid", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORDERFULFILLDEFAULT", + "source_type": "SMALLINT", + "dest_name": "orderfulfilldefault", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CUSTPRIORITY", + "source_type": "SMALLINT", + "dest_name": "custpriority", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CCode", + "source_type": "CHAR(7)", + "dest_name": "ccode", + "dest_type": "text", + "description": null + }, + { + "source_name": "DECLID", + "source_type": "CHAR(15)", + "dest_name": "declid", + "dest_type": "text", + "description": null + }, + { + "source_name": "RMOvrpymtWrtoffAcctIdx", + "source_type": "INT", + "dest_name": "rmovrpymtwrtoffacctidx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "SHIPCOMPLETE", + "source_type": "TINYINT", + "dest_name": "shipcomplete", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CBVAT", + "source_type": "TINYINT", + "dest_name": "cbvat", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INCLUDEINDP", + "source_type": "TINYINT", + "dest_name": "includeindp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/rm00101.sql b/config/modules/rm00101.sql new file mode 100644 index 0000000..f28f1fe --- /dev/null +++ b/config/modules/rm00101.sql @@ -0,0 +1,105 @@ +SELECT + RTRIM([CUSTNMBR]) AS custnmbr, + RTRIM([CUSTNAME]) AS custname, + RTRIM([COUNTRY]) AS country, + RTRIM([STATE]) AS state, + RTRIM([CITY]) AS city, + RTRIM([USERDEF1]) AS userdef1, + RTRIM([RATETPID]) AS ratetpid, + RTRIM([PRCLEVEL]) AS prclevel, + RTRIM([SLPRSNID]) AS slprsnid, + RTRIM([CUSTCLAS]) AS custclas, + RTRIM([CPRCSTNM]) AS cprcstnm, + RTRIM([CNTCPRSN]) AS cntcprsn, + RTRIM([STMTNAME]) AS stmtname, + RTRIM([SHRTNAME]) AS shrtname, + RTRIM([ADRSCODE]) AS adrscode, + RTRIM([UPSZONE]) AS upszone, + RTRIM([SHIPMTHD]) AS shipmthd, + RTRIM([TAXSCHID]) AS taxschid, + RTRIM([ADDRESS1]) AS address1, + RTRIM([ADDRESS2]) AS address2, + RTRIM([ADDRESS3]) AS address3, + RTRIM([ZIP]) AS zip, + RTRIM([PHONE1]) AS phone1, + RTRIM([PHONE2]) AS phone2, + RTRIM([PHONE3]) AS phone3, + RTRIM([FAX]) AS fax, + RTRIM([PRBTADCD]) AS prbtadcd, + RTRIM([PRSTADCD]) AS prstadcd, + RTRIM([STADDRCD]) AS staddrcd, + RTRIM([CHEKBKID]) AS chekbkid, + RTRIM([PYMTRMID]) AS pymtrmid, + [CRLMTTYP] AS crlmttyp, + [CRLMTAMT] AS crlmtamt, + [CRLMTPER] AS crlmtper, + [CRLMTPAM] AS crlmtpam, + RTRIM([CURNCYID]) AS curncyid, + [CUSTDISC] AS custdisc, + [MINPYTYP] AS minpytyp, + [MINPYDLR] AS minpydlr, + [MINPYPCT] AS minpypct, + [FNCHATYP] AS fnchatyp, + [FNCHPCNT] AS fnchpcnt, + [FINCHDLR] AS finchdlr, + [MXWOFTYP] AS mxwoftyp, + [MXWROFAM] AS mxwrofam, + RTRIM([COMMENT1]) AS comment1, + RTRIM([COMMENT2]) AS comment2, + RTRIM([USERDEF2]) AS userdef2, + RTRIM([TAXEXMT1]) AS taxexmt1, + RTRIM([TAXEXMT2]) AS taxexmt2, + RTRIM([TXRGNNUM]) AS txrgnnum, + [BALNCTYP] AS balnctyp, + [STMTCYCL] AS stmtcycl, + RTRIM([BANKNAME]) AS bankname, + RTRIM([BNKBRNCH]) AS bnkbrnch, + RTRIM([SALSTERR]) AS salsterr, + [DEFCACTY] AS defcacty, + [RMCSHACC] AS rmcshacc, + [RMARACC] AS rmaracc, + [RMSLSACC] AS rmslsacc, + [RMIVACC] AS rmivacc, + [RMCOSACC] AS rmcosacc, + [RMTAKACC] AS rmtakacc, + [RMAVACC] AS rmavacc, + [RMFCGACC] AS rmfcgacc, + [RMWRACC] AS rmwracc, + [RMSORACC] AS rmsoracc, + [FRSTINDT] AS frstindt, + [INACTIVE] AS inactive, + [HOLD] AS hold, + RTRIM([CRCARDID]) AS crcardid, + RTRIM([CRCRDNUM]) AS crcrdnum, + [CCRDXPDT] AS ccrdxpdt, + [KPDSTHST] AS kpdsthst, + [KPCALHST] AS kpcalhst, + [KPERHIST] AS kperhist, + [KPTRXHST] AS kptrxhst, + [NOTEINDX] AS noteindx, + [CREATDDT] AS creatddt, + [MODIFDT] AS modifdt, + [Revalue_Customer] AS revalue_customer, + [Post_Results_To] AS post_results_to, + RTRIM([FINCHID]) AS finchid, + RTRIM([GOVCRPID]) AS govcrpid, + RTRIM([GOVINDID]) AS govindid, + [DISGRPER] AS disgrper, + [DUEGRPER] AS duegrper, + RTRIM([DOCFMTID]) AS docfmtid, + [Send_Email_Statements] AS send_email_statements, + [USERLANG] AS userlang, + RTRIM([GPSFOINTEGRATIONID]) AS gpsfointegrationid, + [INTEGRATIONSOURCE] AS integrationsource, + RTRIM([INTEGRATIONID]) AS integrationid, + [ORDERFULFILLDEFAULT] AS orderfulfilldefault, + [CUSTPRIORITY] AS custpriority, + RTRIM([CCode]) AS ccode, + RTRIM([DECLID]) AS declid, + [RMOvrpymtWrtoffAcctIdx] AS rmovrpymtwrtoffacctidx, + [SHIPCOMPLETE] AS shipcomplete, + [CBVAT] AS cbvat, + [INCLUDEINDP] AS includeindp, + [DEX_ROW_TS] AS dex_row_ts, + [DEX_ROW_ID] AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[RM00101] diff --git a/config/modules/rm00301.json b/config/modules/rm00301.json new file mode 100644 index 0000000..99f9267 --- /dev/null +++ b/config/modules/rm00301.json @@ -0,0 +1,288 @@ +{ + "name": "rm00301", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.rm00301", + "staging_table": "pipekit_staging.rm00301", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "GP customer/salesperson/item master (broadened, migrated from /opt/sync 2026-07-21)", + "columns": [ + { + "source_name": "SLPRSNID", + "source_type": "CHAR(15)", + "dest_name": "slprsnid", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLPRSNFN", + "source_type": "CHAR(15)", + "dest_name": "slprsnfn", + "dest_type": "text", + "description": null + }, + { + "source_name": "SPRSNSLN", + "source_type": "CHAR(21)", + "dest_name": "sprsnsln", + "dest_type": "text", + "description": null + }, + { + "source_name": "EMPLOYID", + "source_type": "CHAR(15)", + "dest_name": "employid", + "dest_type": "text", + "description": null + }, + { + "source_name": "VENDORID", + "source_type": "CHAR(15)", + "dest_name": "vendorid", + "dest_type": "text", + "description": null + }, + { + "source_name": "SPRSNSMN", + "source_type": "CHAR(15)", + "dest_name": "sprsnsmn", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS1", + "source_type": "CHAR(61)", + "dest_name": "address1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS2", + "source_type": "CHAR(61)", + "dest_name": "address2", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS3", + "source_type": "CHAR(61)", + "dest_name": "address3", + "dest_type": "text", + "description": null + }, + { + "source_name": "CITY", + "source_type": "CHAR(35)", + "dest_name": "city", + "dest_type": "text", + "description": null + }, + { + "source_name": "STATE", + "source_type": "CHAR(29)", + "dest_name": "state", + "dest_type": "text", + "description": null + }, + { + "source_name": "ZIP", + "source_type": "CHAR(11)", + "dest_name": "zip", + "dest_type": "text", + "description": null + }, + { + "source_name": "COUNTRY", + "source_type": "CHAR(61)", + "dest_name": "country", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE1", + "source_type": "CHAR(21)", + "dest_name": "phone1", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE2", + "source_type": "CHAR(21)", + "dest_name": "phone2", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE3", + "source_type": "CHAR(21)", + "dest_name": "phone3", + "dest_type": "text", + "description": null + }, + { + "source_name": "FAX", + "source_type": "CHAR(21)", + "dest_name": "fax", + "dest_type": "text", + "description": null + }, + { + "source_name": "INACTIVE", + "source_type": "TINYINT", + "dest_name": "inactive", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SALSTERR", + "source_type": "CHAR(15)", + "dest_name": "salsterr", + "dest_type": "text", + "description": null + }, + { + "source_name": "COMMCODE", + "source_type": "CHAR(15)", + "dest_name": "commcode", + "dest_type": "text", + "description": null + }, + { + "source_name": "COMPRCNT", + "source_type": "SMALLINT", + "dest_name": "comprcnt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "STDCPRCT", + "source_type": "SMALLINT", + "dest_name": "stdcprct", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "COMAPPTO", + "source_type": "SMALLINT", + "dest_name": "comappto", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "COSTTODT", + "source_type": "NUMERIC(19,5)", + "dest_name": "costtodt", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "CSTLSTYR", + "source_type": "NUMERIC(19,5)", + "dest_name": "cstlstyr", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "TTLCOMTD", + "source_type": "NUMERIC(19,5)", + "dest_name": "ttlcomtd", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "TTLCOMLY", + "source_type": "NUMERIC(19,5)", + "dest_name": "ttlcomly", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "COMSLTDT", + "source_type": "NUMERIC(19,5)", + "dest_name": "comsltdt", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "COMSLLYR", + "source_type": "NUMERIC(19,5)", + "dest_name": "comsllyr", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "NCOMSLTD", + "source_type": "NUMERIC(19,5)", + "dest_name": "ncomsltd", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "NCOMSLYR", + "source_type": "NUMERIC(19,5)", + "dest_name": "ncomslyr", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "KPCALHST", + "source_type": "TINYINT", + "dest_name": "kpcalhst", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "KPERHIST", + "source_type": "TINYINT", + "dest_name": "kperhist", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "MODIFDT", + "source_type": "DATETIME", + "dest_name": "modifdt", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "CREATDDT", + "source_type": "DATETIME", + "dest_name": "creatddt", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "COMMDEST", + "source_type": "SMALLINT", + "dest_name": "commdest", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp without time zone", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/rm00301.sql b/config/modules/rm00301.sql new file mode 100644 index 0000000..b6d9576 --- /dev/null +++ b/config/modules/rm00301.sql @@ -0,0 +1,41 @@ +SELECT + RTRIM([SLPRSNID]) AS slprsnid, + RTRIM([SLPRSNFN]) AS slprsnfn, + RTRIM([SPRSNSLN]) AS sprsnsln, + RTRIM([EMPLOYID]) AS employid, + RTRIM([VENDORID]) AS vendorid, + RTRIM([SPRSNSMN]) AS sprsnsmn, + RTRIM([ADDRESS1]) AS address1, + RTRIM([ADDRESS2]) AS address2, + RTRIM([ADDRESS3]) AS address3, + RTRIM([CITY]) AS city, + RTRIM([STATE]) AS state, + RTRIM([ZIP]) AS zip, + RTRIM([COUNTRY]) AS country, + RTRIM([PHONE1]) AS phone1, + RTRIM([PHONE2]) AS phone2, + RTRIM([PHONE3]) AS phone3, + RTRIM([FAX]) AS fax, + [INACTIVE] AS inactive, + RTRIM([SALSTERR]) AS salsterr, + RTRIM([COMMCODE]) AS commcode, + [COMPRCNT] AS comprcnt, + [STDCPRCT] AS stdcprct, + [COMAPPTO] AS comappto, + [COSTTODT] AS costtodt, + [CSTLSTYR] AS cstlstyr, + [TTLCOMTD] AS ttlcomtd, + [TTLCOMLY] AS ttlcomly, + [COMSLTDT] AS comsltdt, + [COMSLLYR] AS comsllyr, + [NCOMSLTD] AS ncomsltd, + [NCOMSLYR] AS ncomslyr, + [KPCALHST] AS kpcalhst, + [KPERHIST] AS kperhist, + [NOTEINDX] AS noteindx, + [MODIFDT] AS modifdt, + [CREATDDT] AS creatddt, + [COMMDEST] AS commdest, + [DEX_ROW_TS] AS dex_row_ts, + [DEX_ROW_ID] AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[RM00301] diff --git a/config/modules/rm20101.json b/config/modules/rm20101.json new file mode 100644 index 0000000..c9042b5 --- /dev/null +++ b/config/modules/rm20101.json @@ -0,0 +1,526 @@ +{ + "name": "rm20101", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.rm20101", + "staging_table": "pipekit_staging.rm20101", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "CUSTNMBR", + "source_type": "CHAR(15)", + "dest_name": "custnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CPRCSTNM", + "source_type": "CHAR(15)", + "dest_name": "cprcstnm", + "dest_type": "text", + "description": null + }, + { + "source_name": "DOCNUMBR", + "source_type": "CHAR(21)", + "dest_name": "docnumbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CHEKNMBR", + "source_type": "CHAR(21)", + "dest_name": "cheknmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "BACHNUMB", + "source_type": "CHAR(15)", + "dest_name": "bachnumb", + "dest_type": "text", + "description": null + }, + { + "source_name": "BCHSOURC", + "source_type": "CHAR(15)", + "dest_name": "bchsourc", + "dest_type": "text", + "description": null + }, + { + "source_name": "TRXSORCE", + "source_type": "CHAR(13)", + "dest_name": "trxsorce", + "dest_type": "text", + "description": null + }, + { + "source_name": "RMDTYPAL", + "source_type": "SMALLINT", + "dest_name": "rmdtypal", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CSHRCTYP", + "source_type": "SMALLINT", + "dest_name": "cshrctyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CBKIDCRD", + "source_type": "CHAR(15)", + "dest_name": "cbkidcrd", + "dest_type": "text", + "description": null + }, + { + "source_name": "CBKIDCSH", + "source_type": "CHAR(15)", + "dest_name": "cbkidcsh", + "dest_type": "text", + "description": null + }, + { + "source_name": "CBKIDCHK", + "source_type": "CHAR(15)", + "dest_name": "cbkidchk", + "dest_type": "text", + "description": null + }, + { + "source_name": "DUEDATE", + "source_type": "DATETIME", + "dest_name": "duedate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DOCDATE", + "source_type": "DATETIME", + "dest_name": "docdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "POSTDATE", + "source_type": "DATETIME", + "dest_name": "postdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "PSTUSRID", + "source_type": "CHAR(15)", + "dest_name": "pstusrid", + "dest_type": "text", + "description": null + }, + { + "source_name": "GLPOSTDT", + "source_type": "DATETIME", + "dest_name": "glpostdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "LSTEDTDT", + "source_type": "DATETIME", + "dest_name": "lstedtdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "LSTUSRED", + "source_type": "CHAR(15)", + "dest_name": "lstusred", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORTRXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortrxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CURTRXAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "curtrxam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SLSAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "slsamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "COSTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "costamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "FRTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "frtamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MISCAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "miscamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TAXAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "taxamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "COMDLRAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "comdlram", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CASHAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "cashamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISTKNAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "distknam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISAVAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "disavamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISAVTKN", + "source_type": "NUMERIC(19,5)", + "dest_name": "disavtkn", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCRTND", + "source_type": "NUMERIC(19,5)", + "dest_name": "discrtnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCDATE", + "source_type": "DATETIME", + "dest_name": "discdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DSCDLRAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "dscdlram", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DSCPCTAM", + "source_type": "SMALLINT", + "dest_name": "dscpctam", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WROFAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "wrofamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TRXDSCRN", + "source_type": "CHAR(31)", + "dest_name": "trxdscrn", + "dest_type": "text", + "description": null + }, + { + "source_name": "CSPORNBR", + "source_type": "CHAR(21)", + "dest_name": "cspornbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLPRSNID", + "source_type": "CHAR(15)", + "dest_name": "slprsnid", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLSTERCD", + "source_type": "CHAR(15)", + "dest_name": "slstercd", + "dest_type": "text", + "description": null + }, + { + "source_name": "DINVPDOF", + "source_type": "DATETIME", + "dest_name": "dinvpdof", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "PPSAMDED", + "source_type": "NUMERIC(19,5)", + "dest_name": "ppsamded", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "GSTDSAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "gstdsamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DELETE1", + "source_type": "TINYINT", + "dest_name": "delete1", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "AGNGBUKT", + "source_type": "SMALLINT", + "dest_name": "agngbukt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "VOIDSTTS", + "source_type": "SMALLINT", + "dest_name": "voidstts", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "VOIDDATE", + "source_type": "DATETIME", + "dest_name": "voiddate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "TAXSCHID", + "source_type": "CHAR(15)", + "dest_name": "taxschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CURNCYID", + "source_type": "CHAR(15)", + "dest_name": "curncyid", + "dest_type": "text", + "description": null + }, + { + "source_name": "PYMTRMID", + "source_type": "CHAR(21)", + "dest_name": "pymtrmid", + "dest_type": "text", + "description": null + }, + { + "source_name": "SHIPMTHD", + "source_type": "CHAR(15)", + "dest_name": "shipmthd", + "dest_type": "text", + "description": null + }, + { + "source_name": "TRDISAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "trdisamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SLSCHDID", + "source_type": "CHAR(15)", + "dest_name": "slschdid", + "dest_type": "text", + "description": null + }, + { + "source_name": "FRTSCHID", + "source_type": "CHAR(15)", + "dest_name": "frtschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "MSCSCHID", + "source_type": "CHAR(15)", + "dest_name": "mscschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "Tax_Date", + "source_type": "DATETIME", + "dest_name": "tax_date", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "APLYWITH", + "source_type": "TINYINT", + "dest_name": "aplywith", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SALEDATE", + "source_type": "DATETIME", + "dest_name": "saledate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "CORRCTN", + "source_type": "TINYINT", + "dest_name": "corrctn", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SIMPLIFD", + "source_type": "TINYINT", + "dest_name": "simplifd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Electronic", + "source_type": "TINYINT", + "dest_name": "electronic", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ECTRX", + "source_type": "TINYINT", + "dest_name": "ectrx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BKTSLSAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktslsam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BKTFRTAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktfrtam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BKTMSCAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktmscam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BackoutTradeDisc", + "source_type": "NUMERIC(19,5)", + "dest_name": "backouttradedisc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "Factoring", + "source_type": "TINYINT", + "dest_name": "factoring", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DIRECTDEBIT", + "source_type": "TINYINT", + "dest_name": "directdebit", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ADRSCODE", + "source_type": "CHAR(15)", + "dest_name": "adrscode", + "dest_type": "text", + "description": null + }, + { + "source_name": "EFTFLAG", + "source_type": "TINYINT", + "dest_name": "eftflag", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/rm20101.sql b/config/modules/rm20101.sql new file mode 100644 index 0000000..f253c93 --- /dev/null +++ b/config/modules/rm20101.sql @@ -0,0 +1,75 @@ +SELECT + RTRIM([CUSTNMBR]) AS custnmbr, + RTRIM([CPRCSTNM]) AS cprcstnm, + RTRIM([DOCNUMBR]) AS docnumbr, + RTRIM([CHEKNMBR]) AS cheknmbr, + RTRIM([BACHNUMB]) AS bachnumb, + RTRIM([BCHSOURC]) AS bchsourc, + RTRIM([TRXSORCE]) AS trxsorce, + [RMDTYPAL] AS rmdtypal, + [CSHRCTYP] AS cshrctyp, + RTRIM([CBKIDCRD]) AS cbkidcrd, + RTRIM([CBKIDCSH]) AS cbkidcsh, + RTRIM([CBKIDCHK]) AS cbkidchk, + [DUEDATE] AS duedate, + [DOCDATE] AS docdate, + [POSTDATE] AS postdate, + RTRIM([PSTUSRID]) AS pstusrid, + [GLPOSTDT] AS glpostdt, + [LSTEDTDT] AS lstedtdt, + RTRIM([LSTUSRED]) AS lstusred, + [ORTRXAMT] AS ortrxamt, + [CURTRXAM] AS curtrxam, + [SLSAMNT] AS slsamnt, + [COSTAMNT] AS costamnt, + [FRTAMNT] AS frtamnt, + [MISCAMNT] AS miscamnt, + [TAXAMNT] AS taxamnt, + [COMDLRAM] AS comdlram, + [CASHAMNT] AS cashamnt, + [DISTKNAM] AS distknam, + [DISAVAMT] AS disavamt, + [DISAVTKN] AS disavtkn, + [DISCRTND] AS discrtnd, + [DISCDATE] AS discdate, + [DSCDLRAM] AS dscdlram, + [DSCPCTAM] AS dscpctam, + [WROFAMNT] AS wrofamnt, + RTRIM([TRXDSCRN]) AS trxdscrn, + RTRIM([CSPORNBR]) AS cspornbr, + RTRIM([SLPRSNID]) AS slprsnid, + RTRIM([SLSTERCD]) AS slstercd, + [DINVPDOF] AS dinvpdof, + [PPSAMDED] AS ppsamded, + [GSTDSAMT] AS gstdsamt, + [DELETE1] AS delete1, + [AGNGBUKT] AS agngbukt, + [VOIDSTTS] AS voidstts, + [VOIDDATE] AS voiddate, + RTRIM([TAXSCHID]) AS taxschid, + RTRIM([CURNCYID]) AS curncyid, + RTRIM([PYMTRMID]) AS pymtrmid, + RTRIM([SHIPMTHD]) AS shipmthd, + [TRDISAMT] AS trdisamt, + RTRIM([SLSCHDID]) AS slschdid, + RTRIM([FRTSCHID]) AS frtschid, + RTRIM([MSCSCHID]) AS mscschid, + [NOTEINDX] AS noteindx, + [Tax_Date] AS tax_date, + [APLYWITH] AS aplywith, + [SALEDATE] AS saledate, + [CORRCTN] AS corrctn, + [SIMPLIFD] AS simplifd, + [Electronic] AS electronic, + [ECTRX] AS ectrx, + [BKTSLSAM] AS bktslsam, + [BKTFRTAM] AS bktfrtam, + [BKTMSCAM] AS bktmscam, + [BackoutTradeDisc] AS backouttradedisc, + [Factoring] AS factoring, + [DIRECTDEBIT] AS directdebit, + RTRIM([ADRSCODE]) AS adrscode, + [EFTFLAG] AS eftflag, + [DEX_ROW_TS] AS dex_row_ts, + [DEX_ROW_ID] AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[RM20101] diff --git a/config/modules/rm30101.json b/config/modules/rm30101.json new file mode 100644 index 0000000..d5b8ce3 --- /dev/null +++ b/config/modules/rm30101.json @@ -0,0 +1,505 @@ +{ + "name": "rm30101", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.rm30101", + "staging_table": "pipekit_staging.rm30101", + "merge_strategy": "incremental", + "merge_key": "docnumbr, rmdtypal", + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "CUSTNMBR", + "source_type": "CHAR(15)", + "dest_name": "custnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CPRCSTNM", + "source_type": "CHAR(15)", + "dest_name": "cprcstnm", + "dest_type": "text", + "description": null + }, + { + "source_name": "DOCNUMBR", + "source_type": "CHAR(21)", + "dest_name": "docnumbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CHEKNMBR", + "source_type": "CHAR(21)", + "dest_name": "cheknmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "BACHNUMB", + "source_type": "CHAR(15)", + "dest_name": "bachnumb", + "dest_type": "text", + "description": null + }, + { + "source_name": "BCHSOURC", + "source_type": "CHAR(15)", + "dest_name": "bchsourc", + "dest_type": "text", + "description": null + }, + { + "source_name": "TRXSORCE", + "source_type": "CHAR(13)", + "dest_name": "trxsorce", + "dest_type": "text", + "description": null + }, + { + "source_name": "RMDTYPAL", + "source_type": "SMALLINT", + "dest_name": "rmdtypal", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DUEDATE", + "source_type": "DATETIME", + "dest_name": "duedate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DOCDATE", + "source_type": "DATETIME", + "dest_name": "docdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "POSTDATE", + "source_type": "DATETIME", + "dest_name": "postdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "PSTUSRID", + "source_type": "CHAR(15)", + "dest_name": "pstusrid", + "dest_type": "text", + "description": null + }, + { + "source_name": "GLPOSTDT", + "source_type": "DATETIME", + "dest_name": "glpostdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "LSTEDTDT", + "source_type": "DATETIME", + "dest_name": "lstedtdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "LSTUSRED", + "source_type": "CHAR(15)", + "dest_name": "lstusred", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORTRXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortrxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CURTRXAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "curtrxam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SLSAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "slsamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "COSTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "costamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "FRTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "frtamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MISCAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "miscamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TAXAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "taxamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "COMDLRAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "comdlram", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CASHAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "cashamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISTKNAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "distknam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISAVAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "disavamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCRTND", + "source_type": "NUMERIC(19,5)", + "dest_name": "discrtnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCDATE", + "source_type": "DATETIME", + "dest_name": "discdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DSCDLRAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "dscdlram", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DSCPCTAM", + "source_type": "SMALLINT", + "dest_name": "dscpctam", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WROFAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "wrofamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TRXDSCRN", + "source_type": "CHAR(31)", + "dest_name": "trxdscrn", + "dest_type": "text", + "description": null + }, + { + "source_name": "CSPORNBR", + "source_type": "CHAR(21)", + "dest_name": "cspornbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLPRSNID", + "source_type": "CHAR(15)", + "dest_name": "slprsnid", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLSTERCD", + "source_type": "CHAR(15)", + "dest_name": "slstercd", + "dest_type": "text", + "description": null + }, + { + "source_name": "DINVPDOF", + "source_type": "DATETIME", + "dest_name": "dinvpdof", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "PPSAMDED", + "source_type": "NUMERIC(19,5)", + "dest_name": "ppsamded", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "GSTDSAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "gstdsamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DELETE1", + "source_type": "TINYINT", + "dest_name": "delete1", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TAXSCHID", + "source_type": "CHAR(15)", + "dest_name": "taxschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLSCHDID", + "source_type": "CHAR(15)", + "dest_name": "slschdid", + "dest_type": "text", + "description": null + }, + { + "source_name": "FRTSCHID", + "source_type": "CHAR(15)", + "dest_name": "frtschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "MSCSCHID", + "source_type": "CHAR(15)", + "dest_name": "mscschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CURNCYID", + "source_type": "CHAR(15)", + "dest_name": "curncyid", + "dest_type": "text", + "description": null + }, + { + "source_name": "SHIPMTHD", + "source_type": "CHAR(15)", + "dest_name": "shipmthd", + "dest_type": "text", + "description": null + }, + { + "source_name": "PYMTRMID", + "source_type": "CHAR(21)", + "dest_name": "pymtrmid", + "dest_type": "text", + "description": null + }, + { + "source_name": "TRDISAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "trdisamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "VOIDSTTS", + "source_type": "SMALLINT", + "dest_name": "voidstts", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "VOIDDATE", + "source_type": "DATETIME", + "dest_name": "voiddate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "BALFWDNM", + "source_type": "CHAR(21)", + "dest_name": "balfwdnm", + "dest_type": "text", + "description": null + }, + { + "source_name": "CSHRCTYP", + "source_type": "SMALLINT", + "dest_name": "cshrctyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Tax_Date", + "source_type": "DATETIME", + "dest_name": "tax_date", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "APLYWITH", + "source_type": "TINYINT", + "dest_name": "aplywith", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SALEDATE", + "source_type": "DATETIME", + "dest_name": "saledate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "CORRCTN", + "source_type": "TINYINT", + "dest_name": "corrctn", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SIMPLIFD", + "source_type": "TINYINT", + "dest_name": "simplifd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Electronic", + "source_type": "TINYINT", + "dest_name": "electronic", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ECTRX", + "source_type": "TINYINT", + "dest_name": "ectrx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BKTSLSAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktslsam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BackoutTradeDisc", + "source_type": "NUMERIC(19,5)", + "dest_name": "backouttradedisc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BKTFRTAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktfrtam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BKTMSCAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktmscam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "Factoring", + "source_type": "TINYINT", + "dest_name": "factoring", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DIRECTDEBIT", + "source_type": "TINYINT", + "dest_name": "directdebit", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ADRSCODE", + "source_type": "CHAR(15)", + "dest_name": "adrscode", + "dest_type": "text", + "description": null + }, + { + "source_name": "EFTFLAG", + "source_type": "TINYINT", + "dest_name": "eftflag", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [ + { + "name": "rm30101_ts", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dex_row_ts) - INTERVAL '1 day', '1900-01-01') FROM gp.rm30101", + "default_value": "1900-01-01" + } + ], + "hooks": [] +} diff --git a/config/modules/rm30101.sql b/config/modules/rm30101.sql new file mode 100644 index 0000000..9b744cd --- /dev/null +++ b/config/modules/rm30101.sql @@ -0,0 +1,74 @@ +SELECT * FROM OPENQUERY(GPSERVER, ' +SELECT + RTRIM([CUSTNMBR]) AS custnmbr, + RTRIM([CPRCSTNM]) AS cprcstnm, + RTRIM([DOCNUMBR]) AS docnumbr, + RTRIM([CHEKNMBR]) AS cheknmbr, + RTRIM([BACHNUMB]) AS bachnumb, + RTRIM([BCHSOURC]) AS bchsourc, + RTRIM([TRXSORCE]) AS trxsorce, + [RMDTYPAL] AS rmdtypal, + [DUEDATE] AS duedate, + [DOCDATE] AS docdate, + [POSTDATE] AS postdate, + RTRIM([PSTUSRID]) AS pstusrid, + [GLPOSTDT] AS glpostdt, + [LSTEDTDT] AS lstedtdt, + RTRIM([LSTUSRED]) AS lstusred, + [ORTRXAMT] AS ortrxamt, + [CURTRXAM] AS curtrxam, + [SLSAMNT] AS slsamnt, + [COSTAMNT] AS costamnt, + [FRTAMNT] AS frtamnt, + [MISCAMNT] AS miscamnt, + [TAXAMNT] AS taxamnt, + [COMDLRAM] AS comdlram, + [CASHAMNT] AS cashamnt, + [DISTKNAM] AS distknam, + [DISAVAMT] AS disavamt, + [DISCRTND] AS discrtnd, + [DISCDATE] AS discdate, + [DSCDLRAM] AS dscdlram, + [DSCPCTAM] AS dscpctam, + [WROFAMNT] AS wrofamnt, + RTRIM([TRXDSCRN]) AS trxdscrn, + RTRIM([CSPORNBR]) AS cspornbr, + RTRIM([SLPRSNID]) AS slprsnid, + RTRIM([SLSTERCD]) AS slstercd, + [DINVPDOF] AS dinvpdof, + [PPSAMDED] AS ppsamded, + [GSTDSAMT] AS gstdsamt, + [DELETE1] AS delete1, + RTRIM([TAXSCHID]) AS taxschid, + RTRIM([SLSCHDID]) AS slschdid, + RTRIM([FRTSCHID]) AS frtschid, + RTRIM([MSCSCHID]) AS mscschid, + RTRIM([CURNCYID]) AS curncyid, + RTRIM([SHIPMTHD]) AS shipmthd, + RTRIM([PYMTRMID]) AS pymtrmid, + [TRDISAMT] AS trdisamt, + [NOTEINDX] AS noteindx, + [VOIDSTTS] AS voidstts, + [VOIDDATE] AS voiddate, + RTRIM([BALFWDNM]) AS balfwdnm, + [CSHRCTYP] AS cshrctyp, + [Tax_Date] AS tax_date, + [APLYWITH] AS aplywith, + [SALEDATE] AS saledate, + [CORRCTN] AS corrctn, + [SIMPLIFD] AS simplifd, + [Electronic] AS electronic, + [ECTRX] AS ectrx, + [BKTSLSAM] AS bktslsam, + [BackoutTradeDisc] AS backouttradedisc, + [BKTFRTAM] AS bktfrtam, + [BKTMSCAM] AS bktmscam, + [Factoring] AS factoring, + [DIRECTDEBIT] AS directdebit, + RTRIM([ADRSCODE]) AS adrscode, + [EFTFLAG] AS eftflag, + [DEX_ROW_TS] AS dex_row_ts, + [DEX_ROW_ID] AS dex_row_id +FROM CHG.dbo.RM30101 +WHERE [DEX_ROW_TS] > ''{rm30101_ts}'' +') diff --git a/config/modules/rprh.json b/config/modules/rprh.json new file mode 100644 index 0000000..1f92b25 --- /dev/null +++ b/config/modules/rprh.json @@ -0,0 +1,393 @@ +{ + "name": "rprh", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.rprh", + "staging_table": "pipekit_staging.rprh", + "merge_strategy": "incremental", + "merge_key": "nwbtid", + "enabled": 1, + "dest_description": "Production Reporting Batch Header 6.0", + "columns": [ + { + "source_name": "NWBTID", + "source_type": "NUMERIC(9,0)", + "dest_name": "nwbtid", + "dest_type": "numeric(9,0)", + "description": "Batch Number" + }, + { + "source_name": "NWLABL", + "source_type": "CHAR(10)", + "dest_name": "nwlabl", + "dest_type": "text", + "description": "Batch Label" + }, + { + "source_name": "NWBPRT", + "source_type": "CHAR(1)", + "dest_name": "nwbprt", + "dest_type": "text", + "description": "Print Indicator" + }, + { + "source_name": "NWPOST", + "source_type": "CHAR(1)", + "dest_name": "nwpost", + "dest_type": "text", + "description": "Post Indicator" + }, + { + "source_name": "NWFSYY", + "source_type": "NUMERIC(2,0)", + "dest_name": "nwfsyy", + "dest_type": "numeric(2,0)", + "description": "Fiscal Year" + }, + { + "source_name": "NWFSPP", + "source_type": "NUMERIC(2,0)", + "dest_name": "nwfspp", + "dest_type": "numeric(2,0)", + "description": "Fiscal Period" + }, + { + "source_name": "NWRDAT", + "source_type": "DATE", + "dest_name": "nwrdat", + "dest_type": "date", + "description": "Report Date" + }, + { + "source_name": "NWTMZN", + "source_type": "CHAR(4)", + "dest_name": "nwtmzn", + "dest_type": "text", + "description": "Time Zone Code" + }, + { + "source_name": "NWSHFT", + "source_type": "NUMERIC(1,0)", + "dest_name": "nwshft", + "dest_type": "numeric(1,0)", + "description": "Shift Number" + }, + { + "source_name": "NWSHGP", + "source_type": "CHAR(1)", + "dest_name": "nwshgp", + "dest_type": "text", + "description": "Shift Group" + }, + { + "source_name": "NWNXT#", + "source_type": "NUMERIC(5,0)", + "dest_name": "nwnxt#", + "dest_type": "numeric(5,0)", + "description": "Next Entry #" + }, + { + "source_name": "NWCRBY", + "source_type": "CHAR(10)", + "dest_name": "nwcrby", + "dest_type": "text", + "description": "Created By" + }, + { + "source_name": "NWCDAT", + "source_type": "DATE", + "dest_name": "nwcdat", + "dest_type": "date", + "description": "Date Created" + }, + { + "source_name": "NWCTIM", + "source_type": "TIME", + "dest_name": "nwctim", + "dest_type": "time", + "description": "Time Created" + }, + { + "source_name": "NWUPBY", + "source_type": "CHAR(10)", + "dest_name": "nwupby", + "dest_type": "text", + "description": "Updated By" + }, + { + "source_name": "NWUDAT", + "source_type": "DATE", + "dest_name": "nwudat", + "dest_type": "date", + "description": "Date Updated" + }, + { + "source_name": "NWUTIM", + "source_type": "TIME", + "dest_name": "nwutim", + "dest_type": "time", + "description": "Time Updated" + }, + { + "source_name": "NWIUSE", + "source_type": "CHAR(1)", + "dest_name": "nwiuse", + "dest_type": "text", + "description": "Batch In Use" + }, + { + "source_name": "NWSRCE", + "source_type": "CHAR(3)", + "dest_name": "nwsrce", + "dest_type": "text", + "description": "Source Code" + }, + { + "source_name": "NWSTKL", + "source_type": "CHAR(6)", + "dest_name": "nwstkl", + "dest_type": "text", + "description": "Receive To Location" + }, + { + "source_name": "NWSCPR", + "source_type": "CHAR(1)", + "dest_name": "nwscpr", + "dest_type": "text", + "description": "Seperate Complete Prod. Reporting" + }, + { + "source_name": "NWIUCN", + "source_type": "NUMERIC(2,0)", + "dest_name": "nwiucn", + "dest_type": "numeric(2,0)", + "description": "# of Users in the Batch" + }, + { + "source_name": "NWAPFC", + "source_type": "CHAR(1)", + "dest_name": "nwapfc", + "dest_type": "text", + "description": "Complete Production Change" + }, + { + "source_name": "NWAPCP", + "source_type": "CHAR(1)", + "dest_name": "nwapcp", + "dest_type": "text", + "description": "Auto-Post Complelete Production" + }, + { + "source_name": "NWFUT1", + "source_type": "CHAR(10)", + "dest_name": "nwfut1", + "dest_type": "text", + "description": "Future1" + }, + { + "source_name": "NWFUT2", + "source_type": "CHAR(10)", + "dest_name": "nwfut2", + "dest_type": "text", + "description": "Future2" + }, + { + "source_name": "NWFUT3", + "source_type": "CHAR(10)", + "dest_name": "nwfut3", + "dest_type": "text", + "description": "Future3" + }, + { + "source_name": "NWFUT4", + "source_type": "CHAR(20)", + "dest_name": "nwfut4", + "dest_type": "text", + "description": "Future4" + }, + { + "source_name": "NWFUT5", + "source_type": "CHAR(20)", + "dest_name": "nwfut5", + "dest_type": "text", + "description": "O/S PO#/Item#" + }, + { + "source_name": "NWFUT6", + "source_type": "CHAR(20)", + "dest_name": "nwfut6", + "dest_type": "text", + "description": "Future6" + }, + { + "source_name": "NWFUT7", + "source_type": "NUMERIC(15,5)", + "dest_name": "nwfut7", + "dest_type": "numeric(15,5)", + "description": "Future7" + }, + { + "source_name": "NWFUT8", + "source_type": "NUMERIC(15,5)", + "dest_name": "nwfut8", + "dest_type": "numeric(15,5)", + "description": "Future8" + }, + { + "source_name": "NWFUT9", + "source_type": "NUMERIC(15,5)", + "dest_name": "nwfut9", + "dest_type": "numeric(15,5)", + "description": "Future9" + }, + { + "source_name": "NWFLG1", + "source_type": "CHAR(1)", + "dest_name": "nwflg1", + "dest_type": "text", + "description": "End Date/Time by Dept/Resc Shift End" + }, + { + "source_name": "NWFLG2", + "source_type": "CHAR(1)", + "dest_name": "nwflg2", + "dest_type": "text", + "description": "Future Flag2" + }, + { + "source_name": "NWFLG3", + "source_type": "CHAR(1)", + "dest_name": "nwflg3", + "dest_type": "text", + "description": "Apply Unabsorbed Material Costs REPP Prod" + }, + { + "source_name": "NWPLNT", + "source_type": "CHAR(3)", + "dest_name": "nwplnt", + "dest_type": "text", + "description": "Plant Code" + }, + { + "source_name": "NWEDILN", + "source_type": "NUMERIC(8,0)", + "dest_name": "nwediln", + "dest_type": "numeric(8,0)", + "description": "EDI Log Number" + }, + { + "source_name": "NWEDILE", + "source_type": "NUMERIC(6,0)", + "dest_name": "nwedile", + "dest_type": "numeric(6,0)", + "description": "EDI Log Entry #" + }, + { + "source_name": "NWSHFS", + "source_type": "NUMERIC(2,0)", + "dest_name": "nwshfs", + "dest_type": "numeric(2,0)", + "description": "Shift Sequence #" + }, + { + "source_name": "NWFLBH", + "source_type": "CHAR(1)", + "dest_name": "nwflbh", + "dest_type": "text", + "description": "Created from LBHIST Inqr" + }, + { + "source_name": "NWOBTID", + "source_type": "NUMERIC(9,0)", + "dest_name": "nwobtid", + "dest_type": "numeric(9,0)", + "description": "Original Batch ID" + }, + { + "source_name": "NWFUT10", + "source_type": "CHAR(1)", + "dest_name": "nwfut10", + "dest_type": "text", + "description": "Future-Use Fields" + }, + { + "source_name": "NWFUT11", + "source_type": "CHAR(1)", + "dest_name": "nwfut11", + "dest_type": "text", + "description": "Future-Use Fields" + }, + { + "source_name": "NWFUT12", + "source_type": "CHAR(10)", + "dest_name": "nwfut12", + "dest_type": "text", + "description": "WIP Adj. Orig. Batch Id" + }, + { + "source_name": "NWFUT13", + "source_type": "CHAR(10)", + "dest_name": "nwfut13", + "dest_type": "text", + "description": "Future-Use Fields" + }, + { + "source_name": "NWFUT14", + "source_type": "CHAR(20)", + "dest_name": "nwfut14", + "dest_type": "text", + "description": "Future-Use Fields" + }, + { + "source_name": "NWFUT15", + "source_type": "CHAR(20)", + "dest_name": "nwfut15", + "dest_type": "text", + "description": "Future-Use Fields" + }, + { + "source_name": "NWFUT16", + "source_type": "NUMERIC(15,5)", + "dest_name": "nwfut16", + "dest_type": "numeric(15,5)", + "description": "Future-Use Fields" + }, + { + "source_name": "NWFUT17", + "source_type": "NUMERIC(15,5)", + "dest_name": "nwfut17", + "dest_type": "numeric(15,5)", + "description": "Future-Use Fields" + }, + { + "source_name": "NWPUSR", + "source_type": "CHAR(10)", + "dest_name": "nwpusr", + "dest_type": "text", + "description": "Posted By" + }, + { + "source_name": "NWPDAT", + "source_type": "DATE", + "dest_name": "nwpdat", + "dest_type": "date", + "description": "Posted Date" + }, + { + "source_name": "NWPTIM", + "source_type": "NUMERIC(6,0)", + "dest_name": "nwptim", + "dest_type": "numeric(6,0)", + "description": "Posted Time" + } + ], + "watermarks": [ + { + "name": "stamp", + "connection": "usmidsap02", + "resolver_sql": "select max(nwpdat) from cms.rprh", + "default_value": "None" + } + ], + "hooks": [] +} diff --git a/config/modules/rprh.sql b/config/modules/rprh.sql new file mode 100644 index 0000000..456b1a4 --- /dev/null +++ b/config/modules/rprh.sql @@ -0,0 +1,56 @@ +SELECT + NWBTID AS nwbtid, + NWLABL AS nwlabl, + NWBPRT AS nwbprt, + NWPOST AS nwpost, + NWFSYY AS nwfsyy, + NWFSPP AS nwfspp, + NWRDAT AS nwrdat, + NWTMZN AS nwtmzn, + NWSHFT AS nwshft, + NWSHGP AS nwshgp, + NWNXT# AS nwnxt#, + NWCRBY AS nwcrby, + NWCDAT AS nwcdat, + NWCTIM AS nwctim, + NWUPBY AS nwupby, + NWUDAT AS nwudat, + NWUTIM AS nwutim, + NWIUSE AS nwiuse, + NWSRCE AS nwsrce, + NWSTKL AS nwstkl, + NWSCPR AS nwscpr, + NWIUCN AS nwiucn, + NWAPFC AS nwapfc, + NWAPCP AS nwapcp, + NWFUT1 AS nwfut1, + NWFUT2 AS nwfut2, + NWFUT3 AS nwfut3, + NWFUT4 AS nwfut4, + NWFUT5 AS nwfut5, + NWFUT6 AS nwfut6, + NWFUT7 AS nwfut7, + NWFUT8 AS nwfut8, + NWFUT9 AS nwfut9, + NWFLG1 AS nwflg1, + NWFLG2 AS nwflg2, + NWFLG3 AS nwflg3, + NWPLNT AS nwplnt, + NWEDILN AS nwediln, + NWEDILE AS nwedile, + NWSHFS AS nwshfs, + NWFLBH AS nwflbh, + NWOBTID AS nwobtid, + NWFUT10 AS nwfut10, + NWFUT11 AS nwfut11, + NWFUT12 AS nwfut12, + NWFUT13 AS nwfut13, + NWFUT14 AS nwfut14, + NWFUT15 AS nwfut15, + NWFUT16 AS nwfut16, + NWFUT17 AS nwfut17, + NWPUSR AS nwpusr, + NWPDAT AS nwpdat, + NWPTIM AS nwptim +FROM LGDAT.RPRH +WHERE NWPDAT >= DATE('{stamp}') diff --git a/config/modules/sop10100.json b/config/modules/sop10100.json new file mode 100644 index 0000000..2b90031 --- /dev/null +++ b/config/modules/sop10100.json @@ -0,0 +1,1352 @@ +{ + "name": "sop10100", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.sop10100", + "staging_table": "pipekit_staging.sop10100", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "SOPTYPE", + "source_type": "SMALLINT", + "dest_name": "soptype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SOPNUMBE", + "source_type": "CHAR(21)", + "dest_name": "sopnumbe", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORIGTYPE", + "source_type": "SMALLINT", + "dest_name": "origtype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ORIGNUMB", + "source_type": "CHAR(21)", + "dest_name": "orignumb", + "dest_type": "text", + "description": null + }, + { + "source_name": "DOCID", + "source_type": "CHAR(15)", + "dest_name": "docid", + "dest_type": "text", + "description": null + }, + { + "source_name": "DOCDATE", + "source_type": "DATETIME", + "dest_name": "docdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "GLPOSTDT", + "source_type": "DATETIME", + "dest_name": "glpostdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "QUOTEDAT", + "source_type": "DATETIME", + "dest_name": "quotedat", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "QUOEXPDA", + "source_type": "DATETIME", + "dest_name": "quoexpda", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ORDRDATE", + "source_type": "DATETIME", + "dest_name": "ordrdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "INVODATE", + "source_type": "DATETIME", + "dest_name": "invodate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "BACKDATE", + "source_type": "DATETIME", + "dest_name": "backdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "RETUDATE", + "source_type": "DATETIME", + "dest_name": "retudate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ReqShipDate", + "source_type": "DATETIME", + "dest_name": "reqshipdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "FUFILDAT", + "source_type": "DATETIME", + "dest_name": "fufildat", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ACTLSHIP", + "source_type": "DATETIME", + "dest_name": "actlship", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DISCDATE", + "source_type": "DATETIME", + "dest_name": "discdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DUEDATE", + "source_type": "DATETIME", + "dest_name": "duedate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "REPTING", + "source_type": "TINYINT", + "dest_name": "repting", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TRXFREQU", + "source_type": "SMALLINT", + "dest_name": "trxfrequ", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TIMEREPD", + "source_type": "SMALLINT", + "dest_name": "timerepd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TIMETREP", + "source_type": "SMALLINT", + "dest_name": "timetrep", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DYSTINCR", + "source_type": "SMALLINT", + "dest_name": "dystincr", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DTLSTREP", + "source_type": "DATETIME", + "dest_name": "dtlstrep", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DSTBTCH1", + "source_type": "CHAR(15)", + "dest_name": "dstbtch1", + "dest_type": "text", + "description": null + }, + { + "source_name": "DSTBTCH2", + "source_type": "CHAR(15)", + "dest_name": "dstbtch2", + "dest_type": "text", + "description": null + }, + { + "source_name": "USDOCID1", + "source_type": "CHAR(15)", + "dest_name": "usdocid1", + "dest_type": "text", + "description": null + }, + { + "source_name": "USDOCID2", + "source_type": "CHAR(15)", + "dest_name": "usdocid2", + "dest_type": "text", + "description": null + }, + { + "source_name": "DISCFRGT", + "source_type": "NUMERIC(19,5)", + "dest_name": "discfrgt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDAVFRT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordavfrt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCMISC", + "source_type": "NUMERIC(19,5)", + "dest_name": "discmisc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDAVMSC", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordavmsc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISAVAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "disavamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDAVAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordavamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCRTND", + "source_type": "NUMERIC(19,5)", + "dest_name": "discrtnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDISRTD", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordisrtd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISTKNAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "distknam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDISTKN", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordistkn", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DSCPCTAM", + "source_type": "SMALLINT", + "dest_name": "dscpctam", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DSCDLRAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "dscdlram", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDDLRAT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orddlrat", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISAVTKN", + "source_type": "NUMERIC(19,5)", + "dest_name": "disavtkn", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDATKN", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordatkn", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "PYMTRMID", + "source_type": "CHAR(21)", + "dest_name": "pymtrmid", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRCLEVEL", + "source_type": "CHAR(11)", + "dest_name": "prclevel", + "dest_type": "text", + "description": null + }, + { + "source_name": "LOCNCODE", + "source_type": "CHAR(11)", + "dest_name": "locncode", + "dest_type": "text", + "description": null + }, + { + "source_name": "BCHSOURC", + "source_type": "CHAR(15)", + "dest_name": "bchsourc", + "dest_type": "text", + "description": null + }, + { + "source_name": "BACHNUMB", + "source_type": "CHAR(15)", + "dest_name": "bachnumb", + "dest_type": "text", + "description": null + }, + { + "source_name": "CUSTNMBR", + "source_type": "CHAR(15)", + "dest_name": "custnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CUSTNAME", + "source_type": "CHAR(65)", + "dest_name": "custname", + "dest_type": "text", + "description": null + }, + { + "source_name": "CSTPONBR", + "source_type": "CHAR(21)", + "dest_name": "cstponbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "PROSPECT", + "source_type": "SMALLINT", + "dest_name": "prospect", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MSTRNUMB", + "source_type": "INT", + "dest_name": "mstrnumb", + "dest_type": "integer", + "description": null + }, + { + "source_name": "PCKSLPNO", + "source_type": "CHAR(21)", + "dest_name": "pckslpno", + "dest_type": "text", + "description": null + }, + { + "source_name": "PICTICNU", + "source_type": "CHAR(21)", + "dest_name": "picticnu", + "dest_type": "text", + "description": null + }, + { + "source_name": "MRKDNAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "mrkdnamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORMRKDAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "ormrkdam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "PRBTADCD", + "source_type": "CHAR(15)", + "dest_name": "prbtadcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRSTADCD", + "source_type": "CHAR(15)", + "dest_name": "prstadcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "CNTCPRSN", + "source_type": "CHAR(61)", + "dest_name": "cntcprsn", + "dest_type": "text", + "description": null + }, + { + "source_name": "ShipToName", + "source_type": "CHAR(65)", + "dest_name": "shiptoname", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS1", + "source_type": "CHAR(61)", + "dest_name": "address1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS2", + "source_type": "CHAR(61)", + "dest_name": "address2", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS3", + "source_type": "CHAR(61)", + "dest_name": "address3", + "dest_type": "text", + "description": null + }, + { + "source_name": "CITY", + "source_type": "CHAR(35)", + "dest_name": "city", + "dest_type": "text", + "description": null + }, + { + "source_name": "STATE", + "source_type": "CHAR(29)", + "dest_name": "state", + "dest_type": "text", + "description": null + }, + { + "source_name": "ZIPCODE", + "source_type": "CHAR(11)", + "dest_name": "zipcode", + "dest_type": "text", + "description": null + }, + { + "source_name": "CCode", + "source_type": "CHAR(7)", + "dest_name": "ccode", + "dest_type": "text", + "description": null + }, + { + "source_name": "COUNTRY", + "source_type": "CHAR(61)", + "dest_name": "country", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHNUMBR1", + "source_type": "CHAR(21)", + "dest_name": "phnumbr1", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHNUMBR2", + "source_type": "CHAR(21)", + "dest_name": "phnumbr2", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE3", + "source_type": "CHAR(21)", + "dest_name": "phone3", + "dest_type": "text", + "description": null + }, + { + "source_name": "FAXNUMBR", + "source_type": "CHAR(21)", + "dest_name": "faxnumbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "COMAPPTO", + "source_type": "SMALLINT", + "dest_name": "comappto", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "COMMAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "commamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OCOMMAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ocommamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CMMSLAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "cmmslamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORCOSAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orcosamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "NCOMAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ncomamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORNCMAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orncmamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SHIPMTHD", + "source_type": "CHAR(15)", + "dest_name": "shipmthd", + "dest_type": "text", + "description": null + }, + { + "source_name": "TRDISAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "trdisamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORTDISAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortdisam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TRDISPCT", + "source_type": "SMALLINT", + "dest_name": "trdispct", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SUBTOTAL", + "source_type": "NUMERIC(19,5)", + "dest_name": "subtotal", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORSUBTOT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orsubtot", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "REMSUBTO", + "source_type": "NUMERIC(19,5)", + "dest_name": "remsubto", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OREMSUBT", + "source_type": "NUMERIC(19,5)", + "dest_name": "oremsubt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "EXTDCOST", + "source_type": "NUMERIC(19,5)", + "dest_name": "extdcost", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OREXTCST", + "source_type": "NUMERIC(19,5)", + "dest_name": "orextcst", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "FRTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "frtamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORFRTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orfrtamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MISCAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "miscamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORMISCAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ormiscamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TXENGCLD", + "source_type": "TINYINT", + "dest_name": "txengcld", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TAXEXMT1", + "source_type": "CHAR(25)", + "dest_name": "taxexmt1", + "dest_type": "text", + "description": null + }, + { + "source_name": "TAXEXMT2", + "source_type": "CHAR(25)", + "dest_name": "taxexmt2", + "dest_type": "text", + "description": null + }, + { + "source_name": "TXRGNNUM", + "source_type": "CHAR(25)", + "dest_name": "txrgnnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "TAXSCHID", + "source_type": "CHAR(15)", + "dest_name": "taxschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "TXSCHSRC", + "source_type": "SMALLINT", + "dest_name": "txschsrc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BSIVCTTL", + "source_type": "TINYINT", + "dest_name": "bsivcttl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FRTSCHID", + "source_type": "CHAR(15)", + "dest_name": "frtschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "FRTTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "frttxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORFRTTAX", + "source_type": "NUMERIC(19,5)", + "dest_name": "orfrttax", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "FRGTTXBL", + "source_type": "SMALLINT", + "dest_name": "frgttxbl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MSCSCHID", + "source_type": "CHAR(15)", + "dest_name": "mscschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "MSCTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "msctxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORMSCTAX", + "source_type": "NUMERIC(19,5)", + "dest_name": "ormsctax", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MISCTXBL", + "source_type": "SMALLINT", + "dest_name": "misctxbl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BKTFRTAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktfrtam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORBKTFRT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orbktfrt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BKTMSCAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktmscam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORBKTMSC", + "source_type": "NUMERIC(19,5)", + "dest_name": "orbktmsc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BCKTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "bcktxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OBTAXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "obtaxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TXBTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "txbtxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OTAXTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "otaxtamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TAXAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "taxamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORTAXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortaxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ECTRX", + "source_type": "TINYINT", + "dest_name": "ectrx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DOCAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "docamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDOCAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordocamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "PYMTRCVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "pymtrcvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORPMTRVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "orpmtrvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DEPRECVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "deprecvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDEPRVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordeprvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CODAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "codamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORCODAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orcodamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ACCTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "acctamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORACTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "oractamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SALSTERR", + "source_type": "CHAR(15)", + "dest_name": "salsterr", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLPRSNID", + "source_type": "CHAR(15)", + "dest_name": "slprsnid", + "dest_type": "text", + "description": null + }, + { + "source_name": "UPSZONE", + "source_type": "CHAR(3)", + "dest_name": "upszone", + "dest_type": "text", + "description": null + }, + { + "source_name": "TIMESPRT", + "source_type": "SMALLINT", + "dest_name": "timesprt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PSTGSTUS", + "source_type": "SMALLINT", + "dest_name": "pstgstus", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "VOIDSTTS", + "source_type": "SMALLINT", + "dest_name": "voidstts", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ALLOCABY", + "source_type": "SMALLINT", + "dest_name": "allocaby", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CURNCYID", + "source_type": "CHAR(15)", + "dest_name": "curncyid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CURRNIDX", + "source_type": "SMALLINT", + "dest_name": "currnidx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "RATETPID", + "source_type": "CHAR(15)", + "dest_name": "ratetpid", + "dest_type": "text", + "description": null + }, + { + "source_name": "EXGTBLID", + "source_type": "CHAR(15)", + "dest_name": "exgtblid", + "dest_type": "text", + "description": null + }, + { + "source_name": "XCHGRATE", + "source_type": "NUMERIC(19,7)", + "dest_name": "xchgrate", + "dest_type": "numeric(19,7)", + "description": null + }, + { + "source_name": "DENXRATE", + "source_type": "NUMERIC(19,7)", + "dest_name": "denxrate", + "dest_type": "numeric(19,7)", + "description": null + }, + { + "source_name": "EXCHDATE", + "source_type": "DATETIME", + "dest_name": "exchdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "TIME1", + "source_type": "DATETIME", + "dest_name": "time1", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "RTCLCMTD", + "source_type": "SMALLINT", + "dest_name": "rtclcmtd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MCTRXSTT", + "source_type": "SMALLINT", + "dest_name": "mctrxstt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TRXSORCE", + "source_type": "CHAR(13)", + "dest_name": "trxsorce", + "dest_type": "text", + "description": null + }, + { + "source_name": "SOPHDRE1", + "source_type": "BINARY", + "dest_name": "sophdre1", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "SOPHDRE2", + "source_type": "BINARY", + "dest_name": "sophdre2", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "SOPLNERR", + "source_type": "BINARY", + "dest_name": "soplnerr", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "SOPHDRFL", + "source_type": "BINARY", + "dest_name": "sophdrfl", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "SOPMCERR", + "source_type": "BINARY", + "dest_name": "sopmcerr", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "COMMNTID", + "source_type": "CHAR(15)", + "dest_name": "commntid", + "dest_type": "text", + "description": null + }, + { + "source_name": "REFRENCE", + "source_type": "CHAR(31)", + "dest_name": "refrence", + "dest_type": "text", + "description": null + }, + { + "source_name": "POSTEDDT", + "source_type": "DATETIME", + "dest_name": "posteddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "PTDUSRID", + "source_type": "CHAR(15)", + "dest_name": "ptdusrid", + "dest_type": "text", + "description": null + }, + { + "source_name": "USER2ENT", + "source_type": "CHAR(15)", + "dest_name": "user2ent", + "dest_type": "text", + "description": null + }, + { + "source_name": "CREATDDT", + "source_type": "DATETIME", + "dest_name": "creatddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "MODIFDT", + "source_type": "DATETIME", + "dest_name": "modifdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "Tax_Date", + "source_type": "DATETIME", + "dest_name": "tax_date", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "APLYWITH", + "source_type": "TINYINT", + "dest_name": "aplywith", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WITHHAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "withhamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SHPPGDOC", + "source_type": "TINYINT", + "dest_name": "shppgdoc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CORRCTN", + "source_type": "TINYINT", + "dest_name": "corrctn", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SIMPLIFD", + "source_type": "TINYINT", + "dest_name": "simplifd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CORRNXST", + "source_type": "TINYINT", + "dest_name": "corrnxst", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DOCNCORR", + "source_type": "CHAR(21)", + "dest_name": "docncorr", + "dest_type": "text", + "description": null + }, + { + "source_name": "SEQNCORR", + "source_type": "SMALLINT", + "dest_name": "seqncorr", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SALEDATE", + "source_type": "DATETIME", + "dest_name": "saledate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "SOPHDRE3", + "source_type": "BINARY", + "dest_name": "sophdre3", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "EXCEPTIONALDEMAND", + "source_type": "TINYINT", + "dest_name": "exceptionaldemand", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Flags", + "source_type": "SMALLINT", + "dest_name": "flags", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BackoutTradeDisc", + "source_type": "NUMERIC(19,5)", + "dest_name": "backouttradedisc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OrigBackoutTradeDisc", + "source_type": "NUMERIC(19,5)", + "dest_name": "origbackouttradedisc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "GPSFOINTEGRATIONID", + "source_type": "CHAR(31)", + "dest_name": "gpsfointegrationid", + "dest_type": "text", + "description": null + }, + { + "source_name": "INTEGRATIONSOURCE", + "source_type": "SMALLINT", + "dest_name": "integrationsource", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INTEGRATIONID", + "source_type": "CHAR(31)", + "dest_name": "integrationid", + "dest_type": "text", + "description": null + }, + { + "source_name": "SOPSTATUS", + "source_type": "SMALLINT", + "dest_name": "sopstatus", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SHIPCOMPLETE", + "source_type": "TINYINT", + "dest_name": "shipcomplete", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DIRECTDEBIT", + "source_type": "TINYINT", + "dest_name": "directdebit", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WorkflowApprStatCreditLm", + "source_type": "SMALLINT", + "dest_name": "workflowapprstatcreditlm", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WorkflowPriorityCreditLm", + "source_type": "SMALLINT", + "dest_name": "workflowprioritycreditlm", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WorkflowApprStatusQuote", + "source_type": "SMALLINT", + "dest_name": "workflowapprstatusquote", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WorkflowPriorityQuote", + "source_type": "SMALLINT", + "dest_name": "workflowpriorityquote", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Workflow_Status", + "source_type": "SMALLINT", + "dest_name": "workflow_status", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ContractExchangeRateStat", + "source_type": "SMALLINT", + "dest_name": "contractexchangeratestat", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Print_Phone_NumberGB", + "source_type": "SMALLINT", + "dest_name": "print_phone_numbergb", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/sop10100.sql b/config/modules/sop10100.sql new file mode 100644 index 0000000..73c8a8e --- /dev/null +++ b/config/modules/sop10100.sql @@ -0,0 +1,193 @@ +SELECT + [SOPTYPE] AS [soptype], + RTRIM([SOPNUMBE]) AS [sopnumbe], + [ORIGTYPE] AS [origtype], + RTRIM([ORIGNUMB]) AS [orignumb], + RTRIM([DOCID]) AS [docid], + [DOCDATE] AS [docdate], + [GLPOSTDT] AS [glpostdt], + [QUOTEDAT] AS [quotedat], + [QUOEXPDA] AS [quoexpda], + [ORDRDATE] AS [ordrdate], + [INVODATE] AS [invodate], + [BACKDATE] AS [backdate], + [RETUDATE] AS [retudate], + [ReqShipDate] AS [reqshipdate], + [FUFILDAT] AS [fufildat], + [ACTLSHIP] AS [actlship], + [DISCDATE] AS [discdate], + [DUEDATE] AS [duedate], + [REPTING] AS [repting], + [TRXFREQU] AS [trxfrequ], + [TIMEREPD] AS [timerepd], + [TIMETREP] AS [timetrep], + [DYSTINCR] AS [dystincr], + [DTLSTREP] AS [dtlstrep], + RTRIM([DSTBTCH1]) AS [dstbtch1], + RTRIM([DSTBTCH2]) AS [dstbtch2], + RTRIM([USDOCID1]) AS [usdocid1], + RTRIM([USDOCID2]) AS [usdocid2], + [DISCFRGT] AS [discfrgt], + [ORDAVFRT] AS [ordavfrt], + [DISCMISC] AS [discmisc], + [ORDAVMSC] AS [ordavmsc], + [DISAVAMT] AS [disavamt], + [ORDAVAMT] AS [ordavamt], + [DISCRTND] AS [discrtnd], + [ORDISRTD] AS [ordisrtd], + [DISTKNAM] AS [distknam], + [ORDISTKN] AS [ordistkn], + [DSCPCTAM] AS [dscpctam], + [DSCDLRAM] AS [dscdlram], + [ORDDLRAT] AS [orddlrat], + [DISAVTKN] AS [disavtkn], + [ORDATKN] AS [ordatkn], + RTRIM([PYMTRMID]) AS [pymtrmid], + RTRIM([PRCLEVEL]) AS [prclevel], + RTRIM([LOCNCODE]) AS [locncode], + RTRIM([BCHSOURC]) AS [bchsourc], + RTRIM([BACHNUMB]) AS [bachnumb], + RTRIM([CUSTNMBR]) AS [custnmbr], + RTRIM([CUSTNAME]) AS [custname], + RTRIM([CSTPONBR]) AS [cstponbr], + [PROSPECT] AS [prospect], + [MSTRNUMB] AS [mstrnumb], + RTRIM([PCKSLPNO]) AS [pckslpno], + RTRIM([PICTICNU]) AS [picticnu], + [MRKDNAMT] AS [mrkdnamt], + [ORMRKDAM] AS [ormrkdam], + RTRIM([PRBTADCD]) AS [prbtadcd], + RTRIM([PRSTADCD]) AS [prstadcd], + RTRIM([CNTCPRSN]) AS [cntcprsn], + RTRIM([ShipToName]) AS [shiptoname], + RTRIM([ADDRESS1]) AS [address1], + RTRIM([ADDRESS2]) AS [address2], + RTRIM([ADDRESS3]) AS [address3], + RTRIM([CITY]) AS [city], + RTRIM([STATE]) AS [state], + RTRIM([ZIPCODE]) AS [zipcode], + RTRIM([CCode]) AS [ccode], + RTRIM([COUNTRY]) AS [country], + RTRIM([PHNUMBR1]) AS [phnumbr1], + RTRIM([PHNUMBR2]) AS [phnumbr2], + RTRIM([PHONE3]) AS [phone3], + RTRIM([FAXNUMBR]) AS [faxnumbr], + [COMAPPTO] AS [comappto], + [COMMAMNT] AS [commamnt], + [OCOMMAMT] AS [ocommamt], + [CMMSLAMT] AS [cmmslamt], + [ORCOSAMT] AS [orcosamt], + [NCOMAMNT] AS [ncomamnt], + [ORNCMAMT] AS [orncmamt], + RTRIM([SHIPMTHD]) AS [shipmthd], + [TRDISAMT] AS [trdisamt], + [ORTDISAM] AS [ortdisam], + [TRDISPCT] AS [trdispct], + [SUBTOTAL] AS [subtotal], + [ORSUBTOT] AS [orsubtot], + [REMSUBTO] AS [remsubto], + [OREMSUBT] AS [oremsubt], + [EXTDCOST] AS [extdcost], + [OREXTCST] AS [orextcst], + [FRTAMNT] AS [frtamnt], + [ORFRTAMT] AS [orfrtamt], + [MISCAMNT] AS [miscamnt], + [ORMISCAMT] AS [ormiscamt], + [TXENGCLD] AS [txengcld], + RTRIM([TAXEXMT1]) AS [taxexmt1], + RTRIM([TAXEXMT2]) AS [taxexmt2], + RTRIM([TXRGNNUM]) AS [txrgnnum], + RTRIM([TAXSCHID]) AS [taxschid], + [TXSCHSRC] AS [txschsrc], + [BSIVCTTL] AS [bsivcttl], + RTRIM([FRTSCHID]) AS [frtschid], + [FRTTXAMT] AS [frttxamt], + [ORFRTTAX] AS [orfrttax], + [FRGTTXBL] AS [frgttxbl], + RTRIM([MSCSCHID]) AS [mscschid], + [MSCTXAMT] AS [msctxamt], + [ORMSCTAX] AS [ormsctax], + [MISCTXBL] AS [misctxbl], + [BKTFRTAM] AS [bktfrtam], + [ORBKTFRT] AS [orbktfrt], + [BKTMSCAM] AS [bktmscam], + [ORBKTMSC] AS [orbktmsc], + [BCKTXAMT] AS [bcktxamt], + [OBTAXAMT] AS [obtaxamt], + [TXBTXAMT] AS [txbtxamt], + [OTAXTAMT] AS [otaxtamt], + [TAXAMNT] AS [taxamnt], + [ORTAXAMT] AS [ortaxamt], + [ECTRX] AS [ectrx], + [DOCAMNT] AS [docamnt], + [ORDOCAMT] AS [ordocamt], + [PYMTRCVD] AS [pymtrcvd], + [ORPMTRVD] AS [orpmtrvd], + [DEPRECVD] AS [deprecvd], + [ORDEPRVD] AS [ordeprvd], + [CODAMNT] AS [codamnt], + [ORCODAMT] AS [orcodamt], + [ACCTAMNT] AS [acctamnt], + [ORACTAMT] AS [oractamt], + RTRIM([SALSTERR]) AS [salsterr], + RTRIM([SLPRSNID]) AS [slprsnid], + RTRIM([UPSZONE]) AS [upszone], + [TIMESPRT] AS [timesprt], + [PSTGSTUS] AS [pstgstus], + [VOIDSTTS] AS [voidstts], + [ALLOCABY] AS [allocaby], + [NOTEINDX] AS [noteindx], + RTRIM([CURNCYID]) AS [curncyid], + [CURRNIDX] AS [currnidx], + RTRIM([RATETPID]) AS [ratetpid], + RTRIM([EXGTBLID]) AS [exgtblid], + [XCHGRATE] AS [xchgrate], + [DENXRATE] AS [denxrate], + [EXCHDATE] AS [exchdate], + [TIME1] AS [time1], + [RTCLCMTD] AS [rtclcmtd], + [MCTRXSTT] AS [mctrxstt], + RTRIM([TRXSORCE]) AS [trxsorce], + [SOPHDRE1] AS [sophdre1], + [SOPHDRE2] AS [sophdre2], + [SOPLNERR] AS [soplnerr], + [SOPHDRFL] AS [sophdrfl], + [SOPMCERR] AS [sopmcerr], + RTRIM([COMMNTID]) AS [commntid], + RTRIM([REFRENCE]) AS [refrence], + [POSTEDDT] AS [posteddt], + RTRIM([PTDUSRID]) AS [ptdusrid], + RTRIM([USER2ENT]) AS [user2ent], + [CREATDDT] AS [creatddt], + [MODIFDT] AS [modifdt], + [Tax_Date] AS [tax_date], + [APLYWITH] AS [aplywith], + [WITHHAMT] AS [withhamt], + [SHPPGDOC] AS [shppgdoc], + [CORRCTN] AS [corrctn], + [SIMPLIFD] AS [simplifd], + [CORRNXST] AS [corrnxst], + RTRIM([DOCNCORR]) AS [docncorr], + [SEQNCORR] AS [seqncorr], + [SALEDATE] AS [saledate], + [SOPHDRE3] AS [sophdre3], + [EXCEPTIONALDEMAND] AS [exceptionaldemand], + [Flags] AS [flags], + [BackoutTradeDisc] AS [backouttradedisc], + [OrigBackoutTradeDisc] AS [origbackouttradedisc], + RTRIM([GPSFOINTEGRATIONID]) AS [gpsfointegrationid], + [INTEGRATIONSOURCE] AS [integrationsource], + RTRIM([INTEGRATIONID]) AS [integrationid], + [SOPSTATUS] AS [sopstatus], + [SHIPCOMPLETE] AS [shipcomplete], + [DIRECTDEBIT] AS [directdebit], + [WorkflowApprStatCreditLm] AS [workflowapprstatcreditlm], + [WorkflowPriorityCreditLm] AS [workflowprioritycreditlm], + [WorkflowApprStatusQuote] AS [workflowapprstatusquote], + [WorkflowPriorityQuote] AS [workflowpriorityquote], + [Workflow_Status] AS [workflow_status], + [ContractExchangeRateStat] AS [contractexchangeratestat], + [Print_Phone_NumberGB] AS [print_phone_numbergb], + [DEX_ROW_TS] AS [dex_row_ts], + [DEX_ROW_ID] AS [dex_row_id] +FROM [GPSERVER].[CHG].[dbo].[SOP10100] diff --git a/config/modules/sop10200.json b/config/modules/sop10200.json new file mode 100644 index 0000000..79543d6 --- /dev/null +++ b/config/modules/sop10200.json @@ -0,0 +1,939 @@ +{ + "name": "sop10200", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.sop10200", + "staging_table": "pipekit_staging.sop10200", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "SOPTYPE", + "source_type": "SMALLINT", + "dest_name": "soptype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SOPNUMBE", + "source_type": "CHAR(21)", + "dest_name": "sopnumbe", + "dest_type": "text", + "description": null + }, + { + "source_name": "LNITMSEQ", + "source_type": "INT", + "dest_name": "lnitmseq", + "dest_type": "integer", + "description": null + }, + { + "source_name": "CMPNTSEQ", + "source_type": "INT", + "dest_name": "cmpntseq", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ITEMNMBR", + "source_type": "CHAR(31)", + "dest_name": "itemnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "ITEMDESC", + "source_type": "CHAR(101)", + "dest_name": "itemdesc", + "dest_type": "text", + "description": null + }, + { + "source_name": "NONINVEN", + "source_type": "SMALLINT", + "dest_name": "noninven", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DROPSHIP", + "source_type": "SMALLINT", + "dest_name": "dropship", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "UOFM", + "source_type": "CHAR(9)", + "dest_name": "uofm", + "dest_type": "text", + "description": null + }, + { + "source_name": "LOCNCODE", + "source_type": "CHAR(11)", + "dest_name": "locncode", + "dest_type": "text", + "description": null + }, + { + "source_name": "UNITCOST", + "source_type": "NUMERIC(19,5)", + "dest_name": "unitcost", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORUNTCST", + "source_type": "NUMERIC(19,5)", + "dest_name": "oruntcst", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "UNITPRCE", + "source_type": "NUMERIC(19,5)", + "dest_name": "unitprce", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORUNTPRC", + "source_type": "NUMERIC(19,5)", + "dest_name": "oruntprc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "XTNDPRCE", + "source_type": "NUMERIC(19,5)", + "dest_name": "xtndprce", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OXTNDPRC", + "source_type": "NUMERIC(19,5)", + "dest_name": "oxtndprc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "REMPRICE", + "source_type": "NUMERIC(19,5)", + "dest_name": "remprice", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OREPRICE", + "source_type": "NUMERIC(19,5)", + "dest_name": "oreprice", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "EXTDCOST", + "source_type": "NUMERIC(19,5)", + "dest_name": "extdcost", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OREXTCST", + "source_type": "NUMERIC(19,5)", + "dest_name": "orextcst", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MRKDNAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "mrkdnamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORMRKDAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "ormrkdam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MRKDNPCT", + "source_type": "SMALLINT", + "dest_name": "mrkdnpct", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MRKDNTYP", + "source_type": "SMALLINT", + "dest_name": "mrkdntyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INVINDX", + "source_type": "INT", + "dest_name": "invindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "CSLSINDX", + "source_type": "INT", + "dest_name": "cslsindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "SLSINDX", + "source_type": "INT", + "dest_name": "slsindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "MKDNINDX", + "source_type": "INT", + "dest_name": "mkdnindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RTNSINDX", + "source_type": "INT", + "dest_name": "rtnsindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "INUSINDX", + "source_type": "INT", + "dest_name": "inusindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "INSRINDX", + "source_type": "INT", + "dest_name": "insrindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "DMGDINDX", + "source_type": "INT", + "dest_name": "dmgdindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ITMTSHID", + "source_type": "CHAR(15)", + "dest_name": "itmtshid", + "dest_type": "text", + "description": null + }, + { + "source_name": "IVITMTXB", + "source_type": "SMALLINT", + "dest_name": "ivitmtxb", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BKTSLSAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktslsam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORBKTSLS", + "source_type": "NUMERIC(19,5)", + "dest_name": "orbktsls", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TAXAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "taxamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORTAXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortaxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TXBTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "txbtxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OTAXTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "otaxtamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BSIVCTTL", + "source_type": "TINYINT", + "dest_name": "bsivcttl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TRDISAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "trdisamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORTDISAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortdisam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCSALE", + "source_type": "NUMERIC(19,5)", + "dest_name": "discsale", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDAVSLS", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordavsls", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QUANTITY", + "source_type": "NUMERIC(19,5)", + "dest_name": "quantity", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ATYALLOC", + "source_type": "NUMERIC(19,5)", + "dest_name": "atyalloc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYINSVC", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyinsvc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYINUSE", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyinuse", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYDMGED", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtydmged", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYRTRND", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyrtrnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYONHND", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyonhnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYCANCE", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtycance", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYCANOT", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtycanot", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYONPO", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyonpo", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYORDER", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyorder", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRBAC", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprbac", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRBOO", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprboo", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRINV", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprinv", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRORD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprord", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRVRECVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprvrecvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYRECVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyrecvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYREMAI", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyremai", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYREMBO", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyrembo", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYTBAOR", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtytbaor", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYTOINV", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtytoinv", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYTORDR", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtytordr", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYFULFI", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyfulfi", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYSLCTD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyslctd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYBSUOM", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtybsuom", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "EXTQTYAL", + "source_type": "NUMERIC(19,5)", + "dest_name": "extqtyal", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "EXTQTYSEL", + "source_type": "NUMERIC(19,5)", + "dest_name": "extqtysel", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ReqShipDate", + "source_type": "DATETIME", + "dest_name": "reqshipdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "FUFILDAT", + "source_type": "DATETIME", + "dest_name": "fufildat", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ACTLSHIP", + "source_type": "DATETIME", + "dest_name": "actlship", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "SHIPMTHD", + "source_type": "CHAR(15)", + "dest_name": "shipmthd", + "dest_type": "text", + "description": null + }, + { + "source_name": "SALSTERR", + "source_type": "CHAR(15)", + "dest_name": "salsterr", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLPRSNID", + "source_type": "CHAR(15)", + "dest_name": "slprsnid", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRCLEVEL", + "source_type": "CHAR(11)", + "dest_name": "prclevel", + "dest_type": "text", + "description": null + }, + { + "source_name": "COMMNTID", + "source_type": "CHAR(15)", + "dest_name": "commntid", + "dest_type": "text", + "description": null + }, + { + "source_name": "BRKFLD1", + "source_type": "SMALLINT", + "dest_name": "brkfld1", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BRKFLD2", + "source_type": "SMALLINT", + "dest_name": "brkfld2", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BRKFLD3", + "source_type": "SMALLINT", + "dest_name": "brkfld3", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CURRNIDX", + "source_type": "SMALLINT", + "dest_name": "currnidx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TRXSORCE", + "source_type": "CHAR(13)", + "dest_name": "trxsorce", + "dest_type": "text", + "description": null + }, + { + "source_name": "SOPLNERR", + "source_type": "BINARY", + "dest_name": "soplnerr", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "ORGSEQNM", + "source_type": "INT", + "dest_name": "orgseqnm", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ITEMCODE", + "source_type": "CHAR(15)", + "dest_name": "itemcode", + "dest_type": "text", + "description": null + }, + { + "source_name": "PURCHSTAT", + "source_type": "SMALLINT", + "dest_name": "purchstat", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DECPLQTY", + "source_type": "SMALLINT", + "dest_name": "decplqty", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DECPLCUR", + "source_type": "SMALLINT", + "dest_name": "decplcur", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ODECPLCU", + "source_type": "SMALLINT", + "dest_name": "odecplcu", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "QTYTOSHP", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtytoshp", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "XFRSHDOC", + "source_type": "TINYINT", + "dest_name": "xfrshdoc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "EXCEPTIONALDEMAND", + "source_type": "TINYINT", + "dest_name": "exceptionaldemand", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TAXSCHID", + "source_type": "CHAR(15)", + "dest_name": "taxschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "TXSCHSRC", + "source_type": "SMALLINT", + "dest_name": "txschsrc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PRSTADCD", + "source_type": "CHAR(15)", + "dest_name": "prstadcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "ShipToName", + "source_type": "CHAR(65)", + "dest_name": "shiptoname", + "dest_type": "text", + "description": null + }, + { + "source_name": "CNTCPRSN", + "source_type": "CHAR(61)", + "dest_name": "cntcprsn", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS1", + "source_type": "CHAR(61)", + "dest_name": "address1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS2", + "source_type": "CHAR(61)", + "dest_name": "address2", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS3", + "source_type": "CHAR(61)", + "dest_name": "address3", + "dest_type": "text", + "description": null + }, + { + "source_name": "CITY", + "source_type": "CHAR(35)", + "dest_name": "city", + "dest_type": "text", + "description": null + }, + { + "source_name": "STATE", + "source_type": "CHAR(29)", + "dest_name": "state", + "dest_type": "text", + "description": null + }, + { + "source_name": "ZIPCODE", + "source_type": "CHAR(11)", + "dest_name": "zipcode", + "dest_type": "text", + "description": null + }, + { + "source_name": "CCode", + "source_type": "CHAR(7)", + "dest_name": "ccode", + "dest_type": "text", + "description": null + }, + { + "source_name": "COUNTRY", + "source_type": "CHAR(61)", + "dest_name": "country", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE1", + "source_type": "CHAR(21)", + "dest_name": "phone1", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE2", + "source_type": "CHAR(21)", + "dest_name": "phone2", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE3", + "source_type": "CHAR(21)", + "dest_name": "phone3", + "dest_type": "text", + "description": null + }, + { + "source_name": "FAXNUMBR", + "source_type": "CHAR(21)", + "dest_name": "faxnumbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "Flags", + "source_type": "SMALLINT", + "dest_name": "flags", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BackoutTradeDisc", + "source_type": "NUMERIC(19,5)", + "dest_name": "backouttradedisc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OrigBackoutTradeDisc", + "source_type": "NUMERIC(19,5)", + "dest_name": "origbackouttradedisc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "GPSFOINTEGRATIONID", + "source_type": "CHAR(31)", + "dest_name": "gpsfointegrationid", + "dest_type": "text", + "description": null + }, + { + "source_name": "INTEGRATIONSOURCE", + "source_type": "SMALLINT", + "dest_name": "integrationsource", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INTEGRATIONID", + "source_type": "CHAR(31)", + "dest_name": "integrationid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CONTNBR", + "source_type": "CHAR(11)", + "dest_name": "contnbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CONTLNSEQNBR", + "source_type": "NUMERIC(19,5)", + "dest_name": "contlnseqnbr", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CONTSTARTDTE", + "source_type": "DATETIME", + "dest_name": "contstartdte", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "CONTENDDTE", + "source_type": "DATETIME", + "dest_name": "contenddte", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "CONTITEMNBR", + "source_type": "CHAR(31)", + "dest_name": "contitemnbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CONTSERIALNBR", + "source_type": "CHAR(21)", + "dest_name": "contserialnbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "BULKPICKPRNT", + "source_type": "TINYINT", + "dest_name": "bulkpickprnt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INDPICKPRNT", + "source_type": "TINYINT", + "dest_name": "indpickprnt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ISLINEINTRA", + "source_type": "TINYINT", + "dest_name": "islineintra", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SOFULFILLMENTBIN", + "source_type": "CHAR(15)", + "dest_name": "sofulfillmentbin", + "dest_type": "text", + "description": null + }, + { + "source_name": "MULTIPLEBINS", + "source_type": "TINYINT", + "dest_name": "multiplebins", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Print_Phone_NumberGB", + "source_type": "SMALLINT", + "dest_name": "print_phone_numbergb", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/sop10200.sql b/config/modules/sop10200.sql new file mode 100644 index 0000000..d97aa7c --- /dev/null +++ b/config/modules/sop10200.sql @@ -0,0 +1,134 @@ +SELECT + [SOPTYPE] AS [soptype], + RTRIM([SOPNUMBE]) AS [sopnumbe], + [LNITMSEQ] AS [lnitmseq], + [CMPNTSEQ] AS [cmpntseq], + RTRIM([ITEMNMBR]) AS [itemnmbr], + RTRIM([ITEMDESC]) AS [itemdesc], + [NONINVEN] AS [noninven], + [DROPSHIP] AS [dropship], + RTRIM([UOFM]) AS [uofm], + RTRIM([LOCNCODE]) AS [locncode], + [UNITCOST] AS [unitcost], + [ORUNTCST] AS [oruntcst], + [UNITPRCE] AS [unitprce], + [ORUNTPRC] AS [oruntprc], + [XTNDPRCE] AS [xtndprce], + [OXTNDPRC] AS [oxtndprc], + [REMPRICE] AS [remprice], + [OREPRICE] AS [oreprice], + [EXTDCOST] AS [extdcost], + [OREXTCST] AS [orextcst], + [MRKDNAMT] AS [mrkdnamt], + [ORMRKDAM] AS [ormrkdam], + [MRKDNPCT] AS [mrkdnpct], + [MRKDNTYP] AS [mrkdntyp], + [INVINDX] AS [invindx], + [CSLSINDX] AS [cslsindx], + [SLSINDX] AS [slsindx], + [MKDNINDX] AS [mkdnindx], + [RTNSINDX] AS [rtnsindx], + [INUSINDX] AS [inusindx], + [INSRINDX] AS [insrindx], + [DMGDINDX] AS [dmgdindx], + RTRIM([ITMTSHID]) AS [itmtshid], + [IVITMTXB] AS [ivitmtxb], + [BKTSLSAM] AS [bktslsam], + [ORBKTSLS] AS [orbktsls], + [TAXAMNT] AS [taxamnt], + [ORTAXAMT] AS [ortaxamt], + [TXBTXAMT] AS [txbtxamt], + [OTAXTAMT] AS [otaxtamt], + [BSIVCTTL] AS [bsivcttl], + [TRDISAMT] AS [trdisamt], + [ORTDISAM] AS [ortdisam], + [DISCSALE] AS [discsale], + [ORDAVSLS] AS [ordavsls], + [QUANTITY] AS [quantity], + [ATYALLOC] AS [atyalloc], + [QTYINSVC] AS [qtyinsvc], + [QTYINUSE] AS [qtyinuse], + [QTYDMGED] AS [qtydmged], + [QTYRTRND] AS [qtyrtrnd], + [QTYONHND] AS [qtyonhnd], + [QTYCANCE] AS [qtycance], + [QTYCANOT] AS [qtycanot], + [QTYONPO] AS [qtyonpo], + [QTYORDER] AS [qtyorder], + [QTYPRBAC] AS [qtyprbac], + [QTYPRBOO] AS [qtyprboo], + [QTYPRINV] AS [qtyprinv], + [QTYPRORD] AS [qtyprord], + [QTYPRVRECVD] AS [qtyprvrecvd], + [QTYRECVD] AS [qtyrecvd], + [QTYREMAI] AS [qtyremai], + [QTYREMBO] AS [qtyrembo], + [QTYTBAOR] AS [qtytbaor], + [QTYTOINV] AS [qtytoinv], + [QTYTORDR] AS [qtytordr], + [QTYFULFI] AS [qtyfulfi], + [QTYSLCTD] AS [qtyslctd], + [QTYBSUOM] AS [qtybsuom], + [EXTQTYAL] AS [extqtyal], + [EXTQTYSEL] AS [extqtysel], + [ReqShipDate] AS [reqshipdate], + [FUFILDAT] AS [fufildat], + [ACTLSHIP] AS [actlship], + RTRIM([SHIPMTHD]) AS [shipmthd], + RTRIM([SALSTERR]) AS [salsterr], + RTRIM([SLPRSNID]) AS [slprsnid], + RTRIM([PRCLEVEL]) AS [prclevel], + RTRIM([COMMNTID]) AS [commntid], + [BRKFLD1] AS [brkfld1], + [BRKFLD2] AS [brkfld2], + [BRKFLD3] AS [brkfld3], + [CURRNIDX] AS [currnidx], + RTRIM([TRXSORCE]) AS [trxsorce], + [SOPLNERR] AS [soplnerr], + [ORGSEQNM] AS [orgseqnm], + RTRIM([ITEMCODE]) AS [itemcode], + [PURCHSTAT] AS [purchstat], + [DECPLQTY] AS [decplqty], + [DECPLCUR] AS [decplcur], + [ODECPLCU] AS [odecplcu], + [QTYTOSHP] AS [qtytoshp], + [XFRSHDOC] AS [xfrshdoc], + [EXCEPTIONALDEMAND] AS [exceptionaldemand], + RTRIM([TAXSCHID]) AS [taxschid], + [TXSCHSRC] AS [txschsrc], + RTRIM([PRSTADCD]) AS [prstadcd], + RTRIM([ShipToName]) AS [shiptoname], + RTRIM([CNTCPRSN]) AS [cntcprsn], + RTRIM([ADDRESS1]) AS [address1], + RTRIM([ADDRESS2]) AS [address2], + RTRIM([ADDRESS3]) AS [address3], + RTRIM([CITY]) AS [city], + RTRIM([STATE]) AS [state], + RTRIM([ZIPCODE]) AS [zipcode], + RTRIM([CCode]) AS [ccode], + RTRIM([COUNTRY]) AS [country], + RTRIM([PHONE1]) AS [phone1], + RTRIM([PHONE2]) AS [phone2], + RTRIM([PHONE3]) AS [phone3], + RTRIM([FAXNUMBR]) AS [faxnumbr], + [Flags] AS [flags], + [BackoutTradeDisc] AS [backouttradedisc], + [OrigBackoutTradeDisc] AS [origbackouttradedisc], + RTRIM([GPSFOINTEGRATIONID]) AS [gpsfointegrationid], + [INTEGRATIONSOURCE] AS [integrationsource], + RTRIM([INTEGRATIONID]) AS [integrationid], + RTRIM([CONTNBR]) AS [contnbr], + [CONTLNSEQNBR] AS [contlnseqnbr], + [CONTSTARTDTE] AS [contstartdte], + [CONTENDDTE] AS [contenddte], + RTRIM([CONTITEMNBR]) AS [contitemnbr], + RTRIM([CONTSERIALNBR]) AS [contserialnbr], + [BULKPICKPRNT] AS [bulkpickprnt], + [INDPICKPRNT] AS [indpickprnt], + [ISLINEINTRA] AS [islineintra], + RTRIM([SOFULFILLMENTBIN]) AS [sofulfillmentbin], + [MULTIPLEBINS] AS [multiplebins], + [Print_Phone_NumberGB] AS [print_phone_numbergb], + [DEX_ROW_TS] AS [dex_row_ts], + [DEX_ROW_ID] AS [dex_row_id] +FROM [GPSERVER].[CHG].[dbo].[SOP10200] diff --git a/config/modules/sop30200.json b/config/modules/sop30200.json new file mode 100644 index 0000000..e4b71fc --- /dev/null +++ b/config/modules/sop30200.json @@ -0,0 +1,1303 @@ +{ + "name": "sop30200", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.sop30200", + "staging_table": "pipekit_staging.sop30200", + "merge_strategy": "incremental", + "merge_key": "soptype, sopnumbe", + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "SOPTYPE", + "source_type": "SMALLINT", + "dest_name": "soptype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SOPNUMBE", + "source_type": "CHAR(21)", + "dest_name": "sopnumbe", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORIGTYPE", + "source_type": "SMALLINT", + "dest_name": "origtype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ORIGNUMB", + "source_type": "CHAR(21)", + "dest_name": "orignumb", + "dest_type": "text", + "description": null + }, + { + "source_name": "DOCID", + "source_type": "CHAR(15)", + "dest_name": "docid", + "dest_type": "text", + "description": null + }, + { + "source_name": "DOCDATE", + "source_type": "DATETIME", + "dest_name": "docdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "GLPOSTDT", + "source_type": "DATETIME", + "dest_name": "glpostdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "QUOTEDAT", + "source_type": "DATETIME", + "dest_name": "quotedat", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "QUOEXPDA", + "source_type": "DATETIME", + "dest_name": "quoexpda", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ORDRDATE", + "source_type": "DATETIME", + "dest_name": "ordrdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "INVODATE", + "source_type": "DATETIME", + "dest_name": "invodate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "BACKDATE", + "source_type": "DATETIME", + "dest_name": "backdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "RETUDATE", + "source_type": "DATETIME", + "dest_name": "retudate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ReqShipDate", + "source_type": "DATETIME", + "dest_name": "reqshipdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "FUFILDAT", + "source_type": "DATETIME", + "dest_name": "fufildat", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ACTLSHIP", + "source_type": "DATETIME", + "dest_name": "actlship", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DISCDATE", + "source_type": "DATETIME", + "dest_name": "discdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DUEDATE", + "source_type": "DATETIME", + "dest_name": "duedate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "REPTING", + "source_type": "TINYINT", + "dest_name": "repting", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TRXFREQU", + "source_type": "SMALLINT", + "dest_name": "trxfrequ", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TIMEREPD", + "source_type": "SMALLINT", + "dest_name": "timerepd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TIMETREP", + "source_type": "SMALLINT", + "dest_name": "timetrep", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DYSTINCR", + "source_type": "SMALLINT", + "dest_name": "dystincr", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DTLSTREP", + "source_type": "DATETIME", + "dest_name": "dtlstrep", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DSTBTCH1", + "source_type": "CHAR(15)", + "dest_name": "dstbtch1", + "dest_type": "text", + "description": null + }, + { + "source_name": "DSTBTCH2", + "source_type": "CHAR(15)", + "dest_name": "dstbtch2", + "dest_type": "text", + "description": null + }, + { + "source_name": "USDOCID1", + "source_type": "CHAR(15)", + "dest_name": "usdocid1", + "dest_type": "text", + "description": null + }, + { + "source_name": "USDOCID2", + "source_type": "CHAR(15)", + "dest_name": "usdocid2", + "dest_type": "text", + "description": null + }, + { + "source_name": "DISCFRGT", + "source_type": "NUMERIC(19,5)", + "dest_name": "discfrgt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDAVFRT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordavfrt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCMISC", + "source_type": "NUMERIC(19,5)", + "dest_name": "discmisc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDAVMSC", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordavmsc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISAVAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "disavamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDAVAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordavamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCRTND", + "source_type": "NUMERIC(19,5)", + "dest_name": "discrtnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDISRTD", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordisrtd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISTKNAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "distknam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDISTKN", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordistkn", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DSCPCTAM", + "source_type": "SMALLINT", + "dest_name": "dscpctam", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DSCDLRAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "dscdlram", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDDLRAT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orddlrat", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISAVTKN", + "source_type": "NUMERIC(19,5)", + "dest_name": "disavtkn", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDATKN", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordatkn", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "PYMTRMID", + "source_type": "CHAR(21)", + "dest_name": "pymtrmid", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRCLEVEL", + "source_type": "CHAR(11)", + "dest_name": "prclevel", + "dest_type": "text", + "description": null + }, + { + "source_name": "LOCNCODE", + "source_type": "CHAR(11)", + "dest_name": "locncode", + "dest_type": "text", + "description": null + }, + { + "source_name": "BCHSOURC", + "source_type": "CHAR(15)", + "dest_name": "bchsourc", + "dest_type": "text", + "description": null + }, + { + "source_name": "BACHNUMB", + "source_type": "CHAR(15)", + "dest_name": "bachnumb", + "dest_type": "text", + "description": null + }, + { + "source_name": "CUSTNMBR", + "source_type": "CHAR(15)", + "dest_name": "custnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CUSTNAME", + "source_type": "CHAR(65)", + "dest_name": "custname", + "dest_type": "text", + "description": null + }, + { + "source_name": "CSTPONBR", + "source_type": "CHAR(21)", + "dest_name": "cstponbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "PROSPECT", + "source_type": "SMALLINT", + "dest_name": "prospect", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MSTRNUMB", + "source_type": "INT", + "dest_name": "mstrnumb", + "dest_type": "integer", + "description": null + }, + { + "source_name": "PCKSLPNO", + "source_type": "CHAR(21)", + "dest_name": "pckslpno", + "dest_type": "text", + "description": null + }, + { + "source_name": "PICTICNU", + "source_type": "CHAR(21)", + "dest_name": "picticnu", + "dest_type": "text", + "description": null + }, + { + "source_name": "MRKDNAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "mrkdnamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORMRKDAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "ormrkdam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "PRBTADCD", + "source_type": "CHAR(15)", + "dest_name": "prbtadcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRSTADCD", + "source_type": "CHAR(15)", + "dest_name": "prstadcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "CNTCPRSN", + "source_type": "CHAR(61)", + "dest_name": "cntcprsn", + "dest_type": "text", + "description": null + }, + { + "source_name": "ShipToName", + "source_type": "CHAR(65)", + "dest_name": "shiptoname", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS1", + "source_type": "CHAR(61)", + "dest_name": "address1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS2", + "source_type": "CHAR(61)", + "dest_name": "address2", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS3", + "source_type": "CHAR(61)", + "dest_name": "address3", + "dest_type": "text", + "description": null + }, + { + "source_name": "CITY", + "source_type": "CHAR(35)", + "dest_name": "city", + "dest_type": "text", + "description": null + }, + { + "source_name": "STATE", + "source_type": "CHAR(29)", + "dest_name": "state", + "dest_type": "text", + "description": null + }, + { + "source_name": "ZIPCODE", + "source_type": "CHAR(11)", + "dest_name": "zipcode", + "dest_type": "text", + "description": null + }, + { + "source_name": "CCode", + "source_type": "CHAR(7)", + "dest_name": "ccode", + "dest_type": "text", + "description": null + }, + { + "source_name": "COUNTRY", + "source_type": "CHAR(61)", + "dest_name": "country", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHNUMBR1", + "source_type": "CHAR(21)", + "dest_name": "phnumbr1", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHNUMBR2", + "source_type": "CHAR(21)", + "dest_name": "phnumbr2", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE3", + "source_type": "CHAR(21)", + "dest_name": "phone3", + "dest_type": "text", + "description": null + }, + { + "source_name": "FAXNUMBR", + "source_type": "CHAR(21)", + "dest_name": "faxnumbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "COMAPPTO", + "source_type": "SMALLINT", + "dest_name": "comappto", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "COMMAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "commamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OCOMMAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ocommamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CMMSLAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "cmmslamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORCOSAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orcosamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "NCOMAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ncomamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORNCMAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orncmamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SHIPMTHD", + "source_type": "CHAR(15)", + "dest_name": "shipmthd", + "dest_type": "text", + "description": null + }, + { + "source_name": "TRDISAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "trdisamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORTDISAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortdisam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TRDISPCT", + "source_type": "SMALLINT", + "dest_name": "trdispct", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SUBTOTAL", + "source_type": "NUMERIC(19,5)", + "dest_name": "subtotal", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORSUBTOT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orsubtot", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "REMSUBTO", + "source_type": "NUMERIC(19,5)", + "dest_name": "remsubto", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OREMSUBT", + "source_type": "NUMERIC(19,5)", + "dest_name": "oremsubt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "EXTDCOST", + "source_type": "NUMERIC(19,5)", + "dest_name": "extdcost", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OREXTCST", + "source_type": "NUMERIC(19,5)", + "dest_name": "orextcst", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "FRTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "frtamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORFRTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orfrtamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MISCAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "miscamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORMISCAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ormiscamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TXENGCLD", + "source_type": "TINYINT", + "dest_name": "txengcld", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TAXEXMT1", + "source_type": "CHAR(25)", + "dest_name": "taxexmt1", + "dest_type": "text", + "description": null + }, + { + "source_name": "TAXEXMT2", + "source_type": "CHAR(25)", + "dest_name": "taxexmt2", + "dest_type": "text", + "description": null + }, + { + "source_name": "TXRGNNUM", + "source_type": "CHAR(25)", + "dest_name": "txrgnnum", + "dest_type": "text", + "description": null + }, + { + "source_name": "TAXSCHID", + "source_type": "CHAR(15)", + "dest_name": "taxschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "TXSCHSRC", + "source_type": "SMALLINT", + "dest_name": "txschsrc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BSIVCTTL", + "source_type": "TINYINT", + "dest_name": "bsivcttl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FRTSCHID", + "source_type": "CHAR(15)", + "dest_name": "frtschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "FRTTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "frttxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORFRTTAX", + "source_type": "NUMERIC(19,5)", + "dest_name": "orfrttax", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "FRGTTXBL", + "source_type": "SMALLINT", + "dest_name": "frgttxbl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MSCSCHID", + "source_type": "CHAR(15)", + "dest_name": "mscschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "MSCTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "msctxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORMSCTAX", + "source_type": "NUMERIC(19,5)", + "dest_name": "ormsctax", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MISCTXBL", + "source_type": "SMALLINT", + "dest_name": "misctxbl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BKTFRTAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktfrtam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORBKTFRT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orbktfrt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BKTMSCAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktmscam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORBKTMSC", + "source_type": "NUMERIC(19,5)", + "dest_name": "orbktmsc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BCKTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "bcktxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OBTAXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "obtaxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TXBTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "txbtxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OTAXTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "otaxtamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TAXAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "taxamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORTAXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortaxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ECTRX", + "source_type": "TINYINT", + "dest_name": "ectrx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DOCAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "docamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDOCAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordocamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "PYMTRCVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "pymtrcvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORPMTRVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "orpmtrvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DEPRECVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "deprecvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDEPRVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordeprvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CODAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "codamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORCODAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "orcodamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ACCTAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "acctamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORACTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "oractamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SALSTERR", + "source_type": "CHAR(15)", + "dest_name": "salsterr", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLPRSNID", + "source_type": "CHAR(15)", + "dest_name": "slprsnid", + "dest_type": "text", + "description": null + }, + { + "source_name": "UPSZONE", + "source_type": "CHAR(3)", + "dest_name": "upszone", + "dest_type": "text", + "description": null + }, + { + "source_name": "TIMESPRT", + "source_type": "SMALLINT", + "dest_name": "timesprt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PSTGSTUS", + "source_type": "SMALLINT", + "dest_name": "pstgstus", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "VOIDSTTS", + "source_type": "SMALLINT", + "dest_name": "voidstts", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ALLOCABY", + "source_type": "SMALLINT", + "dest_name": "allocaby", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CURNCYID", + "source_type": "CHAR(15)", + "dest_name": "curncyid", + "dest_type": "text", + "description": null + }, + { + "source_name": "CURRNIDX", + "source_type": "SMALLINT", + "dest_name": "currnidx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "RATETPID", + "source_type": "CHAR(15)", + "dest_name": "ratetpid", + "dest_type": "text", + "description": null + }, + { + "source_name": "EXGTBLID", + "source_type": "CHAR(15)", + "dest_name": "exgtblid", + "dest_type": "text", + "description": null + }, + { + "source_name": "XCHGRATE", + "source_type": "NUMERIC(19,7)", + "dest_name": "xchgrate", + "dest_type": "numeric(19,7)", + "description": null + }, + { + "source_name": "DENXRATE", + "source_type": "NUMERIC(19,7)", + "dest_name": "denxrate", + "dest_type": "numeric(19,7)", + "description": null + }, + { + "source_name": "EXCHDATE", + "source_type": "DATETIME", + "dest_name": "exchdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "TIME1", + "source_type": "DATETIME", + "dest_name": "time1", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "RTCLCMTD", + "source_type": "SMALLINT", + "dest_name": "rtclcmtd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MCTRXSTT", + "source_type": "SMALLINT", + "dest_name": "mctrxstt", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TRXSORCE", + "source_type": "CHAR(13)", + "dest_name": "trxsorce", + "dest_type": "text", + "description": null + }, + { + "source_name": "SOPHDRE1", + "source_type": "BINARY", + "dest_name": "sophdre1", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "SOPHDRE2", + "source_type": "BINARY", + "dest_name": "sophdre2", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "SOPLNERR", + "source_type": "BINARY", + "dest_name": "soplnerr", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "SOPHDRFL", + "source_type": "BINARY", + "dest_name": "sophdrfl", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "COMMNTID", + "source_type": "CHAR(15)", + "dest_name": "commntid", + "dest_type": "text", + "description": null + }, + { + "source_name": "REFRENCE", + "source_type": "CHAR(31)", + "dest_name": "refrence", + "dest_type": "text", + "description": null + }, + { + "source_name": "POSTEDDT", + "source_type": "DATETIME", + "dest_name": "posteddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "PTDUSRID", + "source_type": "CHAR(15)", + "dest_name": "ptdusrid", + "dest_type": "text", + "description": null + }, + { + "source_name": "USER2ENT", + "source_type": "CHAR(15)", + "dest_name": "user2ent", + "dest_type": "text", + "description": null + }, + { + "source_name": "CREATDDT", + "source_type": "DATETIME", + "dest_name": "creatddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "MODIFDT", + "source_type": "DATETIME", + "dest_name": "modifdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "Tax_Date", + "source_type": "DATETIME", + "dest_name": "tax_date", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "APLYWITH", + "source_type": "TINYINT", + "dest_name": "aplywith", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WITHHAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "withhamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "SHPPGDOC", + "source_type": "TINYINT", + "dest_name": "shppgdoc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CORRCTN", + "source_type": "TINYINT", + "dest_name": "corrctn", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SIMPLIFD", + "source_type": "TINYINT", + "dest_name": "simplifd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DOCNCORR", + "source_type": "CHAR(21)", + "dest_name": "docncorr", + "dest_type": "text", + "description": null + }, + { + "source_name": "SEQNCORR", + "source_type": "SMALLINT", + "dest_name": "seqncorr", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SALEDATE", + "source_type": "DATETIME", + "dest_name": "saledate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "EXCEPTIONALDEMAND", + "source_type": "TINYINT", + "dest_name": "exceptionaldemand", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Flags", + "source_type": "SMALLINT", + "dest_name": "flags", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SOPSTATUS", + "source_type": "SMALLINT", + "dest_name": "sopstatus", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SHIPCOMPLETE", + "source_type": "TINYINT", + "dest_name": "shipcomplete", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DIRECTDEBIT", + "source_type": "TINYINT", + "dest_name": "directdebit", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WorkflowApprStatCreditLm", + "source_type": "SMALLINT", + "dest_name": "workflowapprstatcreditlm", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WorkflowPriorityCreditLm", + "source_type": "SMALLINT", + "dest_name": "workflowprioritycreditlm", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WorkflowApprStatusQuote", + "source_type": "SMALLINT", + "dest_name": "workflowapprstatusquote", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "WorkflowPriorityQuote", + "source_type": "SMALLINT", + "dest_name": "workflowpriorityquote", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Workflow_Status", + "source_type": "SMALLINT", + "dest_name": "workflow_status", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ContractExchangeRateStat", + "source_type": "SMALLINT", + "dest_name": "contractexchangeratestat", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Print_Phone_NumberGB", + "source_type": "SMALLINT", + "dest_name": "print_phone_numbergb", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [ + { + "name": "sop30200_ts", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dex_row_ts) - INTERVAL '1 day', '1900-01-01') FROM gp.sop30200", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/sop30200.sql b/config/modules/sop30200.sql new file mode 100644 index 0000000..651a54c --- /dev/null +++ b/config/modules/sop30200.sql @@ -0,0 +1,188 @@ +SELECT * FROM OPENQUERY(GPSERVER, ' +SELECT + [SOPTYPE] AS [soptype], + RTRIM([SOPNUMBE]) AS [sopnumbe], + [ORIGTYPE] AS [origtype], + RTRIM([ORIGNUMB]) AS [orignumb], + RTRIM([DOCID]) AS [docid], + [DOCDATE] AS [docdate], + [GLPOSTDT] AS [glpostdt], + [QUOTEDAT] AS [quotedat], + [QUOEXPDA] AS [quoexpda], + [ORDRDATE] AS [ordrdate], + [INVODATE] AS [invodate], + [BACKDATE] AS [backdate], + [RETUDATE] AS [retudate], + [ReqShipDate] AS [reqshipdate], + [FUFILDAT] AS [fufildat], + [ACTLSHIP] AS [actlship], + [DISCDATE] AS [discdate], + [DUEDATE] AS [duedate], + [REPTING] AS [repting], + [TRXFREQU] AS [trxfrequ], + [TIMEREPD] AS [timerepd], + [TIMETREP] AS [timetrep], + [DYSTINCR] AS [dystincr], + [DTLSTREP] AS [dtlstrep], + RTRIM([DSTBTCH1]) AS [dstbtch1], + RTRIM([DSTBTCH2]) AS [dstbtch2], + RTRIM([USDOCID1]) AS [usdocid1], + RTRIM([USDOCID2]) AS [usdocid2], + [DISCFRGT] AS [discfrgt], + [ORDAVFRT] AS [ordavfrt], + [DISCMISC] AS [discmisc], + [ORDAVMSC] AS [ordavmsc], + [DISAVAMT] AS [disavamt], + [ORDAVAMT] AS [ordavamt], + [DISCRTND] AS [discrtnd], + [ORDISRTD] AS [ordisrtd], + [DISTKNAM] AS [distknam], + [ORDISTKN] AS [ordistkn], + [DSCPCTAM] AS [dscpctam], + [DSCDLRAM] AS [dscdlram], + [ORDDLRAT] AS [orddlrat], + [DISAVTKN] AS [disavtkn], + [ORDATKN] AS [ordatkn], + RTRIM([PYMTRMID]) AS [pymtrmid], + RTRIM([PRCLEVEL]) AS [prclevel], + RTRIM([LOCNCODE]) AS [locncode], + RTRIM([BCHSOURC]) AS [bchsourc], + RTRIM([BACHNUMB]) AS [bachnumb], + RTRIM([CUSTNMBR]) AS [custnmbr], + RTRIM([CUSTNAME]) AS [custname], + RTRIM([CSTPONBR]) AS [cstponbr], + [PROSPECT] AS [prospect], + [MSTRNUMB] AS [mstrnumb], + RTRIM([PCKSLPNO]) AS [pckslpno], + RTRIM([PICTICNU]) AS [picticnu], + [MRKDNAMT] AS [mrkdnamt], + [ORMRKDAM] AS [ormrkdam], + RTRIM([PRBTADCD]) AS [prbtadcd], + RTRIM([PRSTADCD]) AS [prstadcd], + RTRIM([CNTCPRSN]) AS [cntcprsn], + RTRIM([ShipToName]) AS [shiptoname], + RTRIM([ADDRESS1]) AS [address1], + RTRIM([ADDRESS2]) AS [address2], + RTRIM([ADDRESS3]) AS [address3], + RTRIM([CITY]) AS [city], + RTRIM([STATE]) AS [state], + RTRIM([ZIPCODE]) AS [zipcode], + RTRIM([CCode]) AS [ccode], + RTRIM([COUNTRY]) AS [country], + RTRIM([PHNUMBR1]) AS [phnumbr1], + RTRIM([PHNUMBR2]) AS [phnumbr2], + RTRIM([PHONE3]) AS [phone3], + RTRIM([FAXNUMBR]) AS [faxnumbr], + [COMAPPTO] AS [comappto], + [COMMAMNT] AS [commamnt], + [OCOMMAMT] AS [ocommamt], + [CMMSLAMT] AS [cmmslamt], + [ORCOSAMT] AS [orcosamt], + [NCOMAMNT] AS [ncomamnt], + [ORNCMAMT] AS [orncmamt], + RTRIM([SHIPMTHD]) AS [shipmthd], + [TRDISAMT] AS [trdisamt], + [ORTDISAM] AS [ortdisam], + [TRDISPCT] AS [trdispct], + [SUBTOTAL] AS [subtotal], + [ORSUBTOT] AS [orsubtot], + [REMSUBTO] AS [remsubto], + [OREMSUBT] AS [oremsubt], + [EXTDCOST] AS [extdcost], + [OREXTCST] AS [orextcst], + [FRTAMNT] AS [frtamnt], + [ORFRTAMT] AS [orfrtamt], + [MISCAMNT] AS [miscamnt], + [ORMISCAMT] AS [ormiscamt], + [TXENGCLD] AS [txengcld], + RTRIM([TAXEXMT1]) AS [taxexmt1], + RTRIM([TAXEXMT2]) AS [taxexmt2], + RTRIM([TXRGNNUM]) AS [txrgnnum], + RTRIM([TAXSCHID]) AS [taxschid], + [TXSCHSRC] AS [txschsrc], + [BSIVCTTL] AS [bsivcttl], + RTRIM([FRTSCHID]) AS [frtschid], + [FRTTXAMT] AS [frttxamt], + [ORFRTTAX] AS [orfrttax], + [FRGTTXBL] AS [frgttxbl], + RTRIM([MSCSCHID]) AS [mscschid], + [MSCTXAMT] AS [msctxamt], + [ORMSCTAX] AS [ormsctax], + [MISCTXBL] AS [misctxbl], + [BKTFRTAM] AS [bktfrtam], + [ORBKTFRT] AS [orbktfrt], + [BKTMSCAM] AS [bktmscam], + [ORBKTMSC] AS [orbktmsc], + [BCKTXAMT] AS [bcktxamt], + [OBTAXAMT] AS [obtaxamt], + [TXBTXAMT] AS [txbtxamt], + [OTAXTAMT] AS [otaxtamt], + [TAXAMNT] AS [taxamnt], + [ORTAXAMT] AS [ortaxamt], + [ECTRX] AS [ectrx], + [DOCAMNT] AS [docamnt], + [ORDOCAMT] AS [ordocamt], + [PYMTRCVD] AS [pymtrcvd], + [ORPMTRVD] AS [orpmtrvd], + [DEPRECVD] AS [deprecvd], + [ORDEPRVD] AS [ordeprvd], + [CODAMNT] AS [codamnt], + [ORCODAMT] AS [orcodamt], + [ACCTAMNT] AS [acctamnt], + [ORACTAMT] AS [oractamt], + RTRIM([SALSTERR]) AS [salsterr], + RTRIM([SLPRSNID]) AS [slprsnid], + RTRIM([UPSZONE]) AS [upszone], + [TIMESPRT] AS [timesprt], + [PSTGSTUS] AS [pstgstus], + [VOIDSTTS] AS [voidstts], + [ALLOCABY] AS [allocaby], + [NOTEINDX] AS [noteindx], + RTRIM([CURNCYID]) AS [curncyid], + [CURRNIDX] AS [currnidx], + RTRIM([RATETPID]) AS [ratetpid], + RTRIM([EXGTBLID]) AS [exgtblid], + [XCHGRATE] AS [xchgrate], + [DENXRATE] AS [denxrate], + [EXCHDATE] AS [exchdate], + [TIME1] AS [time1], + [RTCLCMTD] AS [rtclcmtd], + [MCTRXSTT] AS [mctrxstt], + RTRIM([TRXSORCE]) AS [trxsorce], + [SOPHDRE1] AS [sophdre1], + [SOPHDRE2] AS [sophdre2], + [SOPLNERR] AS [soplnerr], + [SOPHDRFL] AS [sophdrfl], + RTRIM([COMMNTID]) AS [commntid], + RTRIM([REFRENCE]) AS [refrence], + [POSTEDDT] AS [posteddt], + RTRIM([PTDUSRID]) AS [ptdusrid], + RTRIM([USER2ENT]) AS [user2ent], + [CREATDDT] AS [creatddt], + [MODIFDT] AS [modifdt], + [Tax_Date] AS [tax_date], + [APLYWITH] AS [aplywith], + [WITHHAMT] AS [withhamt], + [SHPPGDOC] AS [shppgdoc], + [CORRCTN] AS [corrctn], + [SIMPLIFD] AS [simplifd], + RTRIM([DOCNCORR]) AS [docncorr], + [SEQNCORR] AS [seqncorr], + [SALEDATE] AS [saledate], + [EXCEPTIONALDEMAND] AS [exceptionaldemand], + [Flags] AS [flags], + [SOPSTATUS] AS [sopstatus], + [SHIPCOMPLETE] AS [shipcomplete], + [DIRECTDEBIT] AS [directdebit], + [WorkflowApprStatCreditLm] AS [workflowapprstatcreditlm], + [WorkflowPriorityCreditLm] AS [workflowprioritycreditlm], + [WorkflowApprStatusQuote] AS [workflowapprstatusquote], + [WorkflowPriorityQuote] AS [workflowpriorityquote], + [Workflow_Status] AS [workflow_status], + [ContractExchangeRateStat] AS [contractexchangeratestat], + [Print_Phone_NumberGB] AS [print_phone_numbergb], + [DEX_ROW_TS] AS [dex_row_ts], + [DEX_ROW_ID] AS [dex_row_id] +FROM CHG.dbo.SOP30200 +WHERE [DEX_ROW_TS] > ''{sop30200_ts}'' +') diff --git a/config/modules/sop30300.json b/config/modules/sop30300.json new file mode 100644 index 0000000..c635ba3 --- /dev/null +++ b/config/modules/sop30300.json @@ -0,0 +1,869 @@ +{ + "name": "sop30300", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.sop30300", + "staging_table": "pipekit_staging.sop30300", + "merge_strategy": "incremental", + "merge_key": "soptype, sopnumbe, lnitmseq, cmpntseq", + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "SOPTYPE", + "source_type": "SMALLINT", + "dest_name": "soptype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SOPNUMBE", + "source_type": "CHAR(21)", + "dest_name": "sopnumbe", + "dest_type": "text", + "description": null + }, + { + "source_name": "LNITMSEQ", + "source_type": "INT", + "dest_name": "lnitmseq", + "dest_type": "integer", + "description": null + }, + { + "source_name": "CMPNTSEQ", + "source_type": "INT", + "dest_name": "cmpntseq", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ITEMNMBR", + "source_type": "CHAR(31)", + "dest_name": "itemnmbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "ITEMDESC", + "source_type": "CHAR(101)", + "dest_name": "itemdesc", + "dest_type": "text", + "description": null + }, + { + "source_name": "NONINVEN", + "source_type": "SMALLINT", + "dest_name": "noninven", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DROPSHIP", + "source_type": "SMALLINT", + "dest_name": "dropship", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "UOFM", + "source_type": "CHAR(9)", + "dest_name": "uofm", + "dest_type": "text", + "description": null + }, + { + "source_name": "LOCNCODE", + "source_type": "CHAR(11)", + "dest_name": "locncode", + "dest_type": "text", + "description": null + }, + { + "source_name": "UNITCOST", + "source_type": "NUMERIC(19,5)", + "dest_name": "unitcost", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORUNTCST", + "source_type": "NUMERIC(19,5)", + "dest_name": "oruntcst", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "UNITPRCE", + "source_type": "NUMERIC(19,5)", + "dest_name": "unitprce", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORUNTPRC", + "source_type": "NUMERIC(19,5)", + "dest_name": "oruntprc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "XTNDPRCE", + "source_type": "NUMERIC(19,5)", + "dest_name": "xtndprce", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OXTNDPRC", + "source_type": "NUMERIC(19,5)", + "dest_name": "oxtndprc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "REMPRICE", + "source_type": "NUMERIC(19,5)", + "dest_name": "remprice", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OREPRICE", + "source_type": "NUMERIC(19,5)", + "dest_name": "oreprice", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "EXTDCOST", + "source_type": "NUMERIC(19,5)", + "dest_name": "extdcost", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OREXTCST", + "source_type": "NUMERIC(19,5)", + "dest_name": "orextcst", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MRKDNAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "mrkdnamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORMRKDAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "ormrkdam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "MRKDNPCT", + "source_type": "SMALLINT", + "dest_name": "mrkdnpct", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MRKDNTYP", + "source_type": "SMALLINT", + "dest_name": "mrkdntyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "INVINDX", + "source_type": "INT", + "dest_name": "invindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "CSLSINDX", + "source_type": "INT", + "dest_name": "cslsindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "SLSINDX", + "source_type": "INT", + "dest_name": "slsindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "MKDNINDX", + "source_type": "INT", + "dest_name": "mkdnindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "RTNSINDX", + "source_type": "INT", + "dest_name": "rtnsindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "INUSINDX", + "source_type": "INT", + "dest_name": "inusindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "INSRINDX", + "source_type": "INT", + "dest_name": "insrindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "DMGDINDX", + "source_type": "INT", + "dest_name": "dmgdindx", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ITMTSHID", + "source_type": "CHAR(15)", + "dest_name": "itmtshid", + "dest_type": "text", + "description": null + }, + { + "source_name": "IVITMTXB", + "source_type": "SMALLINT", + "dest_name": "ivitmtxb", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BKTSLSAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "bktslsam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORBKTSLS", + "source_type": "NUMERIC(19,5)", + "dest_name": "orbktsls", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TAXAMNT", + "source_type": "NUMERIC(19,5)", + "dest_name": "taxamnt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORTAXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortaxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "TXBTXAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "txbtxamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "OTAXTAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "otaxtamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "BSIVCTTL", + "source_type": "TINYINT", + "dest_name": "bsivcttl", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TRDISAMT", + "source_type": "NUMERIC(19,5)", + "dest_name": "trdisamt", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORTDISAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "ortdisam", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DISCSALE", + "source_type": "NUMERIC(19,5)", + "dest_name": "discsale", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ORDAVSLS", + "source_type": "NUMERIC(19,5)", + "dest_name": "ordavsls", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QUANTITY", + "source_type": "NUMERIC(19,5)", + "dest_name": "quantity", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ATYALLOC", + "source_type": "NUMERIC(19,5)", + "dest_name": "atyalloc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYINSVC", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyinsvc", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYINUSE", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyinuse", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYDMGED", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtydmged", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYRTRND", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyrtrnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYONHND", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyonhnd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYCANCE", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtycance", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYCANOT", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtycanot", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYORDER", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyorder", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRBAC", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprbac", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRBOO", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprboo", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRINV", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprinv", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRORD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprord", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYPRVRECVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyprvrecvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYRECVD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyrecvd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYREMAI", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyremai", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYREMBO", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyrembo", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYTBAOR", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtytbaor", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYTOINV", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtytoinv", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYTORDR", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtytordr", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYFULFI", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyfulfi", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYSLCTD", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtyslctd", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "QTYBSUOM", + "source_type": "NUMERIC(19,5)", + "dest_name": "qtybsuom", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "EXTQTYAL", + "source_type": "NUMERIC(19,5)", + "dest_name": "extqtyal", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "EXTQTYSEL", + "source_type": "NUMERIC(19,5)", + "dest_name": "extqtysel", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "ReqShipDate", + "source_type": "DATETIME", + "dest_name": "reqshipdate", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "FUFILDAT", + "source_type": "DATETIME", + "dest_name": "fufildat", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ACTLSHIP", + "source_type": "DATETIME", + "dest_name": "actlship", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "SHIPMTHD", + "source_type": "CHAR(15)", + "dest_name": "shipmthd", + "dest_type": "text", + "description": null + }, + { + "source_name": "SALSTERR", + "source_type": "CHAR(15)", + "dest_name": "salsterr", + "dest_type": "text", + "description": null + }, + { + "source_name": "SLPRSNID", + "source_type": "CHAR(15)", + "dest_name": "slprsnid", + "dest_type": "text", + "description": null + }, + { + "source_name": "PRCLEVEL", + "source_type": "CHAR(11)", + "dest_name": "prclevel", + "dest_type": "text", + "description": null + }, + { + "source_name": "COMMNTID", + "source_type": "CHAR(15)", + "dest_name": "commntid", + "dest_type": "text", + "description": null + }, + { + "source_name": "BRKFLD1", + "source_type": "SMALLINT", + "dest_name": "brkfld1", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BRKFLD2", + "source_type": "SMALLINT", + "dest_name": "brkfld2", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "BRKFLD3", + "source_type": "SMALLINT", + "dest_name": "brkfld3", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CURRNIDX", + "source_type": "SMALLINT", + "dest_name": "currnidx", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TRXSORCE", + "source_type": "CHAR(13)", + "dest_name": "trxsorce", + "dest_type": "text", + "description": null + }, + { + "source_name": "SOPLNERR", + "source_type": "BINARY", + "dest_name": "soplnerr", + "dest_type": "bytea", + "description": null + }, + { + "source_name": "DOCNCORR", + "source_type": "CHAR(21)", + "dest_name": "docncorr", + "dest_type": "text", + "description": null + }, + { + "source_name": "ORGSEQNM", + "source_type": "INT", + "dest_name": "orgseqnm", + "dest_type": "integer", + "description": null + }, + { + "source_name": "ITEMCODE", + "source_type": "CHAR(15)", + "dest_name": "itemcode", + "dest_type": "text", + "description": null + }, + { + "source_name": "PURCHSTAT", + "source_type": "SMALLINT", + "dest_name": "purchstat", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DECPLQTY", + "source_type": "SMALLINT", + "dest_name": "decplqty", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DECPLCUR", + "source_type": "SMALLINT", + "dest_name": "decplcur", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ODECPLCU", + "source_type": "SMALLINT", + "dest_name": "odecplcu", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "EXCEPTIONALDEMAND", + "source_type": "TINYINT", + "dest_name": "exceptionaldemand", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TAXSCHID", + "source_type": "CHAR(15)", + "dest_name": "taxschid", + "dest_type": "text", + "description": null + }, + { + "source_name": "TXSCHSRC", + "source_type": "SMALLINT", + "dest_name": "txschsrc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PRSTADCD", + "source_type": "CHAR(15)", + "dest_name": "prstadcd", + "dest_type": "text", + "description": null + }, + { + "source_name": "ShipToName", + "source_type": "CHAR(65)", + "dest_name": "shiptoname", + "dest_type": "text", + "description": null + }, + { + "source_name": "CNTCPRSN", + "source_type": "CHAR(61)", + "dest_name": "cntcprsn", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS1", + "source_type": "CHAR(61)", + "dest_name": "address1", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS2", + "source_type": "CHAR(61)", + "dest_name": "address2", + "dest_type": "text", + "description": null + }, + { + "source_name": "ADDRESS3", + "source_type": "CHAR(61)", + "dest_name": "address3", + "dest_type": "text", + "description": null + }, + { + "source_name": "CITY", + "source_type": "CHAR(35)", + "dest_name": "city", + "dest_type": "text", + "description": null + }, + { + "source_name": "STATE", + "source_type": "CHAR(29)", + "dest_name": "state", + "dest_type": "text", + "description": null + }, + { + "source_name": "ZIPCODE", + "source_type": "CHAR(11)", + "dest_name": "zipcode", + "dest_type": "text", + "description": null + }, + { + "source_name": "CCode", + "source_type": "CHAR(7)", + "dest_name": "ccode", + "dest_type": "text", + "description": null + }, + { + "source_name": "COUNTRY", + "source_type": "CHAR(61)", + "dest_name": "country", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE1", + "source_type": "CHAR(21)", + "dest_name": "phone1", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE2", + "source_type": "CHAR(21)", + "dest_name": "phone2", + "dest_type": "text", + "description": null + }, + { + "source_name": "PHONE3", + "source_type": "CHAR(21)", + "dest_name": "phone3", + "dest_type": "text", + "description": null + }, + { + "source_name": "FAXNUMBR", + "source_type": "CHAR(21)", + "dest_name": "faxnumbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "Flags", + "source_type": "SMALLINT", + "dest_name": "flags", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CONTNBR", + "source_type": "CHAR(11)", + "dest_name": "contnbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CONTLNSEQNBR", + "source_type": "NUMERIC(19,5)", + "dest_name": "contlnseqnbr", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CONTSTARTDTE", + "source_type": "DATETIME", + "dest_name": "contstartdte", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "CONTENDDTE", + "source_type": "DATETIME", + "dest_name": "contenddte", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "CONTITEMNBR", + "source_type": "CHAR(31)", + "dest_name": "contitemnbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "CONTSERIALNBR", + "source_type": "CHAR(21)", + "dest_name": "contserialnbr", + "dest_type": "text", + "description": null + }, + { + "source_name": "ISLINEINTRA", + "source_type": "TINYINT", + "dest_name": "islineintra", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "Print_Phone_NumberGB", + "source_type": "SMALLINT", + "dest_name": "print_phone_numbergb", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [ + { + "name": "sop30300_ts", + "connection": "usmidsap02", + "resolver_sql": "SELECT COALESCE(MAX(dex_row_ts) - INTERVAL '1 day', '1900-01-01') FROM gp.sop30300", + "default_value": null + } + ], + "hooks": [] +} diff --git a/config/modules/sop30300.sql b/config/modules/sop30300.sql new file mode 100644 index 0000000..6515c93 --- /dev/null +++ b/config/modules/sop30300.sql @@ -0,0 +1,126 @@ +SELECT * FROM OPENQUERY(GPSERVER, ' +SELECT + [SOPTYPE] AS [soptype], + RTRIM([SOPNUMBE]) AS [sopnumbe], + [LNITMSEQ] AS [lnitmseq], + [CMPNTSEQ] AS [cmpntseq], + RTRIM([ITEMNMBR]) AS [itemnmbr], + RTRIM([ITEMDESC]) AS [itemdesc], + [NONINVEN] AS [noninven], + [DROPSHIP] AS [dropship], + RTRIM([UOFM]) AS [uofm], + RTRIM([LOCNCODE]) AS [locncode], + [UNITCOST] AS [unitcost], + [ORUNTCST] AS [oruntcst], + [UNITPRCE] AS [unitprce], + [ORUNTPRC] AS [oruntprc], + [XTNDPRCE] AS [xtndprce], + [OXTNDPRC] AS [oxtndprc], + [REMPRICE] AS [remprice], + [OREPRICE] AS [oreprice], + [EXTDCOST] AS [extdcost], + [OREXTCST] AS [orextcst], + [MRKDNAMT] AS [mrkdnamt], + [ORMRKDAM] AS [ormrkdam], + [MRKDNPCT] AS [mrkdnpct], + [MRKDNTYP] AS [mrkdntyp], + [INVINDX] AS [invindx], + [CSLSINDX] AS [cslsindx], + [SLSINDX] AS [slsindx], + [MKDNINDX] AS [mkdnindx], + [RTNSINDX] AS [rtnsindx], + [INUSINDX] AS [inusindx], + [INSRINDX] AS [insrindx], + [DMGDINDX] AS [dmgdindx], + RTRIM([ITMTSHID]) AS [itmtshid], + [IVITMTXB] AS [ivitmtxb], + [BKTSLSAM] AS [bktslsam], + [ORBKTSLS] AS [orbktsls], + [TAXAMNT] AS [taxamnt], + [ORTAXAMT] AS [ortaxamt], + [TXBTXAMT] AS [txbtxamt], + [OTAXTAMT] AS [otaxtamt], + [BSIVCTTL] AS [bsivcttl], + [TRDISAMT] AS [trdisamt], + [ORTDISAM] AS [ortdisam], + [DISCSALE] AS [discsale], + [ORDAVSLS] AS [ordavsls], + [QUANTITY] AS [quantity], + [ATYALLOC] AS [atyalloc], + [QTYINSVC] AS [qtyinsvc], + [QTYINUSE] AS [qtyinuse], + [QTYDMGED] AS [qtydmged], + [QTYRTRND] AS [qtyrtrnd], + [QTYONHND] AS [qtyonhnd], + [QTYCANCE] AS [qtycance], + [QTYCANOT] AS [qtycanot], + [QTYORDER] AS [qtyorder], + [QTYPRBAC] AS [qtyprbac], + [QTYPRBOO] AS [qtyprboo], + [QTYPRINV] AS [qtyprinv], + [QTYPRORD] AS [qtyprord], + [QTYPRVRECVD] AS [qtyprvrecvd], + [QTYRECVD] AS [qtyrecvd], + [QTYREMAI] AS [qtyremai], + [QTYREMBO] AS [qtyrembo], + [QTYTBAOR] AS [qtytbaor], + [QTYTOINV] AS [qtytoinv], + [QTYTORDR] AS [qtytordr], + [QTYFULFI] AS [qtyfulfi], + [QTYSLCTD] AS [qtyslctd], + [QTYBSUOM] AS [qtybsuom], + [EXTQTYAL] AS [extqtyal], + [EXTQTYSEL] AS [extqtysel], + [ReqShipDate] AS [reqshipdate], + [FUFILDAT] AS [fufildat], + [ACTLSHIP] AS [actlship], + RTRIM([SHIPMTHD]) AS [shipmthd], + RTRIM([SALSTERR]) AS [salsterr], + RTRIM([SLPRSNID]) AS [slprsnid], + RTRIM([PRCLEVEL]) AS [prclevel], + RTRIM([COMMNTID]) AS [commntid], + [BRKFLD1] AS [brkfld1], + [BRKFLD2] AS [brkfld2], + [BRKFLD3] AS [brkfld3], + [CURRNIDX] AS [currnidx], + RTRIM([TRXSORCE]) AS [trxsorce], + [SOPLNERR] AS [soplnerr], + RTRIM([DOCNCORR]) AS [docncorr], + [ORGSEQNM] AS [orgseqnm], + RTRIM([ITEMCODE]) AS [itemcode], + [PURCHSTAT] AS [purchstat], + [DECPLQTY] AS [decplqty], + [DECPLCUR] AS [decplcur], + [ODECPLCU] AS [odecplcu], + [EXCEPTIONALDEMAND] AS [exceptionaldemand], + RTRIM([TAXSCHID]) AS [taxschid], + [TXSCHSRC] AS [txschsrc], + RTRIM([PRSTADCD]) AS [prstadcd], + RTRIM([ShipToName]) AS [shiptoname], + RTRIM([CNTCPRSN]) AS [cntcprsn], + RTRIM([ADDRESS1]) AS [address1], + RTRIM([ADDRESS2]) AS [address2], + RTRIM([ADDRESS3]) AS [address3], + RTRIM([CITY]) AS [city], + RTRIM([STATE]) AS [state], + RTRIM([ZIPCODE]) AS [zipcode], + RTRIM([CCode]) AS [ccode], + RTRIM([COUNTRY]) AS [country], + RTRIM([PHONE1]) AS [phone1], + RTRIM([PHONE2]) AS [phone2], + RTRIM([PHONE3]) AS [phone3], + RTRIM([FAXNUMBR]) AS [faxnumbr], + [Flags] AS [flags], + RTRIM([CONTNBR]) AS [contnbr], + [CONTLNSEQNBR] AS [contlnseqnbr], + [CONTSTARTDTE] AS [contstartdte], + [CONTENDDTE] AS [contenddte], + RTRIM([CONTITEMNBR]) AS [contitemnbr], + RTRIM([CONTSERIALNBR]) AS [contserialnbr], + [ISLINEINTRA] AS [islineintra], + [Print_Phone_NumberGB] AS [print_phone_numbergb], + [DEX_ROW_TS] AS [dex_row_ts], + [DEX_ROW_ID] AS [dex_row_id] +FROM CHG.dbo.SOP30300 +WHERE [DEX_ROW_TS] > ''{sop30300_ts}'' +') diff --git a/config/modules/stkb.json b/config/modules/stkb.json new file mode 100644 index 0000000..c172058 --- /dev/null +++ b/config/modules/stkb.json @@ -0,0 +1,183 @@ +{ + "name": "stkb", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.stkb", + "staging_table": "pipekit_staging.stkb", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Stock Balance (inventory) 6.0", + "columns": [ + { + "source_name": "BXPART", + "source_type": "CHAR(20)", + "dest_name": "bxpart", + "dest_type": "text", + "description": "Part Number" + }, + { + "source_name": "BXLOT", + "source_type": "CHAR(15)", + "dest_name": "bxlot", + "dest_type": "text", + "description": "Lot Number" + }, + { + "source_name": "BXSTOK", + "source_type": "CHAR(6)", + "dest_name": "bxstok", + "dest_type": "text", + "description": "Stock Location" + }, + { + "source_name": "BXUNIT", + "source_type": "CHAR(3)", + "dest_name": "bxunit", + "dest_type": "text", + "description": "Unit of Measure" + }, + { + "source_name": "BXQTOH", + "source_type": "DECIMAL(15,5)", + "dest_name": "bxqtoh", + "dest_type": "numeric(15,5)", + "description": "Quantity On Hand" + }, + { + "source_name": "BXQTAL", + "source_type": "DECIMAL(15,5)", + "dest_name": "bxqtal", + "dest_type": "numeric(15,5)", + "description": "Quantity Allocated" + }, + { + "source_name": "BXMNQT", + "source_type": "DECIMAL(15,5)", + "dest_name": "bxmnqt", + "dest_type": "numeric(15,5)", + "description": "Minimum Quantity" + }, + { + "source_name": "BXMXQT", + "source_type": "DECIMAL(15,5)", + "dest_name": "bxmxqt", + "dest_type": "numeric(15,5)", + "description": "Maximum Quantity" + }, + { + "source_name": "BXQTOD", + "source_type": "DECIMAL(15,5)", + "dest_name": "bxqtod", + "dest_type": "numeric(15,5)", + "description": "Qty on Order/Production" + }, + { + "source_name": "BXPDAT", + "source_type": "DATE", + "dest_name": "bxpdat", + "dest_type": "date", + "description": "Last Phys. Count Date" + }, + { + "source_name": "BXCCGP", + "source_type": "CHAR(3)", + "dest_name": "bxccgp", + "dest_type": "text", + "description": "Cycle Count Group" + }, + { + "source_name": "BXQTSO", + "source_type": "DECIMAL(15,5)", + "dest_name": "bxqtso", + "dest_type": "numeric(15,5)", + "description": "Qty on Sales Order" + }, + { + "source_name": "BXPLNT", + "source_type": "CHAR(3)", + "dest_name": "bxplnt", + "dest_type": "text", + "description": "Plant Code" + }, + { + "source_name": "BXFUT1", + "source_type": "CHAR(1)", + "dest_name": "bxfut1", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BXFUT2", + "source_type": "CHAR(1)", + "dest_name": "bxfut2", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BXFUT3", + "source_type": "CHAR(1)", + "dest_name": "bxfut3", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BXFUT4", + "source_type": "CHAR(1)", + "dest_name": "bxfut4", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BXFUT5", + "source_type": "CHAR(10)", + "dest_name": "bxfut5", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BXFUT6", + "source_type": "CHAR(10)", + "dest_name": "bxfut6", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BXFUT7", + "source_type": "CHAR(20)", + "dest_name": "bxfut7", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BXFUT8", + "source_type": "CHAR(20)", + "dest_name": "bxfut8", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BXFUT9", + "source_type": "CHAR(3)", + "dest_name": "bxfut9", + "dest_type": "text", + "description": "Future Use" + }, + { + "source_name": "BXFUTA", + "source_type": "NUMERIC(15,5)", + "dest_name": "bxfuta", + "dest_type": "numeric(15,5)", + "description": "Future Use" + }, + { + "source_name": "BXLEXP", + "source_type": "DATE", + "dest_name": "bxlexp", + "dest_type": "date", + "description": "Lot Expiry Date" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/stkb.sql b/config/modules/stkb.sql new file mode 100644 index 0000000..fb3cc05 --- /dev/null +++ b/config/modules/stkb.sql @@ -0,0 +1,28 @@ +SELECT + RTRIM(BXPART) AS bxpart, + RTRIM(BXLOT) AS bxlot, + RTRIM(BXSTOK) AS bxstok, + RTRIM(BXUNIT) AS bxunit, + BXQTOH AS bxqtoh, + BXQTAL AS bxqtal, + BXMNQT AS bxmnqt, + BXMXQT AS bxmxqt, + BXQTOD AS bxqtod, + CASE WHEN BXPDAT IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE BXPDAT END AS bxpdat, + RTRIM(BXCCGP) AS bxccgp, + BXQTSO AS bxqtso, + RTRIM(BXPLNT) AS bxplnt, + RTRIM(BXFUT1) AS bxfut1, + RTRIM(BXFUT2) AS bxfut2, + RTRIM(BXFUT3) AS bxfut3, + RTRIM(BXFUT4) AS bxfut4, + RTRIM(BXFUT5) AS bxfut5, + RTRIM(BXFUT6) AS bxfut6, + RTRIM(BXFUT7) AS bxfut7, + RTRIM(BXFUT8) AS bxfut8, + RTRIM(BXFUT9) AS bxfut9, + BXFUTA AS bxfuta, + CASE WHEN BXLEXP IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE BXLEXP END AS bxlexp +FROM LGDAT.STKB +WHERE + BXQTOH <> 0 diff --git a/config/modules/stnote.json b/config/modules/stnote.json new file mode 100644 index 0000000..24598c1 --- /dev/null +++ b/config/modules/stnote.json @@ -0,0 +1,78 @@ +{ + "name": "stnote", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.stnote", + "staging_table": "pipekit_staging.stnote", + "merge_strategy": "full", + "merge_key": null, + "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(3,0)", + "description": "Page Number" + }, + { + "source_name": "GGLIN#", + "source_type": "NUMERIC(2,0)", + "dest_name": "gglin#", + "dest_type": "numeric(2,0)", + "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": [], + "hooks": [] +} diff --git a/config/modules/stnote.sql b/config/modules/stnote.sql new file mode 100644 index 0000000..d2eae9a --- /dev/null +++ b/config/modules/stnote.sql @@ -0,0 +1,11 @@ +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.STNOTE diff --git a/config/modules/surcharge.json b/config/modules/surcharge.json new file mode 100644 index 0000000..007798c --- /dev/null +++ b/config/modules/surcharge.json @@ -0,0 +1,50 @@ +{ + "name": "surcharge", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.surcharge", + "staging_table": "pipekit_staging.surcharge", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Surcharge File", + "columns": [ + { + "source_name": "SUCUST", + "source_type": "CHAR(8)", + "dest_name": "sucust", + "dest_type": "text", + "description": "Customer" + }, + { + "source_name": "SUASSC", + "source_type": "CHAR(10)", + "dest_name": "suassc", + "dest_type": "text", + "description": "Part Type" + }, + { + "source_name": "SUCOLR", + "source_type": "CHAR(3)", + "dest_name": "sucolr", + "dest_type": "text", + "description": "Color Code" + }, + { + "source_name": "SUMAJG", + "source_type": "CHAR(3)", + "dest_name": "sumajg", + "dest_type": "text", + "description": "Major Group" + }, + { + "source_name": "SUDISC", + "source_type": "CHAR(3)", + "dest_name": "sudisc", + "dest_type": "text", + "description": "Discount Code" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/surcharge.sql b/config/modules/surcharge.sql new file mode 100644 index 0000000..a0c01d0 --- /dev/null +++ b/config/modules/surcharge.sql @@ -0,0 +1,7 @@ +SELECT + RTRIM(SUCUST) AS sucust, + RTRIM(SUASSC) AS suassc, + RTRIM(SUCOLR) AS sucolr, + RTRIM(SUMAJG) AS sumajg, + RTRIM(SUDISC) AS sudisc +FROM "CMS.CUSLG".SURCHARGE diff --git a/config/modules/surcharge_ms.json b/config/modules/surcharge_ms.json new file mode 100644 index 0000000..6a18ee3 --- /dev/null +++ b/config/modules/surcharge_ms.json @@ -0,0 +1,50 @@ +{ + "name": "surcharge_ms", + "source_connection": "S78030956", + "dest_connection": "sqlserver", + "dest_table": "lgdat.surcharge", + "staging_table": "pipekit_staging.surcharge_ms", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Surcharge File", + "columns": [ + { + "source_name": "SUCUST", + "source_type": "CHAR(8)", + "dest_name": "sucust", + "dest_type": "text", + "description": "Customer" + }, + { + "source_name": "SUASSC", + "source_type": "CHAR(10)", + "dest_name": "suassc", + "dest_type": "text", + "description": "Part Type" + }, + { + "source_name": "SUCOLR", + "source_type": "CHAR(3)", + "dest_name": "sucolr", + "dest_type": "text", + "description": "Color Code" + }, + { + "source_name": "SUMAJG", + "source_type": "CHAR(3)", + "dest_name": "sumajg", + "dest_type": "text", + "description": "Major Group" + }, + { + "source_name": "SUDISC", + "source_type": "CHAR(3)", + "dest_name": "sudisc", + "dest_type": "text", + "description": "Discount Code" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/surcharge_ms.sql b/config/modules/surcharge_ms.sql new file mode 100644 index 0000000..a0c01d0 --- /dev/null +++ b/config/modules/surcharge_ms.sql @@ -0,0 +1,7 @@ +SELECT + RTRIM(SUCUST) AS sucust, + RTRIM(SUASSC) AS suassc, + RTRIM(SUCOLR) AS sucolr, + RTRIM(SUMAJG) AS sumajg, + RTRIM(SUDISC) AS sudisc +FROM "CMS.CUSLG".SURCHARGE diff --git a/config/modules/surchargep.json b/config/modules/surchargep.json new file mode 100644 index 0000000..f7ef52d --- /dev/null +++ b/config/modules/surchargep.json @@ -0,0 +1,50 @@ +{ + "name": "surchargep", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.surchargep", + "staging_table": "pipekit_staging.surchargep", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Surcharge Table - Purchased Parts", + "columns": [ + { + "source_name": "SPCUST", + "source_type": "CHAR(8)", + "dest_name": "spcust", + "dest_type": "text", + "description": "Customer" + }, + { + "source_name": "SPBASE", + "source_type": "CHAR(8)", + "dest_name": "spbase", + "dest_type": "text", + "description": "Base Part" + }, + { + "source_name": "SPCOLR", + "source_type": "CHAR(3)", + "dest_name": "spcolr", + "dest_type": "text", + "description": "Color Code" + }, + { + "source_name": "SPMAJG", + "source_type": "CHAR(3)", + "dest_name": "spmajg", + "dest_type": "text", + "description": "Major Group" + }, + { + "source_name": "SPDISC", + "source_type": "CHAR(3)", + "dest_name": "spdisc", + "dest_type": "text", + "description": "Discount Code" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/surchargep.sql b/config/modules/surchargep.sql new file mode 100644 index 0000000..0fa91b1 --- /dev/null +++ b/config/modules/surchargep.sql @@ -0,0 +1,7 @@ +SELECT + RTRIM(SPCUST) AS spcust, + RTRIM(SPBASE) AS spbase, + RTRIM(SPCOLR) AS spcolr, + RTRIM(SPMAJG) AS spmajg, + RTRIM(SPDISC) AS spdisc +FROM "CMS.CUSLG".SURCHARGEP diff --git a/config/modules/surchgexc.json b/config/modules/surchgexc.json new file mode 100644 index 0000000..06028af --- /dev/null +++ b/config/modules/surchgexc.json @@ -0,0 +1,29 @@ +{ + "name": "surchgexc", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.surchgexc", + "staging_table": "pipekit_staging.surchgexc", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Surcharge Customer Exceptions", + "columns": [ + { + "source_name": "SXCUST", + "source_type": "CHAR(8)", + "dest_name": "sxcust", + "dest_type": "text", + "description": "Customer" + }, + { + "source_name": "SXDATE", + "source_type": "DATE", + "dest_name": "sxdate", + "dest_type": "date", + "description": "Exception Date" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/surchgexc.sql b/config/modules/surchgexc.sql new file mode 100644 index 0000000..1245d86 --- /dev/null +++ b/config/modules/surchgexc.sql @@ -0,0 +1,4 @@ +SELECT + RTRIM(SXCUST) AS sxcust, + CASE WHEN SXDATE IN (DATE('0001-01-01'), DATE('9999-12-31')) THEN NULL ELSE SXDATE END AS sxdate +FROM "CMS.CUSLG".SURCHGEXC diff --git a/config/modules/sy03300.json b/config/modules/sy03300.json new file mode 100644 index 0000000..9086da0 --- /dev/null +++ b/config/modules/sy03300.json @@ -0,0 +1,183 @@ +{ + "name": "sy03300", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.sy03300", + "staging_table": "pipekit_staging.sy03300", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "PYMTRMID", + "source_type": "CHAR(21)", + "dest_name": "pymtrmid", + "dest_type": "text", + "description": null + }, + { + "source_name": "DUETYPE", + "source_type": "SMALLINT", + "dest_name": "duetype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DUEDTDS", + "source_type": "SMALLINT", + "dest_name": "duedtds", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DISCTYPE", + "source_type": "SMALLINT", + "dest_name": "disctype", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DISCDTDS", + "source_type": "SMALLINT", + "dest_name": "discdtds", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DSCLCTYP", + "source_type": "SMALLINT", + "dest_name": "dsclctyp", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DSCDLRAM", + "source_type": "NUMERIC(19,5)", + "dest_name": "dscdlram", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "DSCPCTAM", + "source_type": "SMALLINT", + "dest_name": "dscpctam", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SALPURCH", + "source_type": "TINYINT", + "dest_name": "salpurch", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DISCNTCB", + "source_type": "TINYINT", + "dest_name": "discntcb", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "FREIGHT", + "source_type": "TINYINT", + "dest_name": "freight", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "MISC", + "source_type": "TINYINT", + "dest_name": "misc", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "TAX", + "source_type": "TINYINT", + "dest_name": "tax", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "NOTEINDX", + "source_type": "NUMERIC(19,5)", + "dest_name": "noteindx", + "dest_type": "numeric(19,5)", + "description": null + }, + { + "source_name": "CBUVATMD", + "source_type": "TINYINT", + "dest_name": "cbuvatmd", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "LSTUSRED", + "source_type": "CHAR(15)", + "dest_name": "lstusred", + "dest_type": "text", + "description": null + }, + { + "source_name": "MODIFDT", + "source_type": "DATETIME", + "dest_name": "modifdt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "CREATDDT", + "source_type": "DATETIME", + "dest_name": "creatddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "USEGRPER", + "source_type": "TINYINT", + "dest_name": "usegrper", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CalculateDateFrom", + "source_type": "SMALLINT", + "dest_name": "calculatedatefrom", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "CalculateDateFromDays", + "source_type": "SMALLINT", + "dest_name": "calculatedatefromdays", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DueMonth", + "source_type": "SMALLINT", + "dest_name": "duemonth", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DiscountMonth", + "source_type": "SMALLINT", + "dest_name": "discountmonth", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/sy03300.sql b/config/modules/sy03300.sql new file mode 100644 index 0000000..cebe5f4 --- /dev/null +++ b/config/modules/sy03300.sql @@ -0,0 +1,26 @@ +SELECT + RTRIM([PYMTRMID]) AS pymtrmid, + [DUETYPE] AS duetype, + [DUEDTDS] AS duedtds, + [DISCTYPE] AS disctype, + [DISCDTDS] AS discdtds, + [DSCLCTYP] AS dsclctyp, + [DSCDLRAM] AS dscdlram, + [DSCPCTAM] AS dscpctam, + [SALPURCH] AS salpurch, + [DISCNTCB] AS discntcb, + [FREIGHT] AS freight, + [MISC] AS misc, + [TAX] AS tax, + [NOTEINDX] AS noteindx, + [CBUVATMD] AS cbuvatmd, + RTRIM([LSTUSRED]) AS lstusred, + [MODIFDT] AS modifdt, + [CREATDDT] AS creatddt, + [USEGRPER] AS usegrper, + [CalculateDateFrom] AS calculatedatefrom, + [CalculateDateFromDays] AS calculatedatefromdays, + [DueMonth] AS duemonth, + [DiscountMonth] AS discountmonth, + [DEX_ROW_ID] AS dex_row_id +FROM [GPSERVER].[CHG].[dbo].[SY03300] diff --git a/config/modules/sy40100.json b/config/modules/sy40100.json new file mode 100644 index 0000000..121cd8d --- /dev/null +++ b/config/modules/sy40100.json @@ -0,0 +1,134 @@ +{ + "name": "sy40100", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gp.sy40100", + "staging_table": "pipekit_staging.sy40100", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "CLOSED", + "source_type": "TINYINT", + "dest_name": "closed", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "SERIES", + "source_type": "SMALLINT", + "dest_name": "series", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "ODESCTN", + "source_type": "CHAR(51)", + "dest_name": "odesctn", + "dest_type": "text", + "description": null + }, + { + "source_name": "FORIGIN", + "source_type": "TINYINT", + "dest_name": "forigin", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PERIODID", + "source_type": "SMALLINT", + "dest_name": "periodid", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PERIODDT", + "source_type": "DATETIME", + "dest_name": "perioddt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "PERNAME", + "source_type": "CHAR(21)", + "dest_name": "pername", + "dest_type": "text", + "description": null + }, + { + "source_name": "PSERIES_1", + "source_type": "TINYINT", + "dest_name": "pseries_1", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PSERIES_2", + "source_type": "TINYINT", + "dest_name": "pseries_2", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PSERIES_3", + "source_type": "TINYINT", + "dest_name": "pseries_3", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PSERIES_4", + "source_type": "TINYINT", + "dest_name": "pseries_4", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PSERIES_5", + "source_type": "TINYINT", + "dest_name": "pseries_5", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PSERIES_6", + "source_type": "TINYINT", + "dest_name": "pseries_6", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "YEAR1", + "source_type": "SMALLINT", + "dest_name": "year1", + "dest_type": "smallint", + "description": null + }, + { + "source_name": "PERDENDT", + "source_type": "DATETIME", + "dest_name": "perdendt", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_TS", + "source_type": "DATETIME", + "dest_name": "dex_row_ts", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "DEX_ROW_ID", + "source_type": "INT", + "dest_name": "dex_row_id", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/sy40100.sql b/config/modules/sy40100.sql new file mode 100644 index 0000000..a0d123f --- /dev/null +++ b/config/modules/sy40100.sql @@ -0,0 +1,19 @@ +SELECT + [CLOSED] AS [closed], + [SERIES] AS [series], + RTRIM([ODESCTN]) AS [odesctn], + [FORIGIN] AS [forigin], + [PERIODID] AS [periodid], + [PERIODDT] AS [perioddt], + RTRIM([PERNAME]) AS [pername], + [PSERIES_1] AS [pseries_1], + [PSERIES_2] AS [pseries_2], + [PSERIES_3] AS [pseries_3], + [PSERIES_4] AS [pseries_4], + [PSERIES_5] AS [pseries_5], + [PSERIES_6] AS [pseries_6], + [YEAR1] AS [year1], + [PERDENDT] AS [perdendt], + [DEX_ROW_TS] AS [dex_row_ts], + [DEX_ROW_ID] AS [dex_row_id] +FROM [GPSERVER].[CHG].[dbo].[SY40100] diff --git a/config/modules/tb_addbacks.json b/config/modules/tb_addbacks.json new file mode 100644 index 0000000..bcd0cf4 --- /dev/null +++ b/config/modules/tb_addbacks.json @@ -0,0 +1,99 @@ +{ + "name": "tb_addbacks", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gs.tb_addbacks", + "staging_table": "pipekit_staging.tb_addbacks", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "Combined trial balance union view facilitated through SQL Server", + "columns": [ + { + "source_name": "SSYR", + "source_type": "NUMERIC(10,0)", + "dest_name": "ssyr", + "dest_type": "numeric(10,0)", + "description": "Recast Season" + }, + { + "source_name": "SSPR", + "source_type": "NVARCHAR(4000)", + "dest_name": "sspr", + "dest_type": "text", + "description": "Recast Period" + }, + { + "source_name": "ORIGIN", + "source_type": "VARCHAR(3)", + "dest_name": "origin", + "dest_type": "text", + "description": "Origin System" + }, + { + "source_name": "SOURCE", + "source_type": "VARCHAR(9)", + "dest_name": "source", + "dest_type": "text", + "description": "Source Type" + }, + { + "source_name": "SEGMENT", + "source_type": "VARCHAR(4)", + "dest_name": "segment", + "dest_type": "text", + "description": "P&L Segment" + }, + { + "source_name": "OPEN_LOCAL", + "source_type": "NUMERIC(38,5)", + "dest_name": "open_local", + "dest_type": "numeric(38,5)", + "description": "Opening Balance" + }, + { + "source_name": "NET_LOCAL", + "source_type": "NUMERIC(38,5)", + "dest_name": "net_local", + "dest_type": "numeric(38,5)", + "description": "Net Change" + }, + { + "source_name": "END_LOCAL", + "source_type": "NUMERIC(38,5)", + "dest_name": "end_local", + "dest_type": "numeric(38,5)", + "description": "Ending Balance" + }, + { + "source_name": "FS", + "source_type": "VARCHAR(2)", + "dest_name": "fs", + "dest_type": "text", + "description": "Financial Statement" + }, + { + "source_name": "Level 4", + "source_type": "VARCHAR(60)", + "dest_name": "level4", + "dest_type": "text", + "description": "Level 4 Account Group" + }, + { + "source_name": "EBITDA", + "source_type": "NVARCHAR(255)", + "dest_name": "ebitda", + "dest_type": "text", + "description": "EBITDA Flag" + } + ], + "watermarks": [ + { + "name": "period", + "connection": "usmidsap02", + "resolver_sql": "SELECT MAX(sspr) FROM gs.tb_addbacks WHERE source = 'Actual'", + "default_value": "2022" + } + ], + "hooks": [] +} diff --git a/config/modules/tb_addbacks.sql b/config/modules/tb_addbacks.sql new file mode 100644 index 0000000..9d63812 --- /dev/null +++ b/config/modules/tb_addbacks.sql @@ -0,0 +1,14 @@ +SELECT + SSYR AS ssyr, + SSPR AS sspr, + ORIGIN AS origin, + SOURCE AS source, + SEGMENT AS segment, + OPEN_LOCAL AS open_local, + NET_LOCAL AS net_local, + END_LOCAL AS end_local, + FS AS fs, + [Level 4] AS level4, + EBITDA AS ebitda +FROM [FANALYSIS].[GS].[tb_addbacks] +WHERE sspr >= '{period}' diff --git a/config/modules/tbfc.json b/config/modules/tbfc.json new file mode 100644 index 0000000..d866013 --- /dev/null +++ b/config/modules/tbfc.json @@ -0,0 +1,85 @@ +{ + "name": "tbfc", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "gs.tbfc", + "staging_table": "pipekit_staging.tbfc", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "Date", + "source_type": "DATE", + "dest_name": "date", + "dest_type": "date", + "description": null + }, + { + "source_name": "Account GL", + "source_type": "VARCHAR(100)", + "dest_name": "account_gl", + "dest_type": "text", + "description": null + }, + { + "source_name": "Amount", + "source_type": "DECIMAL(18,2)", + "dest_name": "amount", + "dest_type": "numeric(18,2)", + "description": null + }, + { + "source_name": "FS Line", + "source_type": "VARCHAR(100)", + "dest_name": "fs_line", + "dest_type": "text", + "description": null + }, + { + "source_name": "EBITDA", + "source_type": "VARCHAR(100)", + "dest_name": "ebitda", + "dest_type": "text", + "description": null + }, + { + "source_name": "Entity", + "source_type": "VARCHAR(100)", + "dest_name": "entity", + "dest_type": "text", + "description": null + }, + { + "source_name": "FS", + "source_type": "VARCHAR(100)", + "dest_name": "fs", + "dest_type": "text", + "description": null + }, + { + "source_name": "Department Code", + "source_type": "VARCHAR(100)", + "dest_name": "department_code", + "dest_type": "text", + "description": null + }, + { + "source_name": "Source", + "source_type": "VARCHAR(100)", + "dest_name": "source", + "dest_type": "text", + "description": null + }, + { + "source_name": "Origin", + "source_type": "VARCHAR(100)", + "dest_name": "origin", + "dest_type": "text", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/tbfc.sql b/config/modules/tbfc.sql new file mode 100644 index 0000000..8ce2129 --- /dev/null +++ b/config/modules/tbfc.sql @@ -0,0 +1,12 @@ +SELECT + [Date] AS [date], + RTRIM([Account GL]) AS [account_gl], + [Amount] AS [amount], + RTRIM([FS Line]) AS [fs_line], + RTRIM([EBITDA]) AS [ebitda], + RTRIM([Entity]) AS [entity], + RTRIM([FS]) AS [fs], + RTRIM([Department Code]) AS [department_code], + RTRIM([Source]) AS [source], + RTRIM([Origin]) AS [origin] +FROM [FANALYSIS].[GS].[TBFC] diff --git a/config/modules/terms.json b/config/modules/terms.json new file mode 100644 index 0000000..b0c018a --- /dev/null +++ b/config/modules/terms.json @@ -0,0 +1,64 @@ +{ + "name": "terms", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.terms", + "staging_table": "pipekit_staging.terms", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "inferred terms table from lgdat.code", + "columns": [ + { + "source_name": "TERM", + "source_type": "", + "dest_name": "term", + "dest_type": "text", + "description": null + }, + { + "source_name": "DESCR", + "source_type": "", + "dest_name": "descr", + "dest_type": "text", + "description": null + }, + { + "source_name": "DISC_PCT", + "source_type": "", + "dest_name": "disc_pct", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "DISC_DAYS", + "source_type": "", + "dest_name": "disc_days", + "dest_type": "int", + "description": null + }, + { + "source_name": "PAY_DAYS", + "source_type": "", + "dest_name": "pay_days", + "dest_type": "int", + "description": null + }, + { + "source_name": "PAY_PERC", + "source_type": "", + "dest_name": "pay_perc", + "dest_type": "numeric", + "description": null + }, + { + "source_name": "PAY_DATE", + "source_type": "", + "dest_name": "pay_date", + "dest_type": "date", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/terms.sql b/config/modules/terms.sql new file mode 100644 index 0000000..cf815b0 --- /dev/null +++ b/config/modules/terms.sql @@ -0,0 +1,30 @@ +--source-side extract for cms.terms (pipekit CMS module) +--CMS terms live in the generic CODE table (A2 = 'NN'); the structured attributes are +--packed into the fixed-width CHAR column A215 at fixed byte offsets. Parse them HERE on +--DB2 where A215 is intact -- do NOT sync raw A215 and parse in Postgres: the transfer +--strips leading spaces on discount-bearing rows, which shifts every offset. +--offsets verified against the working query in sql/db2/CMS/AR/terms/Terms Codes.sql +--REPLACE(...,' ','0') guards each numeric field: unpopulated term types leave those +--positions blank, and a bare INT()/FLOAT() over a space would fail the whole extract. +SELECT + LTRIM(RTRIM(A9)) AS term + ,LTRIM(RTRIM(A30)) AS descr + --discount % offered (e.g. 1.00 = 1%); A215 pos 102-105, scaled by 10000 + ,ROUND(FLOAT(REPLACE(SUBSTR(A215,102,4),' ','0')) / FLOAT(10000),2) AS disc_pct + --days within which the discount may be taken; A215 pos 84-86 + ,INT(REPLACE(SUBSTR(A215,84,3),' ','0')) AS disc_days + --net pay days; A215 pos 64-66 + ,INT(REPLACE(SUBSTR(A215,64,3),' ','0')) AS pay_days + --pay percent (rarely used split-term %); A215 pos 10-12 + ,FLOAT(REPLACE(SUBSTR(A215,10,3),' ','0')) AS pay_perc + --fixed pay date (seasonal/dated terms): A215 pos 28-33 packed MMDDYY -> YYYY-MM-DD + --emitted as ISO text (null when the date field is zero) so a malformed packed value + --cannot fail the extract; cast to date in Postgres on read + ,CASE + WHEN INT(REPLACE(SUBSTR(A215,28,6),' ','0')) = 0 THEN CAST(NULL AS CHAR(10)) + ELSE '20' || SUBSTR(A215,32,2) || '-' || SUBSTR(A215,28,2) || '-' || SUBSTR(A215,30,2) + END AS pay_date +FROM + LGDAT.CODE +WHERE + A2 = 'NN' diff --git a/config/modules/uqf.json b/config/modules/uqf.json new file mode 100644 index 0000000..5dbfe69 --- /dev/null +++ b/config/modules/uqf.json @@ -0,0 +1,43 @@ +{ + "name": "uqf", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.uqf", + "staging_table": "pipekit_staging.uqf", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "UQF", + "columns": [ + { + "source_name": "UQCODE", + "source_type": "CHAR(5)", + "dest_name": "uqcode", + "dest_type": "text", + "description": "CODE" + }, + { + "source_name": "UQDESC", + "source_type": "CHAR(50)", + "dest_name": "uqdesc", + "dest_type": "text", + "description": "DESCRIPTION" + }, + { + "source_name": "UQKIT", + "source_type": "CHAR(2)", + "dest_name": "uqkit", + "dest_type": "text", + "description": "KIT" + }, + { + "source_name": "UQATTR", + "source_type": "CHAR(4)", + "dest_name": "uqattr", + "dest_type": "text", + "description": "ATTR" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/uqf.sql b/config/modules/uqf.sql new file mode 100644 index 0000000..43a3ca0 --- /dev/null +++ b/config/modules/uqf.sql @@ -0,0 +1,6 @@ +SELECT + RTRIM(UQCODE) AS uqcode, + RTRIM(UQDESC) AS uqdesc, + RTRIM(UQKIT) AS uqkit, + RTRIM(UQATTR) AS uqattr +FROM "CMS.CUSLG".UQF diff --git a/config/modules/userdetail.json b/config/modules/userdetail.json new file mode 100644 index 0000000..71449d7 --- /dev/null +++ b/config/modules/userdetail.json @@ -0,0 +1,162 @@ +{ + "name": "userdetail", + "source_connection": "sqlserver", + "dest_connection": "usmidsap02", + "dest_table": "pricequote.userdetail", + "staging_table": "pipekit_staging.userdetail", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": null, + "columns": [ + { + "source_name": "UserDetailId", + "source_type": "INT", + "dest_name": "userdetailid", + "dest_type": "integer", + "description": null + }, + { + "source_name": "UserName", + "source_type": "VARCHAR(128)", + "dest_name": "username", + "dest_type": "text", + "description": null + }, + { + "source_name": "Class", + "source_type": "VARCHAR(50)", + "dest_name": "class", + "dest_type": "text", + "description": null + }, + { + "source_name": "CmsUserId", + "source_type": "VARCHAR(5)", + "dest_name": "cmsuserid", + "dest_type": "text", + "description": null + }, + { + "source_name": "MApprovalRuleLevel1", + "source_type": "DECIMAL(18,9)", + "dest_name": "mapprovalrulelevel1", + "dest_type": "numeric(18,9)", + "description": null + }, + { + "source_name": "Level1ApprovalManager", + "source_type": "VARCHAR(128)", + "dest_name": "level1approvalmanager", + "dest_type": "text", + "description": null + }, + { + "source_name": "Level2ApprovalManager", + "source_type": "VARCHAR(128)", + "dest_name": "level2approvalmanager", + "dest_type": "text", + "description": null + }, + { + "source_name": "EmailAddress", + "source_type": "VARCHAR(128)", + "dest_name": "emailaddress", + "dest_type": "text", + "description": null + }, + { + "source_name": "CreatedBy", + "source_type": "VARCHAR(128)", + "dest_name": "createdby", + "dest_type": "text", + "description": null + }, + { + "source_name": "CreatedOn", + "source_type": "DATETIME", + "dest_name": "createdon", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "ModifiedBy", + "source_type": "VARCHAR(128)", + "dest_name": "modifiedby", + "dest_type": "text", + "description": null + }, + { + "source_name": "ModifiedOn", + "source_type": "DATETIME", + "dest_name": "modifiedon", + "dest_type": "timestamp", + "description": null + }, + { + "source_name": "Level1DelegateTo", + "source_type": "VARCHAR(128)", + "dest_name": "level1delegateto", + "dest_type": "text", + "description": null + }, + { + "source_name": "Level2DelegateTo", + "source_type": "VARCHAR(128)", + "dest_name": "level2delegateto", + "dest_type": "text", + "description": null + }, + { + "source_name": "MApprovalRuleLevel2", + "source_type": "DECIMAL(18,9)", + "dest_name": "mapprovalrulelevel2", + "dest_type": "numeric(18,9)", + "description": null + }, + { + "source_name": "MApprovalRuleLevel3", + "source_type": "DECIMAL(18,9)", + "dest_name": "mapprovalrulelevel3", + "dest_type": "numeric(18,9)", + "description": null + }, + { + "source_name": "Level3ApprovalManager", + "source_type": "VARCHAR(128)", + "dest_name": "level3approvalmanager", + "dest_type": "text", + "description": null + }, + { + "source_name": "Level3DelegateTo", + "source_type": "VARCHAR(128)", + "dest_name": "level3delegateto", + "dest_type": "text", + "description": null + }, + { + "source_name": "Director", + "source_type": "VARCHAR(128)", + "dest_name": "director", + "dest_type": "text", + "description": null + }, + { + "source_name": "QuoteManager", + "source_type": "VARCHAR(128)", + "dest_name": "quotemanager", + "dest_type": "text", + "description": null + }, + { + "source_name": "UserLevel", + "source_type": "INT", + "dest_name": "userlevel", + "dest_type": "integer", + "description": null + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/userdetail.sql b/config/modules/userdetail.sql new file mode 100644 index 0000000..d0d2334 --- /dev/null +++ b/config/modules/userdetail.sql @@ -0,0 +1,23 @@ +SELECT + [UserDetailId] AS userdetailid, + RTRIM([UserName]) AS username, + RTRIM([Class]) AS class, + RTRIM([CmsUserId]) AS cmsuserid, + [MApprovalRuleLevel1] AS mapprovalrulelevel1, + RTRIM([Level1ApprovalManager]) AS level1approvalmanager, + RTRIM([Level2ApprovalManager]) AS level2approvalmanager, + RTRIM([EmailAddress]) AS emailaddress, + RTRIM([CreatedBy]) AS createdby, + [CreatedOn] AS createdon, + RTRIM([ModifiedBy]) AS modifiedby, + [ModifiedOn] AS modifiedon, + RTRIM([Level1DelegateTo]) AS level1delegateto, + RTRIM([Level2DelegateTo]) AS level2delegateto, + [MApprovalRuleLevel2] AS mapprovalrulelevel2, + [MApprovalRuleLevel3] AS mapprovalrulelevel3, + RTRIM([Level3ApprovalManager]) AS level3approvalmanager, + RTRIM([Level3DelegateTo]) AS level3delegateto, + RTRIM([Director]) AS director, + RTRIM([QuoteManager]) AS quotemanager, + [UserLevel] AS userlevel +FROM [PriceQuote].[dbo].[UserDetail] diff --git a/config/modules/usrc.json b/config/modules/usrc.json new file mode 100644 index 0000000..748035b --- /dev/null +++ b/config/modules/usrc.json @@ -0,0 +1,57 @@ +{ + "name": "usrc", + "source_connection": "S78030956", + "dest_connection": "usmidsap02", + "dest_table": "cms.usrc", + "staging_table": "pipekit_staging.usrc", + "merge_strategy": "full", + "merge_key": null, + "enabled": 1, + "dest_description": "User Defined Data Records", + "columns": [ + { + "source_name": "MFSRCE", + "source_type": "CHAR(3)", + "dest_name": "mfsrce", + "dest_type": "text", + "description": "Source" + }, + { + "source_name": "MFKEY1", + "source_type": "CHAR(20)", + "dest_name": "mfkey1", + "dest_type": "text", + "description": "Key Field1" + }, + { + "source_name": "MFKEY2", + "source_type": "CHAR(20)", + "dest_name": "mfkey2", + "dest_type": "text", + "description": "Key Field2" + }, + { + "source_name": "MFENT#", + "source_type": "NUMERIC(3,0)", + "dest_name": "mfent#", + "dest_type": "numeric(3,0)", + "description": "Entry #" + }, + { + "source_name": "MFRESP", + "source_type": "CHAR(20)", + "dest_name": "mfresp", + "dest_type": "text", + "description": "Alpha Value" + }, + { + "source_name": "MFNUMB", + "source_type": "NUMERIC(15,5)", + "dest_name": "mfnumb", + "dest_type": "numeric(15,5)", + "description": "Numeric Value" + } + ], + "watermarks": [], + "hooks": [] +} diff --git a/config/modules/usrc.sql b/config/modules/usrc.sql new file mode 100644 index 0000000..c792bbe --- /dev/null +++ b/config/modules/usrc.sql @@ -0,0 +1,8 @@ +SELECT + RTRIM(MFSRCE) AS mfsrce, + RTRIM(MFKEY1) AS mfkey1, + RTRIM(MFKEY2) AS mfkey2, + "MFENT#" AS "mfent#", + RTRIM(MFRESP) AS mfresp, + MFNUMB AS mfnumb +FROM LGDAT.USRC diff --git a/pipekit/cli.py b/pipekit/cli.py index b7ec900..d82fa95 100644 --- a/pipekit/cli.py +++ b/pipekit/cli.py @@ -5,8 +5,10 @@ from __future__ import annotations import argparse import sys +from pathlib import Path + from . import __version__ -from . import db, drivers, engine, jrunner, repo +from . import config_io, db, drivers, engine, jrunner, repo from .config import get_config @@ -277,6 +279,34 @@ def _report(checks) -> int: return 0 +def cmd_export(args) -> int: + dest = Path(args.dir) if args.dir else config_io.default_dir() + summary = config_io.export_config(dest) + print(f"exported to {summary['dir']}: " + f"{summary['drivers']} drivers, {summary['connections']} connections, " + f"{summary['modules']} modules, {summary['groups']} groups") + return 0 + + +def cmd_apply(args) -> int: + src = Path(args.dir) if args.dir else config_io.default_dir() + try: + actions = config_io.apply_config(src, dry_run=args.dry_run, prune=args.prune) + except config_io.ApplyError as e: + print(f"apply failed: {e}", file=sys.stderr) + return 1 + if not actions: + print("nothing to do — database matches config") + return 0 + header = "planned changes (dry-run):" if args.dry_run else "applied changes:" + print(header) + for a in actions: + print(f" {a}") + print(f"{len(actions)} change(s)" + + (" — re-run without --dry-run to apply" if args.dry_run else "")) + return 0 + + def main(argv: list[str] | None = None) -> int: p = argparse.ArgumentParser(prog="pipekit") p.add_argument("--version", action="version", version=f"pipekit {__version__}") @@ -317,6 +347,20 @@ def main(argv: list[str] | None = None) -> int: help="build SQL but do not invoke jrunner") p_run.set_defaults(func=cmd_run) + p_exp = sub.add_parser( + "export", help="dump config (drivers/connections/modules/groups) to text files") + p_exp.add_argument("--dir", help="target dir (default /config)") + p_exp.set_defaults(func=cmd_export) + + p_app = sub.add_parser( + "apply", help="rehydrate config from text files (create/update by name)") + p_app.add_argument("--dir", help="source dir (default /config)") + p_app.add_argument("--dry-run", action="store_true", + help="print the change plan without touching the database") + p_app.add_argument("--prune", action="store_true", + help="also delete modules/groups present in the db but not in files") + p_app.set_defaults(func=cmd_apply) + p_serve = sub.add_parser("serve", help="start the HTTP API") p_serve.add_argument("--host", default=None, help="defaults to config.yaml api_host (127.0.0.1)") diff --git a/pipekit/config_io.py b/pipekit/config_io.py new file mode 100644 index 0000000..5e61977 --- /dev/null +++ b/pipekit/config_io.py @@ -0,0 +1,338 @@ +"""Export / apply the pipekit *configuration* as version-controllable text. + +The SQLite database is runtime state; the pipeline *definitions* it holds +(drivers, connections, modules, watermarks, hooks, groups, schedules) are +config and belong in git. This module serialises those definitions to a tree +of text files and rehydrates them, so changes get diff / review / rollback. + +Layout (under the config dir, default ``/config``):: + + drivers.json # driver registry + connections.json # connections (passwords are $ENV refs, not secrets) + groups.json # groups + members + schedules + modules/.json # one module's definition (+ watermarks, hooks) + modules/.sql # that module's source_query (sidecar, clean diffs) + +Everything is keyed by natural name (not autoincrement id) so files stay +portable across databases. Run-history tables (run_log, group_run, settings) +and per-run state columns (running, next_resolved_query, timestamps) are +deliberately excluded. +""" +from __future__ import annotations + +import json +from pathlib import Path + +from . import repo + + +def default_dir() -> Path: + return Path(__file__).resolve().parent.parent / "config" + + +def _write_json(path: Path, obj) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(json.dumps(obj, indent=2, ensure_ascii=False) + "\n") + + +def _read_json(path: Path): + return json.loads(path.read_text()) + + +def _norm_sql(s: str | None) -> str: + """Canonical form for comparing SQL: LF newlines, no trailing blank lines. + Line-ending style (CRLF vs LF) isn't meaningful and must not read as a diff.""" + return (s or "").replace("\r\n", "\n").replace("\r", "\n").rstrip("\n") + + +# --------------------------------------------------------------------------- +# Export +# --------------------------------------------------------------------------- + +def export_config(dest: Path) -> dict: + """Write the full config tree under ``dest``. Returns a summary count.""" + dest = Path(dest) + conn_by_id = {c["id"]: c["name"] for c in repo.list_connections()} + drv_by_id = {d["id"]: d["name"] for d in repo.list_drivers()} + + # drivers + drivers = [ + {"name": d["name"], "kind": d["kind"], "jar_file": d["jar_file"], + "class_name": d["class_name"], "url_template": d["url_template"]} + for d in repo.list_drivers() + ] + _write_json(dest / "drivers.json", drivers) + + # connections (name-keyed refs; password is an env-var reference) + connections = [ + {"name": c["name"], "driver": drv_by_id.get(c["driver_id"]), + "jdbc_url": c["jdbc_url"], "username": c["username"], + "password": c["password"], + "default_dest_connection": conn_by_id.get(c["default_dest_connection_id"]), + "default_dest_schema": c["default_dest_schema"], "notes": c["notes"]} + for c in repo.list_connections() + ] + _write_json(dest / "connections.json", connections) + + # modules — one file per module, SQL split into a sidecar + mod_dir = dest / "modules" + mod_dir.mkdir(parents=True, exist_ok=True) + kept = set() + for m in repo.list_modules(): + full = repo.get_module(m["id"]) + cols = json.loads(full["columns_json"] or "[]") + wms = [ + {"name": w["name"], "connection": conn_by_id.get(w["connection_id"]), + "resolver_sql": w["resolver_sql"], "default_value": w["default_value"]} + for w in repo.list_watermarks(full["id"]) + ] + hooks = [ + {"run_order": h["run_order"], + "connection": conn_by_id.get(h["connection_id"]), + "sql": h["sql"], "run_on": h["run_on"]} + for h in repo.list_hooks(full["id"]) + ] + record = { + "name": full["name"], + "source_connection": conn_by_id.get(full["source_connection_id"]), + "dest_connection": conn_by_id.get(full["dest_connection_id"]), + "dest_table": full["dest_table"], + "staging_table": full["staging_table"], + "merge_strategy": full["merge_strategy"], + "merge_key": full["merge_key"], + "enabled": full["enabled"], + "dest_description": full["dest_description"], + "columns": cols, # real array -> per-column line diffs + "watermarks": wms, + "hooks": hooks, + } + _write_json(mod_dir / f"{full['name']}.json", record) + (mod_dir / f"{full['name']}.sql").write_text( + _norm_sql(full["source_query"]) + "\n") + kept.add(full["name"]) + + # prune stale module files no longer in the DB + for f in mod_dir.glob("*.json"): + if f.stem not in kept: + f.unlink() + f.with_suffix(".sql").unlink(missing_ok=True) + + # groups (+ members + schedules) + groups = [] + for g in repo.list_groups(): + members = [ + {"module": mm["module_name"], "run_order": mm["run_order"]} + for mm in repo.list_group_members(g["id"]) + ] + scheds = [ + {"cron_expr": s["cron_expr"], "enabled": s["enabled"]} + for s in repo.list_schedules_for_group(g["id"]) + ] + groups.append({"name": g["name"], "members": members, "schedules": scheds}) + _write_json(dest / "groups.json", groups) + + return {"drivers": len(drivers), "connections": len(connections), + "modules": len(kept), "groups": len(groups), "dir": str(dest)} + + +# --------------------------------------------------------------------------- +# Apply +# --------------------------------------------------------------------------- + +class ApplyError(RuntimeError): + pass + + +def _plan(actions: list, verb: str, kind: str, name: str) -> None: + actions.append(f"{verb:7} {kind:11} {name}") + + +def apply_config(src: Path, *, dry_run: bool = False, prune: bool = False) -> list[str]: + """Rehydrate the DB from the config tree under ``src``. + + Create/update by name; child collections (watermarks, hooks, schedules, + group members) are fully synced to match the files. Top-level rows present + in the DB but absent from the files are only removed with ``prune=True``. + Returns the list of planned/performed actions. + """ + src = Path(src) + if not (src / "connections.json").exists(): + raise ApplyError(f"no config found at {src} (expected connections.json)") + actions: list[str] = [] + + # --- drivers --- + for d in _read_json(src / "drivers.json"): + cur = repo.get_driver_by_name(d["name"]) + if cur is None: + _plan(actions, "create", "driver", d["name"]) + if not dry_run: + repo.create_driver(name=d["name"], kind=d["kind"], + jar_file=d["jar_file"], class_name=d["class_name"], + url_template=d.get("url_template")) + else: + changed = any(cur.get(k) != d.get(k) for k in + ("jar_file", "class_name", "url_template")) + if changed: + _plan(actions, "update", "driver", d["name"]) + if not dry_run: + repo.update_driver(cur["id"], jar_file=d["jar_file"], + class_name=d["class_name"], + url_template=d.get("url_template")) + + # --- connections (two passes: create/update, then wire default-dest) --- + conns = _read_json(src / "connections.json") + for c in conns: + drv = repo.get_driver_by_name(c["driver"]) + if drv is None: + raise ApplyError(f"connection {c['name']}: unknown driver {c['driver']!r}") + cur = repo.get_connection_by_name(c["name"]) + fields = dict(driver_id=drv["id"], jdbc_url=c["jdbc_url"], + username=c.get("username"), password=c.get("password"), + default_dest_schema=c.get("default_dest_schema"), + notes=c.get("notes")) + if cur is None: + _plan(actions, "create", "connection", c["name"]) + if not dry_run: + repo.create_connection(name=c["name"], **fields) + else: + watch = ("jdbc_url", "username", "password", "default_dest_schema", "notes") + if drv["id"] != cur["driver_id"] or any(cur.get(k) != c.get(k) for k in watch): + _plan(actions, "update", "connection", c["name"]) + if not dry_run: + repo.update_connection(cur["id"], **fields) + # pass 2: default_dest_connection_id (now every connection exists) + if not dry_run: + for c in conns: + dd = c.get("default_dest_connection") + if not dd: + continue + me = repo.get_connection_by_name(c["name"]) + target = repo.get_connection_by_name(dd) + if me and target and me.get("default_dest_connection_id") != target["id"]: + repo.update_connection(me["id"], default_dest_connection_id=target["id"]) + + # --- modules --- + mod_dir = src / "modules" + file_modules = set() + for jf in sorted(mod_dir.glob("*.json")): + rec = _read_json(jf) + name = rec["name"] + file_modules.add(name) + sqlf = jf.with_suffix(".sql") + source_query = _norm_sql(sqlf.read_text()) if sqlf.exists() else "" + sconn = repo.get_connection_by_name(rec["source_connection"]) + dconn = repo.get_connection_by_name(rec["dest_connection"]) + if not sconn or not dconn: + raise ApplyError(f"module {name}: unknown connection " + f"(source={rec['source_connection']} dest={rec['dest_connection']})") + cur = repo.get_module_by_name(name) + cols = rec.get("columns") or [] + if cur is None: + _plan(actions, "create", "module", name) + if not dry_run: + mod = repo.create_module( + name=name, source_connection_id=sconn["id"], + dest_connection_id=dconn["id"], dest_table=rec["dest_table"], + source_query=source_query, merge_strategy=rec["merge_strategy"], + merge_key=rec.get("merge_key"), + staging_table=rec.get("staging_table"), + columns=cols or None, dest_description=rec.get("dest_description")) + mid = mod["id"] + else: + mid = None + else: + mid = cur["id"] + cur_cols = json.loads(cur["columns_json"] or "[]") + watch = ("dest_table", "staging_table", "merge_strategy", "merge_key", + "dest_description", "enabled") + meta_changed = (sconn["id"] != cur["source_connection_id"] + or dconn["id"] != cur["dest_connection_id"] + or source_query != _norm_sql(cur["source_query"]) + or any(cur.get(k) != rec.get(k) for k in watch)) + cols_changed = cols != cur_cols + if meta_changed or cols_changed: + _plan(actions, "update", "module", name + + ("" if meta_changed else " (columns)")) + if not dry_run: + repo.update_module( + mid, source_connection_id=sconn["id"], + dest_connection_id=dconn["id"], dest_table=rec["dest_table"], + staging_table=rec.get("staging_table"), + source_query=source_query, merge_strategy=rec["merge_strategy"], + merge_key=rec.get("merge_key"), + dest_description=rec.get("dest_description"), + enabled=rec.get("enabled")) + if cols_changed: + repo.update_module_columns(mid, cols) + + # child collections: watermarks (keyed by name) + hooks (rebuilt) + if not dry_run and mid is not None: + want_wms = {w["name"]: w for w in rec.get("watermarks", [])} + have_wms = {w["name"]: w for w in repo.list_watermarks(mid)} + for wname, w in want_wms.items(): + wc = repo.get_connection_by_name(w["connection"]) if w.get("connection") else None + cid = wc["id"] if wc else None + if wname in have_wms: + repo.update_watermark(have_wms[wname]["id"], connection_id=cid, + resolver_sql=w["resolver_sql"], + default_value=w.get("default_value")) + else: + repo.create_watermark(module_id=mid, name=wname, connection_id=cid, + resolver_sql=w["resolver_sql"], + default_value=w.get("default_value")) + for wname, w in have_wms.items(): + if wname not in want_wms: + repo.delete_watermark(w["id"]) + # hooks have no natural key -> rebuild from file + for h in repo.list_hooks(mid): + repo.delete_hook(h["id"]) + for h in rec.get("hooks", []): + hc = repo.get_connection_by_name(h["connection"]) if h.get("connection") else None + repo.create_hook(module_id=mid, sql=h["sql"], + run_order=h.get("run_order", 0), + connection_id=hc["id"] if hc else None, + run_on=h.get("run_on", "success")) + + # prune modules absent from files + for m in repo.list_modules(): + if m["name"] not in file_modules: + if prune: + _plan(actions, "delete", "module", m["name"]) + if not dry_run: + repo.delete_module(m["id"]) + else: + _plan(actions, "skip", "module", m["name"] + " (in db, not in files)") + + # --- groups (+ members + schedules) --- + file_groups = set() + for g in _read_json(src / "groups.json"): + file_groups.add(g["name"]) + cur = repo.get_group_by_name(g["name"]) + if cur is None: + _plan(actions, "create", "group", g["name"]) + if not dry_run: + cur = repo.create_group(name=g["name"]) + if not dry_run and cur is not None: + members = [] + for mm in g.get("members", []): + mod = repo.get_module_by_name(mm["module"]) + if mod: + members.append({"module_id": mod["id"], + "run_order": mm.get("run_order", 0)}) + repo.set_group_members(cur["id"], members) + for s in repo.list_schedules_for_group(cur["id"]): + repo.delete_schedule(s["id"]) + for s in g.get("schedules", []): + repo.create_schedule(group_id=cur["id"], cron_expr=s["cron_expr"], + enabled=s.get("enabled", 1)) + + for g in repo.list_groups(): + if g["name"] not in file_groups: + if prune: + _plan(actions, "delete", "group", g["name"]) + if not dry_run: + repo.delete_group(g["id"]) + else: + _plan(actions, "skip", "group", g["name"] + " (in db, not in files)") + + return actions