convert map flag to be at the regex item level
This commit is contained in:
parent
417bdca27d
commit
f88584f835
@ -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;
|
@ -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
|
||||
|
@ -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": [
|
||||
|
12
ubm_data.sql
12
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);
|
||||
|
||||
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user