From 4a62ca84b1949fd76f84d3d0c846a645c4b0b794 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 27 Oct 2017 13:06:44 -0400 Subject: [PATCH 01/14] implement sequence of target, and insure that the link to the map does not return duplicates --- do_map_g_option.pgsql | 18 ++++++++++++------ readme.md | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/do_map_g_option.pgsql b/do_map_g_option.pgsql index 31ddc3b..7ecc0ed 100644 --- a/do_map_g_option.pgsql +++ b/do_map_g_option.pgsql @@ -9,6 +9,7 @@ SELECT t.id, t.rec, m.target, + m.seq, regex->>'map' map_intention, regex->>'function' regex_function, e.v ->> 'field' result_key_name, @@ -75,9 +76,9 @@ FROM m.regex->>'function' = 'extract' LEFT JOIN LATERAL regexp_replace(t.rec #>> ((e.v ->> 'key')::text[]), e.v ->> 'regex'::text, e.v ->> 'replace'::text,e.v ->> 'flag') WITH ORDINALITY rp(rp, rn) ON m.regex->>'function' = 'replace' -WHERE +--WHERE --t.srce = 'PNCC' - rec @> '{"Transaction":"ACH Credits","Transaction":"ACH Debits"}' + --rec @> '{"Transaction":"ACH Credits","Transaction":"ACH Debits"}' --rec @> '{"Description":"CHECK 93013270 086129935"}'::jsonb ORDER BY t.id DESC, @@ -93,6 +94,7 @@ SELECT srce ,id ,target + ,seq ,map_intention ,regex_function ,target_item_number @@ -132,6 +134,7 @@ GROUP BY srce ,id ,target + ,seq ,map_intention ,regex_function ,target_item_number @@ -148,6 +151,7 @@ SELECT srce ,id ,target + ,seq ,map_intention ,tps.jsonb_concat_obj(COALESCE(map_val,'{}'::JSONB)) map_val ,jsonb_strip_nulls(tps.jsonb_concat_obj(COALESCE(retain_val,'{}'::JSONB))) retain_val @@ -157,6 +161,7 @@ GROUP BY srce ,id ,target + ,seq ,map_intention ORDER BY id @@ -171,6 +176,7 @@ SELECT a.srce ,a.id ,a.target + ,a.seq ,a.map_intention ,a.map_val ,a.retain_val retain_value @@ -189,7 +195,7 @@ FROM SELECT srce ,id - ,tps.jsonb_concat_obj(COALESCE(retain_value,'{}'::jsonb)) retain_val + ,tps.jsonb_concat_obj(COALESCE(retain_value,'{}'::jsonb) ORDER BY seq DESC) retain_val ,tps.jsonb_concat_obj(COALESCE(map,'{}'::jsonb)) map FROM link_map @@ -198,9 +204,10 @@ GROUP BY ,id ) -SELECT srce, id, jsonb_pretty(retain_val), jsonb_pretty(map) FROM agg_to_id +--SELECT agg_to_id.srce, agg_to_id.id, jsonb_pretty(agg_to_id.retain_val) , jsonb_pretty(agg_to_id.map) FROM agg_to_id ORDER BY id desc LIMIT 100 + + -/* UPDATE tps.trans t SET @@ -211,4 +218,3 @@ FROM agg_to_id o WHERE o.id = t.id; -*/ \ No newline at end of file diff --git a/readme.md b/readme.md index b2acb67..e7c2ac0 100644 --- a/readme.md +++ b/readme.md @@ -17,8 +17,8 @@ applied mappings are in associated jsonb documents 1. regular expressions are used to extract pieces of the json objects 2. the results of the regular expressions are bumped up against a list of basic mappings and written to an associated jsonb document -a target represents a whole scenario that needs matched. it can contain several regex expressions. if one fails, then no match is attempted because it coudl result in a false positive based on the @> oeprator used at join time -`this probably isn't correctly implemented` +each regex expression within a targeted pattern can be set to map or not. then the mapping items should be joined to map_rv with an `=` as opposed to `@>` to avoid duplication of rows + ## Transformation tools * `COPY` From 30da16dd0a2ee013fff4ca7825ffb47f262b5eda Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 27 Oct 2017 13:07:52 -0400 Subject: [PATCH 02/14] add map definition query --- list_maps.pgsql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 list_maps.pgsql diff --git a/list_maps.pgsql b/list_maps.pgsql new file mode 100644 index 0000000..fdc618f --- /dev/null +++ b/list_maps.pgsql @@ -0,0 +1,19 @@ +SELECT + m.srce, + m.target, + regex->>'map' map_intention, + regex->>'function' regex_function, + regex->>'where' where_clause, + e.v ->> 'field' result_key_name, + e.v ->> 'key' target_json_path, + e.v ->> 'flag' regex_options_flag, + e.v->>'retain' retain_result, + e.v->>'regex' regex_expression, + e.rn target_item_number +FROM + tps.map_rm m + LEFT JOIN LATERAL jsonb_array_elements(m.regex->'defn') WITH ORDINALITY e(v, rn) ON true +ORDER BY + m.srce, + m.target, + e.rn \ No newline at end of file From 2829887a5712126672e41d2d478332942b0fe119 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 27 Oct 2017 13:08:03 -0400 Subject: [PATCH 03/14] get rid of bad maps --- map_rm_template.pgsql | 240 +++++++++++++++++++++--------------------- 1 file changed, 120 insertions(+), 120 deletions(-) diff --git a/map_rm_template.pgsql b/map_rm_template.pgsql index 34dae15..b40e35e 100644 --- a/map_rm_template.pgsql +++ b/map_rm_template.pgsql @@ -30,127 +30,8 @@ FROM $j$::jsonb , 1) ) x; - -DELETE FROM tps.map_rm where target = 'Parse Descr'; -INSERT INTO -tps.map_rm -SELECT * -FROM -(VALUES - ('PNCC', 'Parse Descr', - $j$ - { - "name":"Parse Descr", - "description":"parse the description based on at least three capital letters followed by a comma until another set of at lesat 3 capital letters and a comma is encountered", - "defn": [ - { - "key": "{Description}", - "field": "dparse", - "regex": "([A-Z]{3,}?:)(.*)(?=[A-Z]{3,}?:|$)", - "flag":"g", - "retain":"y" - } - ], - "function":"extract", - "map":"no", - "where": [ - { - } - ] - } - $j$::jsonb - , 2) -) x; - - -DELETE FROM tps.map_rm where target = 'Extract OBI'; -INSERT INTO -tps.map_rm -SELECT * -FROM -(VALUES - ('PNCC', 'Extract OBI', - $j$ - { - "name":"Extract OBI", - "description":"pull out whatever follows OBI in the description until atleast 3 capital letters followed by a colon are encountered", - "defn": [ - { - "key": "{Description}", - "field": "obi", - "regex": "OBI:(.*?)(?=[A-Z]{3,}?:|$)", - "flag":"", - "retain":"y" - } - ], - "function":"extract", - "map":"no", - "where": [ - { - "Transaction":"Money Transfer DB - Wire" - }, - { - "Transaction":"Money Transfer CR-Other" - }, - { - "Transaction":"Intl Money Transfer Debits" - }, - { - "Transaction":"Money Transfer DB - Other" - }, - { - "Transaction":"Money Transfer CR-Wire" - } - ] - } - $j$::jsonb - , 2) -) x; - -DELETE FROM tps.map_rm where target = 'Extract RFB'; -INSERT INTO -tps.map_rm -SELECT * -FROM -(VALUES - ('PNCC', 'Extract RFB', - $j$ - { - "name":"Extract RFB", - "description":"pull out whatever follows RFB in the description until atleast 3 capital letters followed by a colon are encountered", - "defn": [ - { - "key": "{Description}", - "field": "rfb", - "regex": "RFB:(.*?)(?=[A-Z]{3,}?:|$)", - "flag":"", - "retain":"y" - } - ], - "function":"extract", - "map":"no", - "where": [ - { - "Transaction":"Money Transfer DB - Wire" - }, - { - "Transaction":"Money Transfer CR-Other" - }, - { - "Transaction":"Intl Money Transfer Debits" - }, - { - "Transaction":"Money Transfer DB - Other" - }, - { - "Transaction":"Money Transfer CR-Wire" - } - ] - } - $j$::jsonb - , 2) -) x; */ + DELETE FROM tps.map_rm where target = 'Parse ACH'; INSERT INTO @@ -249,3 +130,122 @@ FROM $j$::jsonb , 2) ) x; + +/* + +DELETE FROM tps.map_rm where target = 'Parse Wires'; +INSERT INTO +tps.map_rm +SELECT * +FROM +(VALUES + ('PNCC', 'Parse Wires', + $j$ + { + "name":"Parse Wires", + "description":"pull out whatever follows OBI in the description until atleast 3 capital letters followed by a colon are encountered", + "defn": [ + { + "key": "{Description}", + "field": "dparse", + "regex": "([A-Z]{3,}?:)(.*)(?=[A-Z]{3,}?:|$)", + "flag":"g", + "retain":"y" + }, + { + "key": "{Description}", + "field": "beneficiary_components", + "regex": "BENEFICIARY:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + }, + { + "key": "{Description}", + "field": "originator_components", + "regex": "ORIGINATOR:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + }, + { + "key": "{Description}", + "field": "OBI", + "regex": "OBI:(.*?)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + }, + { + "key": "{Description}", + "field": "RFB", + "regex": "RFB:(.*?)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + }, + { + "key": "{Description}", + "field": "ABA", + "regex": "ABA:(.*?)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + }, + { + "key": "{Description}", + "field": "BBI", + "regex": "BBI:(.*?)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + }, + { + "key": "{Description}", + "field": "BENEBNK", + "regex": "BENEBNK:(.*?)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + }, + { + "key": "{Description}", + "field": "IBK", + "regex": "IBK:(.*?)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + }, + { + "key": "{Description}", + "field": "RATE", + "regex": "RATE:(.*?)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + }, + { + "key": "{Description}", + "field": "RECVBNK", + "regex": "RECVBNK:(.*?)(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y" + } + ], + "function":"extract", + "map":"no", + "where": [ + { + "Transaction":"Money Transfer DB - Wire" + }, + { + "Transaction":"Money Transfer DB - Other" + }, + { + "Transaction":"Money Transfer CR-Wire" + }, + { + "Transaction":"Money Transfer CR-Other" + }, + { + "Transaction":"Intl Money Transfer Debits" + }, + { + "Transaction":"Intl Money Transfer Credits" + } + ] + } + $j$::jsonb + , 2) +) x; \ No newline at end of file From b94948b1b93a33e9deac38a52043ef62cff984de Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 27 Oct 2017 13:12:45 -0400 Subject: [PATCH 04/14] add new mappings and clean up old ones --- ubm_data.sql | 43 +------------------------------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/ubm_data.sql b/ubm_data.sql index 166a0c3..500815d 100644 --- a/ubm_data.sql +++ b/ubm_data.sql @@ -38,16 +38,12 @@ INSERT INTO srce (srce, defn) VALUES ('ADPRP', '{"name": "ADPRP", "type": "csv", -- Data for Name: map_rm; Type: TABLE DATA; Schema: tps; Owner: - -- -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'ACH Debits', '{"map": "yes", "defn": [{"key": "{Description}", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}, {"key": "{Description}", "field": "compn", "regex": "Comp Name:(.+?)(?=$| Comp|\\w+?:)", "retain": "y"}, {"key": "{Description}", "field": "adp_comp", "regex": "Cust ID:.*?(B3X|UDV|U7E|U7C|U7H|U7J).*?(?=$|\\w+?:)", "retain": "y"}, {"key": "{Description}", "field": "desc", "regex": "Desc:(.+?) Comp", "retain": "y"}, {"key": "{Description}", "field": "discr", "regex": "Discr:(.+?)(?=$| SEC:|\\w+?:)", "retain": "y"}], "where": [{"Transaction": "ACH Debits"}], "function": "extract"}', 2); INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Trans Type', '{"map": "yes", "defn": [{"key": "{AccountName}", "field": "acctn", "regex": "(.*)", "retain": "n"}, {"key": "{Transaction}", "field": "trans", "regex": "(.*)", "retain": "n"}, {"key": "{Description}", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}], "where": [{}], "function": "extract"}', 1); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Wires Out', '{"map": "yes", "defn": [{"key": "{Description}", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}, {"key": "{Description}", "field": "bene", "regex": "BENEFICIARY:(.+?) AC/", "retain": "y"}, {"key": "{Description}", "field": "accts", "regex": "AC/(\\w*) .*AC/(\\w*) ", "retain": "y"}], "where": [{"Transaction": "Intl Money Transfer Debits"}, {"Transaction": "Money Transfer DB - Wire"}], "function": "extract"}', 2); INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Currency', '{"map": "yes", "defn": [{"key": "{Description}", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}, {"key": "{Description}", "field": "curr1", "regex": ".*(DEBIT|CREDIT).*(USD|CAD).*(?=DEBIT|CREDIT).*(?=USD|CAD).*", "retain": "y"}, {"key": "{Description}", "field": "curr2", "regex": ".*(?=DEBIT|CREDIT).*(?=USD|CAD).*(DEBIT|CREDIT).*(USD|CAD).*", "retain": "y"}], "where": [{"Transaction": "Miscellaneous Credits"}, {"Transaction": "Miscellaneous Debits"}], "function": "extract"}', 2); INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Check Number', '{"map": "yes", "defn": [{"key": "{Description}", "field": "checkn", "regex": "[^0-9]*([0-9]*)\\s|$", "retain": "y"}], "where": [{"Transaction": "Checks Paid"}], "function": "extract"}', 2); INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Strip Amount Commas', '{"map": "no", "defn": [{"key": "{Amount}", "flag": "g", "field": "amount", "regex": ",", "retain": "y", "replace": ""}], "name": "Strip Amount Commas", "where": [{}], "function": "replace", "description": "the Amount field come from PNC with commas embeded so it cannot be cast to numeric"}', 1); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse Descr', '{"map": "no", "defn": [{"key": "{Description}", "flag": "g", "field": "dparse", "regex": "([A-Z]{3,}?:)(.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}], "name": "Parse Descr", "where": [{}], "function": "extract", "description": "parse the description based on at least three capital letters followed by a comma until another set of at lesat 3 capital letters and a comma is encountered"}', 2); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Extract OBI', '{"map": "no", "defn": [{"key": "{Description}", "flag": "", "field": "obi", "regex": "OBI:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}], "name": "Extract OBI", "where": [{"Transaction": "Money Transfer DB - Wire"}, {"Transaction": "Money Transfer CR-Other"}, {"Transaction": "Intl Money Transfer Debits"}, {"Transaction": "Money Transfer DB - Other"}, {"Transaction": "Money Transfer CR-Wire"}], "function": "extract", "description": "pull out whatever follows OBI in the description until atleast 3 capital letters followed by a colon are encountered"}', 2); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Extract RFB', '{"map": "no", "defn": [{"key": "{Description}", "flag": "", "field": "rfb", "regex": "RFB:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}], "name": "Extract RFB", "where": [{"Transaction": "Money Transfer DB - Wire"}, {"Transaction": "Money Transfer CR-Other"}, {"Transaction": "Intl Money Transfer Debits"}, {"Transaction": "Money Transfer DB - Other"}, {"Transaction": "Money Transfer CR-Wire"}], "function": "extract", "description": "pull out whatever follows RFB in the description until atleast 3 capital letters followed by a colon are encountered"}', 2); INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse ACH', '{"map": "no", "defn": [{"key": "{Description}", "flag": "", "field": "Comp Name", "regex": "Comp Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Cust ID", "regex": "Cust ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Desc", "regex": "Desc:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Cust Name", "regex": "Cust Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Batch Discr", "regex": "Batch Discr:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Comp ID", "regex": "Comp ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Addenda", "regex": "Addenda:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "SETT", "regex": "SETT:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Date", "regex": "Date:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Time", "regex": "Time:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}], "name": "Parse ACH", "where": [{"Transaction": "ACH Credits"}, {"Transaction": "ACH Debits"}], "function": "extract", "description": "parse select components of the description for ACH Credits Receieved"}', 2); +INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse Wires', '{"map": "no", "defn": [{"key": "{Description}", "flag": "g", "field": "dparse", "regex": "([A-Z]{3,}?:)(.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "beneficiary_components", "regex": "BENEFICIARY:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "originator_components", "regex": "ORIGINATOR:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "OBI", "regex": "OBI:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "RFB", "regex": "RFB:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "ABA", "regex": "ABA:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "BBI", "regex": "BBI:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "BENEBNK", "regex": "BENEBNK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "IBK", "regex": "IBK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "RATE", "regex": "RATE:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "RECVBNK", "regex": "RECVBNK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}], "name": "Parse Wires", "where": [{"Transaction": "Money Transfer DB - Wire"}, {"Transaction": "Money Transfer DB - Other"}, {"Transaction": "Money Transfer CR-Wire"}, {"Transaction": "Money Transfer CR-Other"}, {"Transaction": "Intl Money Transfer Debits"}, {"Transaction": "Intl Money Transfer Credits"}], "function": "extract", "description": "pull out whatever follows OBI in the description until atleast 3 capital letters followed by a colon are encountered"}', 2); -- @@ -86,45 +82,13 @@ INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{" INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "FUNDS TRANSFER TO ACCT", "acctn": "The HC Operating Company OPERA", "trans": "ZBA Debits"}', '{"sign": "-1", "ledger": "Manual", "reason": "ZBA Funding", "trantype": "Funding"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "FUNDS TRANSFER TO ACCT", "acctn": "The HC Operating Company PAYR", "trans": "ZBA Debits"}', '{"sign": "-1", "ledger": "Manual", "reason": "ZBA Funding", "trantype": "Funding"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Currency', '{"ini": "DEPOSIT:", "curr1": ["CREDIT", "USD"], "curr2": ["DEBIT", "CAD"]}', '{"party": "The HC Canada Operating Company, Ltd.", "ledger": "Manual", "reason": "IC - Can to US Settlement", "trantype": "Interco Collection"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Wires Out', '{"ini": "INTL WIRES OUT", "accts": ["8026322346", "010241000355"]}', '{"party": "The HC Canada Operating Company, Ltd.", "ledger": "Manual", "reason": "IC - permanent AP funding"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Wires Out', '{"ini": "INTL WIRES OUT", "accts": ["8026322346", "010244001145"]}', '{"party": "The HC Canada Operating Company, Ltd.", "ledger": "Manual", "reason": "IC - round-trip settlement outbound"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Wires Out', '{"ini": "INTL WIRES OUT", "accts": ["8026322346", "010244001152"]}', '{"party": "The HC Canada Operating Company, Ltd.", "ledger": "Manual", "reason": "IC - permanent AP funding"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Wires Out', '{"ini": "FED WIRE OUT", "bene": "ADP LLC", "accts": ["8026322346", "00153170"]}', '{"party": "ADP", "ledger": "Manual", "reason": "Payroll"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Wires Out', '{"ini": "FED WIRE OUT", "bene": "ADP LLC", "accts": ["8026322346", "00412283"]}', '{"party": "ADP", "ledger": "Manual", "reason": "Payroll"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Wires Out', '{"ini": "FED WIRE OUT", "bene": "ADP PAYROLL TAX DEPOSIT CUSTODIAN", "accts": ["8026322338", "00153170"]}', '{"party": "ADP", "ledger": "Manual", "reason": "Payroll"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Wires Out', '{"ini": "FED WIRE OUT", "bene": "ADP TAX SVCS INC. REV. WIRE IMPOUND", "accts": ["8026322338", "00416217"]}', '{"party": "ADP", "ledger": "Manual", "reason": "Payroll Direct Deposit"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "compn": " NEVADA TAX"}', '{"party": "State of Nevada", "reason": "Sales & Use Tax"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " ADP - TAX", "compn": " ADP TX/FINCL SVC"}', '{"party": "ADP", "reason": "Payroll"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " ANTHEM", "compn": " ANTHEM"}', '{"party": "Anthem", "reason": "Healthcare Costs"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " TAX/401K", "compn": " ADP TAX/401K"}', '{"party": "ADP", "reason": "Payroll Taxes"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "CORPORATE ACCOUNT ANALYSIS CHARGE", "acctn": "The HC Operating Company OPERA", "trans": "Miscellaneous Fees"}', '{"sign": "-1", "party": "PNC", "ledger": "Manual", "reason": "Bank Fees", "trantype": "Fees"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "PNC MERCHANT FINCL ADJ", "acctn": "The HC Operating Company FBO P", "trans": "Miscellaneous Fees"}', '{"sign": "-1", "party": "PNC", "ledger": "Manual", "reason": "Bank Fees", "trantype": "Fees"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " ASO CLAIMS", "compn": " UNUM STD"}', '{"party": "Unum", "reason": "Short Term Disability"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "PNC BANK- NJ LOAN PMTS", "acctn": "The HC Operating Company FBO P", "trans": "Miscellaneous Debits"}', '{"sign": "-1", "ledger": "Manual", "reason": "Revolver Payment", "trantype": "Revolver Payment"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "WITHDRAWAL:", "acctn": "The HC Operating Company FBO P", "trans": "Miscellaneous Debits"}', '{"sign": "-1", "ledger": "Manual", "trantype": "Disbursement"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "BOOK TRANSFER CREDIT", "acctn": "The HC Operating Company FBO P", "trans": "Money Transfer CR-Other"}', '{"sign": "1", "ledger": "Manual", "reason": "Returned Item", "trantype": "Collections"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "BOOK TRANSFER CREDIT", "acctn": "The HC Operating Company OPERA", "trans": "Money Transfer CR-Other"}', '{"sign": "1", "ledger": "Manual", "reason": "Returned Item", "trantype": "Collections"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "BOOK TRANSFER CREDIT GHFTDD DDA CREDIT", "acctn": "The HC Operating Company FBO P", "trans": "Money Transfer CR-Other"}', '{"sign": "1", "ledger": "Manual", "reason": "Returned Item", "trantype": "Collections"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " AXP DISCNT", "compn": " AMERICAN EXPRESS"}', '{"party": "American Express", "reason": "Credit Card Fees"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " BNKCRD DEP", "compn": " WORLDPAY"}', '{"party": "Worldpay", "reason": "Credit Card Fees"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " C01", "compn": " FLA DEPT REVENUE"}', '{"party": "Florida", "reason": "Sales & Tax"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " DBI ADMIN", "compn": " DISCOVERY BENEFI"}', '{"party": "Discovery Benefits", "reason": "Benefits Administration"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " DEBITS", "compn": " OHIO BWC", "discr": " OHIO BWC PREMIUM"}', '{"party": "Ohio BWC", "reason": "Workers Comp Premium"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " INSURANCE", "compn": " UNUMGROUP955"}', '{"party": "Unum", "reason": "Insurance"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " INTEREST", "compn": " DERIVATIVES"}', '{"party": "PNC", "reason": "Derivatives Interest"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " LEASE RENT", "compn": " RAYMOND LEASING"}', '{"party": "Raymond Leasing", "reason": "Lease Expense"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " MTHLY CHGS", "compn": " WORLDPAY"}', '{"party": "Worlpay", "reason": "Credit Card Fees"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " OH CAT RTN", "compn": " 8012OHIO-TAXOCAT"}', '{"party": "State of Ohio", "reason": "CAT"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " OH REG VL", "compn": " 8008OHIO-TAXORVL"}', '{"party": "State of Ohio", "reason": "Vendor License"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " OH SALESTX", "compn": " 8013OHIO-TAXOSUT"}', '{"party": "State of Ohio", "reason": "Sales & Use Tax"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " OH TAXASMT", "compn": " 8001OHIO-TAXSUAP"}', '{"party": "State of Ohio", "reason": "Sales & Use Tax"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " OHATTYGN", "compn": " OH ATTORNYGENRAL"}', '{"party": "Ohio Attorney General", "reason": "Sales & Use Tax"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " PLIC-PERIS", "compn": " PRINCIPAL LIFE P"}', '{"party": "Principal", "reason": "401k"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " PROGRAM", "compn": " USDEPTHHSCMS"}', '{"party": "US Dept of HHS", "reason": "Health tax"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " RIPAYMENT", "compn": " USDEPTHHSCMS"}', '{"party": "US Dept of HHS", "reason": "Health tax"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " TAX PMT", "compn": " WA ST DEPT REV"}', '{"party": "Washington State", "reason": "Sales & Use Tax"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " UCC FILING", "compn": " RAYMOND LEASING"}', '{"party": "Raymond Leasing", "reason": "Lease Expense"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " USATAXPYMT", "compn": " IRS"}', '{"party": "IRS", "reason": "Federal Tax"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "19UDV", "acctn": "The HC Operating Company PAYR", "trans": "ACH Credits"}', '{"sign": "1", "ledger": "Manual", "reason": "Payroll Credits", "trantype": "Disbursement"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "ACH CREDIT RECEIVED", "acctn": "The HC Operating Company FBO P", "trans": "ACH Credits"}', '{"sign": "1", "ledger": "AR - Collections", "trantype": "Collections"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "ACH CREDIT RECEIVED", "acctn": "The HC Operating Company PAYR", "trans": "ACH Credits"}', '{"sign": "1", "ledger": "Manual", "reason": "Payroll Credits", "trantype": "Disbursement"}'); @@ -141,15 +105,10 @@ INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{" INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "SUBSTITUTE CHK", "acctn": "The HC Operating Company OPERA", "trans": "Checks Paid"}', '{"sign": "-1", "ledger": "AP - Check Run", "trantype": "Disbursement"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "RET DEP ITEM NSF UN", "acctn": "The HC Operating Company FBO P", "trans": "Deposited Items Returned"}', '{"sign": "-1", "ledger": "Manual", "reason": "Returned Deposit NSF", "trantype": "Collections"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Currency', '{"ini": "WITHDRAWAL:", "curr1": ["DEBIT", "USD"], "curr2": ["CREDIT", "CAD"]}', '{"party": "The HC Canada Operating Company, Ltd.", "ledger": "Manual", "reason": "IC - US to CAN Settlement", "trantype": "Interco Funding"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " EEPAY/GARN", "compn": " ADP EEPAY/GARNWC"}', '{"party": "ADP", "reason": "Payroll Direct Deposit & Garnishments"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Currency', '{"ini": "DEPOSIT:", "curr1": ["CREDIT", "USD"], "curr2": ["DEBIT", "USD"]}', '{"party": "The HC Canada Operating Company, Ltd.", "ledger": "Manual", "reason": "IC - round-trip settlement return", "trantype": "Interco Collection"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Currency', '{"ini": "DEPOSIT:", "curr1": ["DEBIT", "USD"], "curr2": ["CREDIT", "CAD"]}', '{"party": "The HC Canada Operating Company, Ltd.", "ledger": "Manual", "reason": "IC - Can to US Settlement", "trantype": "Interco Collection"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " ADP TAX", "compn": " ADP TAX"}', '{"party": "ADP", "reason": "Payroll Taxes"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "DEPOSIT:", "acctn": "The HC Operating Company OPERA", "trans": "Miscellaneous Credits"}', '{"sign": "1", "ledger": "Manual", "trantype": "Collections"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "SUBSTITUTE CHK", "acctn": "The HC Operating Company PAYR", "trans": "Checks Paid"}', '{"sign": "-1", "ledger": "Manual", "reason": "Payroll Checks", "trantype": "Disbursement"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " WAGE GARN", "compn": " ADP WAGE GARN"}', '{"party": "ADP", "reason": "Payroll Garnishments"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " WAGE PAY", "compn": " ADP WAGE PAY"}', '{"party": "ADP", "reason": "Payroll Direct Deposit"}'); -INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'ACH Debits', '{"ini": "ACH DEBIT RECEIVED", "desc": " DBI COBRA", "compn": " DBI COBRA"}', '{"party": "ADP", "reason": "Payroll Direct Deposit"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "ACH DEBIT RETURN", "acctn": "The HC Operating Company OPERA", "trans": "ACH Debits"}', '{"sign": "-1", "ledger": "manual", "trantype": "Disbursement"}'); INSERT INTO map_rv (srce, target, retval, map) VALUES ('PNCC', 'Trans Type', '{"ini": "ACH CREDIT SETTLEMENT", "acctn": "The HC Operating Company OPERA", "trans": "ACH Credits"}', '{"sign": "1", "ledger": "manual", "trantype": "Disbursement"}'); From 417bdca27dd26c61cb57c187585af0605ef934a9 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 27 Oct 2017 13:23:08 -0400 Subject: [PATCH 05/14] move all current map_rm into update scripts for editing --- map_rm_template.pgsql | 144 ++++++++++++++++++++++++++++++++---------- 1 file changed, 112 insertions(+), 32 deletions(-) diff --git a/map_rm_template.pgsql b/map_rm_template.pgsql index b40e35e..9a99a36 100644 --- a/map_rm_template.pgsql +++ b/map_rm_template.pgsql @@ -1,11 +1,6 @@ -/* -DELETE FROM tps.map_rm where target = 'Strip Amount Commas'; -INSERT INTO -tps.map_rm -SELECT * -FROM -(VALUES - ('PNCC', 'Strip Amount Commas', + +UPDATE tps.map_rm +SET regex = $j$ { "name":"Strip Amount Commas", @@ -28,18 +23,11 @@ FROM ] } $j$::jsonb - , 1) -) x; -*/ +WHERE + target = 'Strip Amount Commas'; -DELETE FROM tps.map_rm where target = 'Parse ACH'; - -INSERT INTO -tps.map_rm -SELECT * -FROM -(VALUES - ('PNCC', 'Parse ACH', +UPDATE tps.map_rm +SET regex = $j$ { "name":"Parse ACH", @@ -128,18 +116,10 @@ FROM ] } $j$::jsonb - , 2) -) x; +WHERE target = 'Parse ACH'; -/* - -DELETE FROM tps.map_rm where target = 'Parse Wires'; -INSERT INTO -tps.map_rm -SELECT * -FROM -(VALUES - ('PNCC', 'Parse Wires', +UPDATE tps.map_rm +SET regex = $j$ { "name":"Parse Wires", @@ -247,5 +227,105 @@ FROM ] } $j$::jsonb - , 2) -) x; \ No newline at end of file + WHERE target = 'Parse Wires'; + + +UPDATE tps.map_rm +SET regex = + $j$ + { + "name":"Trans Type", + "description":"extract intial description in conjunction with account name and transaction type for mapping", + "map": "yes", + "defn": [ + { + "key": "{AccountName}", + "field": "acctn", + "regex": "(.*)", + "retain": "n" + }, + { + "key": "{Transaction}", + "field": "trans", + "regex": "(.*)", + "retain": "n" + }, + { + "key": "{Description}", + "field": "ini", + "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", + "retain": "y" + } + ], + "where": [ + { + } + ], + "function": "extract" + } + $j$::jsonb + WHERE target = 'Trans Type'; + + +UPDATE tps.map_rm +SET regex = + $j$ + { + "name":"Currency", + "description":"pull out currency indicators from description of misc items and map", + "map": "yes", + "defn": [ + { + "key": "{Description}", + "field": "ini", + "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", + "retain": "y" + }, + { + "key": "{Description}", + "field": "curr1", + "regex": ".*(DEBIT|CREDIT).*(USD|CAD).*(?=DEBIT|CREDIT).*(?=USD|CAD).*", + "retain": "y" + }, + { + "key": "{Description}", + "field": "curr2", + "regex": ".*(?=DEBIT|CREDIT).*(?=USD|CAD).*(DEBIT|CREDIT).*(USD|CAD).*", + "retain": "y" + } + ], + "where": [ + { + "Transaction": "Miscellaneous Credits" + }, + { + "Transaction": "Miscellaneous Debits" + } + ], + "function": "extract" + } + $j$::jsonb + WHERE target = 'Currency'; + +UPDATE tps.map_rm +SET regex = + $j$ + { + "map": "yes", + "defn": [ + { + "key": "{Description}", + "field": "checkn", + "regex": "[^0-9]*([0-9]*)\\s|$", + "retain": "y" + } + ], + "where": [ + { + "Transaction": "Checks Paid" + } + ], + "function": "extract" + } + $j$::jsonb + WHERE target = 'Check Number'; \ No newline at end of file From f88584f8352162023ad319d4b501cb9471306a99 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 27 Oct 2017 13:51:08 -0400 Subject: [PATCH 06/14] convert map flag to be at the regex item level --- do_map_g_option.pgsql | 18 +++++---- list_maps.pgsql | 2 +- map_rm_template.pgsql | 93 +++++++++++++++++++++++++++---------------- ubm_data.sql | 12 +++--- 4 files changed, 75 insertions(+), 50 deletions(-) diff --git a/do_map_g_option.pgsql b/do_map_g_option.pgsql index 7ecc0ed..6357b7e 100644 --- a/do_map_g_option.pgsql +++ b/do_map_g_option.pgsql @@ -10,25 +10,25 @@ SELECT t.rec, m.target, m.seq, - regex->>'map' map_intention, regex->>'function' regex_function, e.v ->> 'field' result_key_name, e.v ->> 'key' target_json_path, e.v ->> 'flag' regex_options_flag, + e.v->>'map' map_intention, e.v->>'retain' retain_result, e.v->>'regex' regex_expression, e.rn target_item_number, COALESCE(mt.rn,rp.rn,1) result_number, mt.mt rx_match, rp.rp rx_replace, - CASE regex->>'map' - WHEN 'yes' THEN + CASE e.v->>'map' + WHEN 'y' THEN e.v->>'field' ELSE null END map_key, - CASE regex->>'map' - WHEN 'yes' THEN + CASE e.v->>'map' + WHEN 'y' THEN CASE regex->>'function' WHEN 'extract' THEN CASE WHEN array_upper(mt.mt,1)=1 @@ -87,7 +87,8 @@ ORDER BY COALESCE(mt.rn,rp.rn,1) ) ---SELECT * FROM rx +--SELECT count(*) FROM rx LIMIT 100 + , agg_to_target_items AS ( SELECT @@ -144,7 +145,8 @@ GROUP BY ,retain_key ) ---SELECT * FROM agg_to_target_items +--SELECT * FROM agg_to_target_items LIMIT 100 + , agg_to_target AS ( SELECT @@ -217,4 +219,4 @@ SET FROM agg_to_id o WHERE - o.id = t.id; + o.id = t.id; \ No newline at end of file diff --git a/list_maps.pgsql b/list_maps.pgsql index fdc618f..f422e7e 100644 --- a/list_maps.pgsql +++ b/list_maps.pgsql @@ -1,12 +1,12 @@ SELECT m.srce, m.target, - regex->>'map' map_intention, regex->>'function' regex_function, regex->>'where' where_clause, e.v ->> 'field' result_key_name, e.v ->> 'key' target_json_path, e.v ->> 'flag' regex_options_flag, + e.v->>'map' map_intention, e.v->>'retain' retain_result, e.v->>'regex' regex_expression, e.rn target_item_number diff --git a/map_rm_template.pgsql b/map_rm_template.pgsql index 9a99a36..60de4af 100644 --- a/map_rm_template.pgsql +++ b/map_rm_template.pgsql @@ -12,11 +12,11 @@ SET regex = "regex": ",", "replace":"", "flag":"g", - "retain":"y" + "retain":"y", + "map":"n" } ], "function":"replace", - "map":"no", "where": [ { } @@ -38,74 +38,83 @@ SET regex = "field":"Comp Name", "regex": "Comp Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field":"Cust ID", "regex": "Cust ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field":"Desc", "regex": "Desc:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field":"Cust Name", "regex": "Cust Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field":"Batch Discr", "regex": "Batch Discr:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field":"Comp ID", "regex": "Comp ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field":"Addenda", "regex": "Addenda:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field":"SETT", "regex": "SETT:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field":"Date", "regex": "Date:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field":"Time", "regex": "Time:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" } ], "function":"extract", - "map":"no", "where": [ { "Transaction":"ACH Credits" @@ -130,81 +139,91 @@ SET regex = "field": "dparse", "regex": "([A-Z]{3,}?:)(.*)(?=[A-Z]{3,}?:|$)", "flag":"g", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "beneficiary_components", "regex": "BENEFICIARY:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "originator_components", "regex": "ORIGINATOR:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "OBI", "regex": "OBI:(.*?)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "RFB", "regex": "RFB:(.*?)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "ABA", "regex": "ABA:(.*?)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "BBI", "regex": "BBI:(.*?)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "BENEBNK", "regex": "BENEBNK:(.*?)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "IBK", "regex": "IBK:(.*?)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "RATE", "regex": "RATE:(.*?)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" }, { "key": "{Description}", "field": "RECVBNK", "regex": "RECVBNK:(.*?)(?=[A-Z]{3,}?:|$)", "flag":"", - "retain":"y" + "retain":"y", + "map":"n" } ], "function":"extract", - "map":"no", "where": [ { "Transaction":"Money Transfer DB - Wire" @@ -236,25 +255,27 @@ SET regex = { "name":"Trans Type", "description":"extract intial description in conjunction with account name and transaction type for mapping", - "map": "yes", "defn": [ { "key": "{AccountName}", "field": "acctn", "regex": "(.*)", - "retain": "n" + "retain": "n", + "map":"y" }, { "key": "{Transaction}", "field": "trans", "regex": "(.*)", - "retain": "n" + "retain": "n", + "map":"y" }, { "key": "{Description}", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", - "retain": "y" + "retain": "y", + "map":"y" } ], "where": [ @@ -273,25 +294,27 @@ SET regex = { "name":"Currency", "description":"pull out currency indicators from description of misc items and map", - "map": "yes", "defn": [ { "key": "{Description}", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", - "retain": "y" + "retain": "y", + "map":"y" }, { "key": "{Description}", "field": "curr1", "regex": ".*(DEBIT|CREDIT).*(USD|CAD).*(?=DEBIT|CREDIT).*(?=USD|CAD).*", - "retain": "y" + "retain": "y", + "map":"y" }, { "key": "{Description}", "field": "curr2", "regex": ".*(?=DEBIT|CREDIT).*(?=USD|CAD).*(DEBIT|CREDIT).*(USD|CAD).*", - "retain": "y" + "retain": "y", + "map":"y" } ], "where": [ @@ -311,13 +334,13 @@ UPDATE tps.map_rm SET regex = $j$ { - "map": "yes", "defn": [ { "key": "{Description}", "field": "checkn", "regex": "[^0-9]*([0-9]*)\\s|$", - "retain": "y" + "retain": "y", + "map":"n" } ], "where": [ diff --git a/ubm_data.sql b/ubm_data.sql index 500815d..adcf937 100644 --- a/ubm_data.sql +++ b/ubm_data.sql @@ -38,12 +38,12 @@ INSERT INTO srce (srce, defn) VALUES ('ADPRP', '{"name": "ADPRP", "type": "csv", -- Data for Name: map_rm; Type: TABLE DATA; Schema: tps; Owner: - -- -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Trans Type', '{"map": "yes", "defn": [{"key": "{AccountName}", "field": "acctn", "regex": "(.*)", "retain": "n"}, {"key": "{Transaction}", "field": "trans", "regex": "(.*)", "retain": "n"}, {"key": "{Description}", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}], "where": [{}], "function": "extract"}', 1); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Currency', '{"map": "yes", "defn": [{"key": "{Description}", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}, {"key": "{Description}", "field": "curr1", "regex": ".*(DEBIT|CREDIT).*(USD|CAD).*(?=DEBIT|CREDIT).*(?=USD|CAD).*", "retain": "y"}, {"key": "{Description}", "field": "curr2", "regex": ".*(?=DEBIT|CREDIT).*(?=USD|CAD).*(DEBIT|CREDIT).*(USD|CAD).*", "retain": "y"}], "where": [{"Transaction": "Miscellaneous Credits"}, {"Transaction": "Miscellaneous Debits"}], "function": "extract"}', 2); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Check Number', '{"map": "yes", "defn": [{"key": "{Description}", "field": "checkn", "regex": "[^0-9]*([0-9]*)\\s|$", "retain": "y"}], "where": [{"Transaction": "Checks Paid"}], "function": "extract"}', 2); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Strip Amount Commas', '{"map": "no", "defn": [{"key": "{Amount}", "flag": "g", "field": "amount", "regex": ",", "retain": "y", "replace": ""}], "name": "Strip Amount Commas", "where": [{}], "function": "replace", "description": "the Amount field come from PNC with commas embeded so it cannot be cast to numeric"}', 1); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse ACH', '{"map": "no", "defn": [{"key": "{Description}", "flag": "", "field": "Comp Name", "regex": "Comp Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Cust ID", "regex": "Cust ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Desc", "regex": "Desc:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Cust Name", "regex": "Cust Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Batch Discr", "regex": "Batch Discr:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Comp ID", "regex": "Comp ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Addenda", "regex": "Addenda:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "SETT", "regex": "SETT:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Date", "regex": "Date:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "Time", "regex": "Time:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}], "name": "Parse ACH", "where": [{"Transaction": "ACH Credits"}, {"Transaction": "ACH Debits"}], "function": "extract", "description": "parse select components of the description for ACH Credits Receieved"}', 2); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse Wires', '{"map": "no", "defn": [{"key": "{Description}", "flag": "g", "field": "dparse", "regex": "([A-Z]{3,}?:)(.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "beneficiary_components", "regex": "BENEFICIARY:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "originator_components", "regex": "ORIGINATOR:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "OBI", "regex": "OBI:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "RFB", "regex": "RFB:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "ABA", "regex": "ABA:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "BBI", "regex": "BBI:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "BENEBNK", "regex": "BENEBNK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "IBK", "regex": "IBK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "RATE", "regex": "RATE:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "flag": "", "field": "RECVBNK", "regex": "RECVBNK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}], "name": "Parse Wires", "where": [{"Transaction": "Money Transfer DB - Wire"}, {"Transaction": "Money Transfer DB - Other"}, {"Transaction": "Money Transfer CR-Wire"}, {"Transaction": "Money Transfer CR-Other"}, {"Transaction": "Intl Money Transfer Debits"}, {"Transaction": "Intl Money Transfer Credits"}], "function": "extract", "description": "pull out whatever follows OBI in the description until atleast 3 capital letters followed by a colon are encountered"}', 2); +INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Strip Amount Commas', '{"defn": [{"key": "{Amount}", "map": "n", "flag": "g", "field": "amount", "regex": ",", "retain": "y", "replace": ""}], "name": "Strip Amount Commas", "where": [{}], "function": "replace", "description": "the Amount field come from PNC with commas embeded so it cannot be cast to numeric"}', 1); +INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Trans Type', '{"defn": [{"key": "{AccountName}", "map": "y", "field": "acctn", "regex": "(.*)", "retain": "n"}, {"key": "{Transaction}", "map": "y", "field": "trans", "regex": "(.*)", "retain": "n"}, {"key": "{Description}", "map": "y", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}], "name": "Trans Type", "where": [{}], "function": "extract", "description": "extract intial description in conjunction with account name and transaction type for mapping"}', 1); +INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Currency', '{"defn": [{"key": "{Description}", "map": "y", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}, {"key": "{Description}", "map": "y", "field": "curr1", "regex": ".*(DEBIT|CREDIT).*(USD|CAD).*(?=DEBIT|CREDIT).*(?=USD|CAD).*", "retain": "y"}, {"key": "{Description}", "map": "y", "field": "curr2", "regex": ".*(?=DEBIT|CREDIT).*(?=USD|CAD).*(DEBIT|CREDIT).*(USD|CAD).*", "retain": "y"}], "name": "Currency", "where": [{"Transaction": "Miscellaneous Credits"}, {"Transaction": "Miscellaneous Debits"}], "function": "extract", "description": "pull out currency indicators from description of misc items and map"}', 2); +INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Check Number', '{"defn": [{"key": "{Description}", "map": "n", "field": "checkn", "regex": "[^0-9]*([0-9]*)\\s|$", "retain": "y"}], "where": [{"Transaction": "Checks Paid"}], "function": "extract"}', 2); +INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse ACH', '{"defn": [{"key": "{Description}", "map": "n", "flag": "", "field": "Comp Name", "regex": "Comp Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Cust ID", "regex": "Cust ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Desc", "regex": "Desc:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Cust Name", "regex": "Cust Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Batch Discr", "regex": "Batch Discr:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Comp ID", "regex": "Comp ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Addenda", "regex": "Addenda:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "SETT", "regex": "SETT:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Date", "regex": "Date:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Time", "regex": "Time:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}], "name": "Parse ACH", "where": [{"Transaction": "ACH Credits"}, {"Transaction": "ACH Debits"}], "function": "extract", "description": "parse select components of the description for ACH Credits Receieved"}', 2); +INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse Wires', '{"defn": [{"key": "{Description}", "map": "n", "flag": "g", "field": "dparse", "regex": "([A-Z]{3,}?:)(.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "beneficiary_components", "regex": "BENEFICIARY:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "originator_components", "regex": "ORIGINATOR:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "OBI", "regex": "OBI:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "RFB", "regex": "RFB:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "ABA", "regex": "ABA:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "BBI", "regex": "BBI:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "BENEBNK", "regex": "BENEBNK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "IBK", "regex": "IBK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "RATE", "regex": "RATE:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "RECVBNK", "regex": "RECVBNK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}], "name": "Parse Wires", "where": [{"Transaction": "Money Transfer DB - Wire"}, {"Transaction": "Money Transfer DB - Other"}, {"Transaction": "Money Transfer CR-Wire"}, {"Transaction": "Money Transfer CR-Other"}, {"Transaction": "Intl Money Transfer Debits"}, {"Transaction": "Intl Money Transfer Credits"}], "function": "extract", "description": "pull out whatever follows OBI in the description until atleast 3 capital letters followed by a colon are encountered"}', 2); -- From fac52588aeb0523e3189bfff58c2d24848df41e9 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 27 Oct 2017 14:18:57 -0400 Subject: [PATCH 07/14] update map to exclude 6 digits at end of company name --- map_rm_template.pgsql | 2 +- ubm_data.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/map_rm_template.pgsql b/map_rm_template.pgsql index 60de4af..1911c37 100644 --- a/map_rm_template.pgsql +++ b/map_rm_template.pgsql @@ -36,7 +36,7 @@ SET regex = { "key": "{Description}", "field":"Comp Name", - "regex": "Comp Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "regex": "Comp Name:(.+?)(?=\\d{6} Com|SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", "retain":"y", "map":"n" diff --git a/ubm_data.sql b/ubm_data.sql index adcf937..8ced42b 100644 --- a/ubm_data.sql +++ b/ubm_data.sql @@ -42,7 +42,7 @@ INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Strip Amount Comm INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Trans Type', '{"defn": [{"key": "{AccountName}", "map": "y", "field": "acctn", "regex": "(.*)", "retain": "n"}, {"key": "{Transaction}", "map": "y", "field": "trans", "regex": "(.*)", "retain": "n"}, {"key": "{Description}", "map": "y", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}], "name": "Trans Type", "where": [{}], "function": "extract", "description": "extract intial description in conjunction with account name and transaction type for mapping"}', 1); INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Currency', '{"defn": [{"key": "{Description}", "map": "y", "field": "ini", "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)", "retain": "y"}, {"key": "{Description}", "map": "y", "field": "curr1", "regex": ".*(DEBIT|CREDIT).*(USD|CAD).*(?=DEBIT|CREDIT).*(?=USD|CAD).*", "retain": "y"}, {"key": "{Description}", "map": "y", "field": "curr2", "regex": ".*(?=DEBIT|CREDIT).*(?=USD|CAD).*(DEBIT|CREDIT).*(USD|CAD).*", "retain": "y"}], "name": "Currency", "where": [{"Transaction": "Miscellaneous Credits"}, {"Transaction": "Miscellaneous Debits"}], "function": "extract", "description": "pull out currency indicators from description of misc items and map"}', 2); INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Check Number', '{"defn": [{"key": "{Description}", "map": "n", "field": "checkn", "regex": "[^0-9]*([0-9]*)\\s|$", "retain": "y"}], "where": [{"Transaction": "Checks Paid"}], "function": "extract"}', 2); -INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse ACH', '{"defn": [{"key": "{Description}", "map": "n", "flag": "", "field": "Comp Name", "regex": "Comp Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Cust ID", "regex": "Cust ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Desc", "regex": "Desc:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Cust Name", "regex": "Cust Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Batch Discr", "regex": "Batch Discr:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Comp ID", "regex": "Comp ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Addenda", "regex": "Addenda:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "SETT", "regex": "SETT:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Date", "regex": "Date:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Time", "regex": "Time:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}], "name": "Parse ACH", "where": [{"Transaction": "ACH Credits"}, {"Transaction": "ACH Debits"}], "function": "extract", "description": "parse select components of the description for ACH Credits Receieved"}', 2); +INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse ACH', '{"defn": [{"key": "{Description}", "map": "n", "flag": "", "field": "Comp Name", "regex": "Comp Name:(.+?)(?=\\d{6} Com|SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Cust ID", "regex": "Cust ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Desc", "regex": "Desc:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Cust Name", "regex": "Cust Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Batch Discr", "regex": "Batch Discr:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Comp ID", "regex": "Comp ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Addenda", "regex": "Addenda:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "SETT", "regex": "SETT:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Date", "regex": "Date:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "Time", "regex": "Time:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "retain": "y"}], "name": "Parse ACH", "where": [{"Transaction": "ACH Credits"}, {"Transaction": "ACH Debits"}], "function": "extract", "description": "parse select components of the description for ACH Credits Receieved"}', 2); INSERT INTO map_rm (srce, target, regex, seq) VALUES ('PNCC', 'Parse Wires', '{"defn": [{"key": "{Description}", "map": "n", "flag": "g", "field": "dparse", "regex": "([A-Z]{3,}?:)(.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "beneficiary_components", "regex": "BENEFICIARY:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "originator_components", "regex": "ORIGINATOR:(.*?)AC/(\\d*) (.*)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "OBI", "regex": "OBI:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "RFB", "regex": "RFB:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "ABA", "regex": "ABA:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "BBI", "regex": "BBI:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "BENEBNK", "regex": "BENEBNK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "IBK", "regex": "IBK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "RATE", "regex": "RATE:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}, {"key": "{Description}", "map": "n", "flag": "", "field": "RECVBNK", "regex": "RECVBNK:(.*?)(?=[A-Z]{3,}?:|$)", "retain": "y"}], "name": "Parse Wires", "where": [{"Transaction": "Money Transfer DB - Wire"}, {"Transaction": "Money Transfer DB - Other"}, {"Transaction": "Money Transfer CR-Wire"}, {"Transaction": "Money Transfer CR-Other"}, {"Transaction": "Intl Money Transfer Debits"}, {"Transaction": "Intl Money Transfer Credits"}], "function": "extract", "description": "pull out whatever follows OBI in the description until atleast 3 capital letters followed by a colon are encountered"}', 2); From 273b7c9673a56975ab3a333f74bda95c4298e89e Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 27 Oct 2017 15:50:42 -0400 Subject: [PATCH 08/14] limit mapper to allj records are null --- do_map_g_option.pgsql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/do_map_g_option.pgsql b/do_map_g_option.pgsql index 6357b7e..4d1efee 100644 --- a/do_map_g_option.pgsql +++ b/do_map_g_option.pgsql @@ -76,7 +76,8 @@ FROM m.regex->>'function' = 'extract' LEFT JOIN LATERAL regexp_replace(t.rec #>> ((e.v ->> 'key')::text[]), e.v ->> 'regex'::text, e.v ->> 'replace'::text,e.v ->> 'flag') WITH ORDINALITY rp(rp, rn) ON m.regex->>'function' = 'replace' ---WHERE +WHERE + t.allj IS NULL --t.srce = 'PNCC' --rec @> '{"Transaction":"ACH Credits","Transaction":"ACH Debits"}' --rec @> '{"Description":"CHECK 93013270 086129935"}'::jsonb From 2d6212e3cdcb7a38194872dd341d37506d011316 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 27 Oct 2017 16:26:00 -0400 Subject: [PATCH 09/14] add index to srce and couple import jobs --- ubm_data.sql | 8 ++++++-- ubm_schema.sql | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ubm_data.sql b/ubm_data.sql index 8ced42b..73ccb01 100644 --- a/ubm_data.sql +++ b/ubm_data.sql @@ -122,6 +122,10 @@ INSERT INTO trans_log (id, info) VALUES (2, '{"path": "C:\\users\\ptrowbridge\\d INSERT INTO trans_log (id, info) VALUES (3, '{"path": "C:\\users\\ptrowbridge\\downloads\\transsearchcsv(1).csv", "srce": "PNCC", "inserted": null, "time_stamp": "2017-10-25T10:08:11.443367-04:00", "not_inserted": [{"AsOfDate": "2017-10-19"}, {"AsOfDate": "2017-10-24"}, {"AsOfDate": "2017-10-20"}, {"AsOfDate": "2017-10-23"}, {"AsOfDate": "2017-10-18"}]}'); INSERT INTO trans_log (id, info) VALUES (4, '{"path": "C:\\users\\ptrowbridge\\downloads\\llbal.csv", "srce": "PNCO", "inserted": [{"Loan#": "606780191", "Post Date": "2017-10-23", "Effective Date": "2017-10-23"}, {"Loan#": "606780191", "Post Date": "2017-10-24", "Effective Date": "2017-10-24"}], "time_stamp": "2017-10-25T10:13:37.760308-04:00", "not_inserted": [{"Loan#": "606780191", "Post Date": "2017-10-19", "Effective Date": "2017-10-19"}, {"Loan#": "606780191", "Post Date": "2017-10-18", "Effective Date": "2017-10-18"}, {"Loan#": "606780191", "Post Date": "2017-10-20", "Effective Date": "2017-10-20"}]}'); INSERT INTO trans_log (id, info) VALUES (5, '{"path": "C:\\users\\ptrowbridge\\downloads\\llcol.csv", "srce": "PNCL", "inserted": [{"PostDate": "2017-10-24", "Schedule#": "01AR"}, {"PostDate": "2017-10-23", "Schedule#": "01AR"}], "time_stamp": "2017-10-25T10:14:10.004265-04:00", "not_inserted": [{"PostDate": "2017-10-18", "Schedule#": "01AR"}, {"PostDate": "2017-10-17", "Schedule#": "05AR"}, {"PostDate": "2017-10-17", "Schedule#": "MR"}, {"PostDate": "2017-10-20", "Schedule#": "01AR"}, {"PostDate": "2017-10-17", "Schedule#": "03IN Finished Goods"}, {"PostDate": "2017-10-17", "Schedule#": "04AR RS"}, {"PostDate": "2017-10-19", "Schedule#": "01AR"}, {"PostDate": "2017-10-17", "Schedule#": "01AR"}, {"PostDate": "2017-10-17", "Schedule#": "06AR RS"}, {"PostDate": "2017-10-17", "Schedule#": "02IN Raw Material"}]}'); +INSERT INTO trans_log (id, info) VALUES (6, '{"path": "C:\\users\\ptrowbridge\\downloads\\ts.csv", "srce": "PNCC", "inserted": [{"AsOfDate": "2017-10-26"}, {"AsOfDate": "2017-10-25"}], "time_stamp": "2017-10-27T15:41:43.496243-04:00", "not_inserted": [{"AsOfDate": "2017-10-24"}, {"AsOfDate": "2017-10-20"}, {"AsOfDate": "2017-10-23"}]}'); +INSERT INTO trans_log (id, info) VALUES (7, '{"path": "C:\\users\\ptrowbridge\\downloads\\llbal.csv", "srce": "PNCO", "inserted": [{"Loan#": "606780191", "Post Date": "2017-10-26", "Effective Date": "2017-10-26"}, {"Loan#": "606780191", "Post Date": "2017-10-25", "Effective Date": "2017-10-25"}], "time_stamp": "2017-10-27T15:45:01.130597-04:00", "not_inserted": [{"Loan#": "606780191", "Post Date": "2017-10-23", "Effective Date": "2017-10-23"}, {"Loan#": "606780191", "Post Date": "2017-10-24", "Effective Date": "2017-10-24"}, {"Loan#": "606780191", "Post Date": "2017-10-20", "Effective Date": "2017-10-20"}]}'); +INSERT INTO trans_log (id, info) VALUES (8, '{"path": "C:\\users\\ptrowbridge\\downloads\\llcol.csv", "srce": "PNCL", "inserted": [{"PostDate": "2017-10-19", "Schedule#": "05AR"}, {"PostDate": "2017-10-19", "Schedule#": "MR"}, {"PostDate": "2017-10-26", "Schedule#": "01AR"}, {"PostDate": "2017-10-19", "Schedule#": "03IN Finished Goods"}, {"PostDate": "2017-10-25", "Schedule#": "01AR"}, {"PostDate": "2017-10-19", "Schedule#": "04AR RS"}, {"PostDate": "2017-10-19", "Schedule#": "06AR RS"}, {"PostDate": "2017-10-19", "Schedule#": "02IN Raw Material"}], "time_stamp": "2017-10-27T15:45:23.417705-04:00", "not_inserted": [{"PostDate": "2017-10-20", "Schedule#": "01AR"}, {"PostDate": "2017-10-24", "Schedule#": "01AR"}, {"PostDate": "2017-10-23", "Schedule#": "01AR"}, {"PostDate": "2017-10-19", "Schedule#": "01AR"}]}'); +INSERT INTO trans_log (id, info) VALUES (9, '{"path": "C:\\users\\ptrowbridge\\downloads\\pt_oct.csv", "srce": "ADPRP", "inserted": [{"adp_comp": "B3X", "pay_date": "171006"}, {"adp_comp": "UDV", "pay_date": "171013"}, {"adp_comp": "UDV", "pay_date": "171027"}, {"adp_comp": "U7E", "pay_date": "171013"}, {"adp_comp": "U7E", "pay_date": "171027"}, {"adp_comp": "UDV", "pay_date": "171020"}, {"adp_comp": "U7C", "pay_date": "171020"}, {"adp_comp": "U7C", "pay_date": "171027"}, {"adp_comp": "U7C", "pay_date": "171013"}, {"adp_comp": "U7C", "pay_date": "171006"}, {"adp_comp": "B3X", "pay_date": "171020"}, {"adp_comp": "U7H", "pay_date": "171027"}, {"adp_comp": "U7J", "pay_date": "171027"}, {"adp_comp": "B3X", "pay_date": "171027"}, {"adp_comp": "U7J", "pay_date": "171013"}, {"adp_comp": "U7H", "pay_date": "171013"}, {"adp_comp": "B3X", "pay_date": "171013"}, {"adp_comp": "UDV", "pay_date": "171006"}], "time_stamp": "2017-10-27T16:01:46.991437-04:00", "not_inserted": null}'); SET search_path = evt, pg_catalog; @@ -139,14 +143,14 @@ SET search_path = tps, pg_catalog; -- Name: trans_id_seq; Type: SEQUENCE SET; Schema: tps; Owner: - -- -SELECT pg_catalog.setval('trans_id_seq', 1544252, true); +SELECT pg_catalog.setval('trans_id_seq', 1598531, true); -- -- Name: trans_log_id_seq; Type: SEQUENCE SET; Schema: tps; Owner: - -- -SELECT pg_catalog.setval('trans_log_id_seq', 5, true); +SELECT pg_catalog.setval('trans_log_id_seq', 9, true); -- diff --git a/ubm_schema.sql b/ubm_schema.sql index 3f19da5..951c434 100644 --- a/ubm_schema.sql +++ b/ubm_schema.sql @@ -383,6 +383,13 @@ CREATE INDEX trans_allj ON trans USING gin (allj); CREATE INDEX trans_rec ON trans USING gin (rec); +-- +-- Name: trans_srce; Type: INDEX; Schema: tps; Owner: - +-- + +CREATE INDEX trans_srce ON trans USING btree (srce); + + -- -- Name: map_rm map_rm_fk_srce; Type: FK CONSTRAINT; Schema: tps; Owner: - -- From e9b185fc05ef85993f7190269ee23088f9817ac7 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 30 Oct 2017 10:37:03 -0400 Subject: [PATCH 10/14] seperate out maps for ach credits vs debits --- map_rm_template.pgsql | 121 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 117 insertions(+), 4 deletions(-) diff --git a/map_rm_template.pgsql b/map_rm_template.pgsql index 1911c37..2cf9acb 100644 --- a/map_rm_template.pgsql +++ b/map_rm_template.pgsql @@ -25,17 +25,18 @@ SET regex = $j$::jsonb WHERE target = 'Strip Amount Commas'; + UPDATE tps.map_rm SET regex = $j$ { - "name":"Parse ACH", + "name":"Parse ACH Credits", "description":"parse select components of the description for ACH Credits Receieved", "defn": [ { "key": "{Description}", - "field":"Comp Name", + "field":"beneficiary", "regex": "Comp Name:(.+?)(?=\\d{6} Com|SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", "retain":"y", @@ -59,7 +60,7 @@ SET regex = }, { "key": "{Description}", - "field":"Cust Name", + "field":"originator", "regex": "Cust Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", "flag":"", "retain":"y", @@ -118,14 +119,110 @@ SET regex = "where": [ { "Transaction":"ACH Credits" + } + ] + } + $j$::jsonb +WHERE target = 'Parse ACH Credits'; + + +UPDATE tps.map_rm +SET regex = + $j$ + { + "name":"Parse ACH Debits", + "description":"parse select components of the description for ACH Credits Receieved", + "defn": [ + { + "key": "{Description}", + "field":"originator", + "regex": "Comp Name:(.+?)(?=\\d{6} Com|SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" }, + { + "key": "{Description}", + "field":"Cust ID", + "regex": "Cust ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, + { + "key": "{Description}", + "field":"Desc", + "regex": "Desc:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, + { + "key": "{Description}", + "field":"beneficiary", + "regex": "Cust Name:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, + { + "key": "{Description}", + "field":"Batch Discr", + "regex": "Batch Discr:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, + { + "key": "{Description}", + "field":"Comp ID", + "regex": "Comp ID:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, + { + "key": "{Description}", + "field":"Addenda", + "regex": "Addenda:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, + { + "key": "{Description}", + "field":"SETT", + "regex": "SETT:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, + { + "key": "{Description}", + "field":"Date", + "regex": "Date:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, + { + "key": "{Description}", + "field":"Time", + "regex": "Time:(.+?)(?=SEC:|Cust ID:|Desc:|Comp Name:|Comp ID:|Batch Discr:|Cust Name:|Addenda:|SETT:|Date:|Time:|$)", + "flag":"", + "retain":"y", + "map":"n" + } + ], + "function":"extract", + "where": [ { "Transaction":"ACH Debits" } ] } $j$::jsonb -WHERE target = 'Parse ACH'; +WHERE target = 'Parse ACH Debits'; UPDATE tps.map_rm SET regex = @@ -158,6 +255,22 @@ SET regex = "retain":"y", "map":"n" }, + { + "key": "{Description}", + "field": "beneficiary", + "regex": "BENEFICIARY:(.*?)AC/\\d* .*(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, + { + "key": "{Description}", + "field": "originator", + "regex": "ORIGINATOR:(.*?)AC/\\d* .*(?=[A-Z]{3,}?:|$)", + "flag":"", + "retain":"y", + "map":"n" + }, { "key": "{Description}", "field": "OBI", From 242ebb8029d32754cd19dd88b5ba202529eb37b4 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Mon, 30 Oct 2017 14:43:04 -0400 Subject: [PATCH 11/14] add a conversion to pay_month --- map_rm_template.pgsql | 45 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/map_rm_template.pgsql b/map_rm_template.pgsql index 2cf9acb..bb90722 100644 --- a/map_rm_template.pgsql +++ b/map_rm_template.pgsql @@ -464,4 +464,47 @@ SET regex = "function": "extract" } $j$::jsonb - WHERE target = 'Check Number'; \ No newline at end of file + WHERE target = 'Check Number'; + + +UPDATE tps.map_rm +SET regex = + $j$ + { + "name":"ADP Codes", + "description":"link to adp code definitions", + "defn": [ + { + "key": "{gl_descr}", + "field": "gl_descr", + "regex": ".*", + "flag":"", + "retain":"n", + "map":"y" + }, + { + "key": "{prim_offset}", + "field": "prim_offset", + "regex": ".*", + "flag":"", + "retain":"n", + "map":"y" + }, + { + "key": "{pay_date}", + "field": "pay_month", + "regex": ".{1,4}", + "flag":"", + "retain":"y", + "map":"n" + } + ], + "function":"extract", + "where": [ + { + } + ] + } + $j$::jsonb +WHERE + target = 'ADP Codes'; \ No newline at end of file From 53bc59a4cbc5329b58d8cee4dd2f7aec47915dfb Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Thu, 2 Nov 2017 15:07:47 -0400 Subject: [PATCH 12/14] add query to give items that have no map but are supposed to be mapped --- loan_bal.pgsql | 8 +- map_rv_items_not_mapped.pgsql | 0 srce_template.pgsql | 133 ++++++++++++++++++++++++++++------ transaction_range.pgsql | 1 + 4 files changed, 116 insertions(+), 26 deletions(-) create mode 100644 map_rv_items_not_mapped.pgsql diff --git a/loan_bal.pgsql b/loan_bal.pgsql index a149817..ec55276 100644 --- a/loan_bal.pgsql +++ b/loan_bal.pgsql @@ -6,9 +6,9 @@ FROM tps.trans LEFT JOIN LATERAL jsonb_populate_record(null::tps.pnco, rec) r ON TRUE WHERE - rec @> '{"Loan#":"606780191"}' + rec @> '{"Loan#":"606780281"}' ORDER BY r."Loan#" - ,r."Post Date" asc - ,rec->>'id' asc - ,r."Reference #" asc + ,r."Post Date" ASC + ,rec->>'id' ASC + ,r."Reference #" ASC \ No newline at end of file diff --git a/map_rv_items_not_mapped.pgsql b/map_rv_items_not_mapped.pgsql new file mode 100644 index 0000000..e69de29 diff --git a/srce_template.pgsql b/srce_template.pgsql index c32ace4..c12c125 100644 --- a/srce_template.pgsql +++ b/srce_template.pgsql @@ -1,39 +1,128 @@ -insert into tps.srce -SELECT -'CAMZ', +UPDATE tps.SRCE + +SET DEFN = $$ { - "name": "CAMZ", - "description":"Chase Amazon Credit Card", - "type": "csv", + "name": "WMPD", + "descr": "Williams Paid File", + "type":"csv", "schema": [ { - "key": "Type", + "key": "Carrier", "type": "text" }, { - "key": "Trans Date", - "type": "date" - }, - { - "key": "Post Date", - "type": "date" - }, - { - "key": "Description", + "key": "SCAC", "type": "text" }, { - "key": "Amount", + "key": "Mode", + "type": "text" + }, + { + "key": "Pro #", + "type": "text" + }, + { + "key": "B/L", + "type": "text" + }, + { + "key": "Pd Amt", "type": "numeric" + }, + { + "key": "Loc#", + "type": "text" + }, + { + "key": "Pcs", + "type": "numeric" + }, + { + "key": "Wgt", + "type": "numeric" + }, + { + "key": "Chk#", + "type": "numeric" + }, + { + "key": "Pay Dt", + "type": "date" + }, + { + "key": "Acct #", + "type": "text" + }, + { + "key": "I/O", + "type": "text" + }, + { + "key": "Sh Nm", + "type": "text" + }, + { + "key": "Sh City", + "type": "text" + }, + { + "key": "Sh St", + "type": "text" + }, + { + "key": "Sh Zip", + "type": "text" + }, + { + "key": "Cons Nm", + "type": "text" + }, + { + "key": "D City ", + "type": "text" + }, + { + "key": "D St", + "type": "text" + }, + { + "key": "D Zip", + "type": "text" + }, + { + "key": "Sh Dt", + "type": "date" + }, + { + "key": "Inv Dt", + "type": "date" + }, + { + "key": "Customs Entry#", + "type": "text" + }, + { + "key": "Miles", + "type": "numeric" + }, + { + "key": "Frt Class", + "type": "text" + }, + { + "key": "Master B/L", + "type": "text" } ], "unique_constraint": { - "type": "key", - "fields": [ - "{Trans Date}" - ,"{Post Date}" + "fields":[ + "{Pay Dt}", + "{Carrier}" ] } } -$$::JSONB \ No newline at end of file +$$::JSONB +WHERE +SRCE = 'WMPD' \ No newline at end of file diff --git a/transaction_range.pgsql b/transaction_range.pgsql index c55a083..75c98b9 100644 --- a/transaction_range.pgsql +++ b/transaction_range.pgsql @@ -1,3 +1,4 @@ +\timing SELECT t.srce ,(ae.e::text[])[1] unq_constr From 7976d6b807dfe21e7fef679fbe3c96e1e0efc254 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 2 Feb 2018 09:37:35 -0500 Subject: [PATCH 13/14] add ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..afe4bb3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/database.json From 9a8a38b11ed90837a85de2fbbb9958823b0c0c25 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 2 Feb 2018 17:34:10 -0500 Subject: [PATCH 14/14] update readme --- build_json.xlsx | Bin 44693 -> 0 bytes coa.md | 31 -------------- readme.md | 105 +++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 104 insertions(+), 32 deletions(-) delete mode 100644 build_json.xlsx delete mode 100644 coa.md diff --git a/build_json.xlsx b/build_json.xlsx deleted file mode 100644 index 0c7022c46c831be8a0cd45e555f8a45e4c1003bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 44693 zcmeEtgLh?LlXjeRY}@EK9ox2@j&0kvZQFLzv2ELS@}+<8%v$rUdFL;fIqR;o*S%F| zpIue^d1{}1>dHz0gCGNd0YCr%01yDUqPoV70|Eeq!U6yw0YCt02v}P=7+N{#D7xAh z+H29cSX$ucfdG-`004dK|KIVy*aPFqy;f^<&_P$gudqQ?0u?1|ZB8L`0`0iXKo_{Y zi7BcfKY!%Sl3MeqoBHdCBBB3~)v{Pd{QAm=M%v$ZTUa^8AjG`FBt4}s@1dxUOlLWt z+S@peQ%WhAn{@++(EzSHJ6S0n*<%M#M!u-gvlQO}KPpi_CSK(B$xlp;&Xl}IKjIW^ zjIrN7+PeW&*(9+sO>l!@&Rp-4q_HgXsycoM+8<$6-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@PPfL>I&ACGGW+LKb4G588S^Outff$6uWq$(TVsm;2`-&4`5*O0&8ks0s*rM zLChd8O0U>{pdvgYKC^02H$w#&VCOoynd*8uTe%va)eJ4QzX22`O;(ryU;+3#Bm7Gq z2dG>Bgf%^nWr`{|_=T(*4hXUmfj~g_?!PuMAd~{2k^YfAi;-#$gV~?ujh3T|89;a$ zsN^kx)Y(&BY^y*JQh@Vs0_siRKoQr!0r$!Or-$Q0m=$OX{1N^WqV;@tKG_nL!kA#i zArDYi0bP35Pja!zkfWuX5B{N2ZekAs>*jz!o96#?c3)6xDbZ8T{gF^H@2Nu{9aTdY5?2|;wK$c;(2lV zCl)X&1~pLO1;+nAdd#_>Gb#o(u+;@75iniR6n;UpFB>)b$pxm)3N7Y577FUkpgL<` zP&6IUQqVpUsuSM@#n%-r1#J~V^XCPyt7aL1><|yMgRZ+ diff --git a/coa.md b/coa.md deleted file mode 100644 index ca7ec47..0000000 --- a/coa.md +++ /dev/null @@ -1,31 +0,0 @@ -Balance Sheet ------------------------ -* Cash - - On-hand - - Hunt Checking - - Hunt Savings -* Prepaid - - Auto Insurance - - Home Insurance -* Investments - - Principle 401k - - Fidelity 401k - - STRS - - PPG 401k - - Norwex SP -* Assets - - Auto Cost - - Auto Depr - - Home -* Credit - - Chase - - Discover - - Kohls - - Lowes - - BestBuy - - Target - - TheHomeDepot -* Mortgage - - Principle - - diff --git a/readme.md b/readme.md index e7c2ac0..aea1511 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,107 @@ -Concepts +Overview +---------------------------------------------- + + +``` + +--------------+ + |csv data | + +-----+--------+ + | + | + v ++----web ui----+ +----func+----+ +---table----+ +|import screen +------> |srce.sql +----------> |tps.srce | <-------------------+ ++--------------+ +-------------+ +------------+ | + |p1:srce | | + |p2:file path | | ++-----web ui---+ +-------------+ +----table---+ | +|create map | |tps.map_rm | +--+--db proc-----+ +|profile +---------------------------------> | | |update tps.trans | ++------+-------+ +-----+------+ |column allj to | + | ^ |contain map data | + | | +--+--------------+ + v foreign key ^ ++----web ui+----+ | | +|assign maps | + | +|for return | +---table----+ | ++values +--------------------------------> |tps.map_rv | | ++---------------+ | +---------------------+ + +------------+ + +``` + +The goal is to: +1. house external data and prevent duplication on insert +2. apply mappings to the data to make it meaningful +3. be able to reference it from outside sources (no action required) + +There are 5 tables +* tps.srce : definition of source +* tps.trans : actual data +* tps.trans_log : log of inserts +* tps.map_rm : map profile +* tps.map_rv : profile associated values + +# tps.srce schema + { + "name": "WMPD", + "descr": "Williams Paid File", + "type":"csv", + "schema": [ + { + "key": "Carrier", + "type": "text" + }, + { + "key": "Pd Amt", + "type": "numeric" + }, + { + "key": "Pay Dt", + "type": "date" + } + ], + "unique_constraint": { + "fields":[ + "{Pay Dt}", + "{Carrier}" + ] + } + } + +# tps.map_rm schema + { + "name":"Strip Amount Commas", + "description":"the Amount field comes from PNC with commas embeded so it cannot be cast to numeric", + "defn": [ + { + "key": "{Amount}", /*this is a Postgres text array stored in json*/ + "field": "amount", /*key name assigned to result of regex/* + "regex": ",", /*regular expression/* + "flag":"g", + "retain":"y", + "map":"n" + } + ], + "function":"replace", + "where": [ + { + } + ] + } + + + + + + + + + + + + +Notes ====================================== pull various static files into postgres and do basic transformation without losing the original document