From 08c95d1595f8cc2c7d1020b2fa3af60192c2f24b Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Tue, 19 Sep 2017 10:37:53 -0400 Subject: [PATCH] add files clean up --- map_rm.pgsql | 40 ++++++++++++++++++++++++++++++++++++++++ srce.pgsql | 42 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 map_rm.pgsql create mode 100644 srce.pgsql diff --git a/map_rm.pgsql b/map_rm.pgsql new file mode 100644 index 0000000..99eaf3a --- /dev/null +++ b/map_rm.pgsql @@ -0,0 +1,40 @@ +SELECT +jsonb_pretty( +$$ +{ + "defn": [ + { + "key": "{Description}", + "field": "ini", + "regex": "([\\w].*?)(?=$| -|\\s[0-9].*?|\\s[\\w/]+?:)" + }, + { + "key": "{Description}", + "field": "compn", + "regex": "Comp Name:(.+?)(?=$| Comp|\\w+?:)" + }, + { + "key": "{Description}", + "field": "adp_comp", + "regex": "Cust ID:.*?(B3X|UDV|U7E|U7C|U7H|U7J).*?(?=$|\\w+?:)" + }, + { + "key": "{Description}", + "field": "desc", + "regex": "Desc:(.+?) Comp" + }, + { + "key": "{Description}", + "field": "discr", + "regex": "Discr:(.+?)(?=$| SEC:|\\w+?:)" + } + ], + "type": "extract", + "where": [ + { + "Transaction": "ACH Debits" + } + ] +} +$$::jsonb +) \ No newline at end of file diff --git a/srce.pgsql b/srce.pgsql new file mode 100644 index 0000000..cec92cd --- /dev/null +++ b/srce.pgsql @@ -0,0 +1,42 @@ +SELECT +jsonb_pretty( +$$ +{ + "name": "GOOGDM", + "type": "json_csv", + "schema": { + "rows": [ + { + "elements": [ + { + "status": "text", + "distance": { + "text": "text", + "value": "numeric" + }, + "duration": { + "text": "text", + "value": "value" + } + } + ] + } + ], + "status": "text", + "origin_addresses": [ + "text" + ], + "destination_addresses": [ + "text" + ] + }, + "unique_constraint": { + "type": "key", + "fields": [ + "{origin_adresses,0}", + "{destination_adresses,0}" + ] + } +} +$$::jsonb +) \ No newline at end of file