From a01c5c1a04d85f56a7b67bc307d2e6c894d03393 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 25 Oct 2017 15:21:13 -0400 Subject: [PATCH] add mapping template --- map_rm_template.pgsql | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 map_rm_template.pgsql diff --git a/map_rm_template.pgsql b/map_rm_template.pgsql new file mode 100644 index 0000000..5be6c32 --- /dev/null +++ b/map_rm_template.pgsql @@ -0,0 +1,31 @@ +DELETE FROM tps.map_rm where target = 'Strip Amount Commas'; +INSERT INTO +tps.map_rm +SELECT * +FROM +(VALUES + ('PNCC', 'Strip Amount Commas', + $j$ + { + "name":"Strip Amount Commas", + "description":"the Amount field come from PNC with commas embeded so it cannot be cast to numeric", + "defn": [ + { + "key": "{Amount}", + "field": "amount", + "regex": ",", + "replace":"", + "flag":"g", + "retain":"y" + } + ], + "function":"replace", + "map":"no", + "where": [ + { + } + ] + } + $j$::jsonb + , 1) +) x; \ No newline at end of file