get rid of bad maps
This commit is contained in:
parent
30da16dd0a
commit
2829887a57
@ -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;
|
Loading…
Reference in New Issue
Block a user