From 56fe1df0742b68add8f489986a549f287e6774e9 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 30 May 2018 22:41:50 -0400 Subject: [PATCH] move files to reload and get rid of the rest --- .../dcard/curl_dcard.cmd | 0 .../dcard}/data.csv | 0 .../dcard}/data.json | 0 .../dcard}/mapdef.json | 0 .../dcard}/srce.json | 0 .../dcard}/vals.json | 0 sample_discovercard/curl_mapdef.cmd | 1 - sample_discovercard/curl_mapvals.cmd | 1 - sample_discovercard/curl_srcedef.cmd | 1 - sample_discovercard/definition.md | 157 -------------- sample_discovercard/mapping.md | 169 --------------- .../test_scripts/srce_set_test.sql | 4 - .../test_scripts/test_map_set.sql | 27 --- .../test_scripts/test_map_val_set.sql | 6 - .../test_scripts/test_srce_import.sql | 7 - sample_paycom/srce.json | 193 ------------------ 16 files changed, 566 deletions(-) rename sample_discovercard/curl_import.cmd => reload/dcard/curl_dcard.cmd (100%) rename {sample_discovercard => reload/dcard}/data.csv (100%) rename {sample_discovercard => reload/dcard}/data.json (100%) rename {sample_discovercard => reload/dcard}/mapdef.json (100%) rename {sample_discovercard => reload/dcard}/srce.json (100%) rename {sample_discovercard => reload/dcard}/vals.json (100%) delete mode 100644 sample_discovercard/curl_mapdef.cmd delete mode 100644 sample_discovercard/curl_mapvals.cmd delete mode 100644 sample_discovercard/curl_srcedef.cmd delete mode 100644 sample_discovercard/definition.md delete mode 100644 sample_discovercard/mapping.md delete mode 100644 sample_discovercard/test_scripts/srce_set_test.sql delete mode 100644 sample_discovercard/test_scripts/test_map_set.sql delete mode 100644 sample_discovercard/test_scripts/test_map_val_set.sql delete mode 100644 sample_discovercard/test_scripts/test_srce_import.sql delete mode 100644 sample_paycom/srce.json diff --git a/sample_discovercard/curl_import.cmd b/reload/dcard/curl_dcard.cmd similarity index 100% rename from sample_discovercard/curl_import.cmd rename to reload/dcard/curl_dcard.cmd diff --git a/sample_discovercard/data.csv b/reload/dcard/data.csv similarity index 100% rename from sample_discovercard/data.csv rename to reload/dcard/data.csv diff --git a/sample_discovercard/data.json b/reload/dcard/data.json similarity index 100% rename from sample_discovercard/data.json rename to reload/dcard/data.json diff --git a/sample_discovercard/mapdef.json b/reload/dcard/mapdef.json similarity index 100% rename from sample_discovercard/mapdef.json rename to reload/dcard/mapdef.json diff --git a/sample_discovercard/srce.json b/reload/dcard/srce.json similarity index 100% rename from sample_discovercard/srce.json rename to reload/dcard/srce.json diff --git a/sample_discovercard/vals.json b/reload/dcard/vals.json similarity index 100% rename from sample_discovercard/vals.json rename to reload/dcard/vals.json diff --git a/sample_discovercard/curl_mapdef.cmd b/sample_discovercard/curl_mapdef.cmd deleted file mode 100644 index ff72a98..0000000 --- a/sample_discovercard/curl_mapdef.cmd +++ /dev/null @@ -1 +0,0 @@ -curl -H "Content-Type: application/json" -X POST -d@./mapdef.json http://localhost:81/mapdef_set \ No newline at end of file diff --git a/sample_discovercard/curl_mapvals.cmd b/sample_discovercard/curl_mapvals.cmd deleted file mode 100644 index 56db194..0000000 --- a/sample_discovercard/curl_mapvals.cmd +++ /dev/null @@ -1 +0,0 @@ -curl -H "Content-Type: application/json" -X POST -d@//mnt/c/Users/fleet/Documents/tps_etl/reload/mapval.json http://localhost:81/mapval_set \ No newline at end of file diff --git a/sample_discovercard/curl_srcedef.cmd b/sample_discovercard/curl_srcedef.cmd deleted file mode 100644 index caed4f2..0000000 --- a/sample_discovercard/curl_srcedef.cmd +++ /dev/null @@ -1 +0,0 @@ -curl -H "Content-Type: application/json" -X POST -d@./srce.json http://localhost:81/srce_set \ No newline at end of file diff --git a/sample_discovercard/definition.md b/sample_discovercard/definition.md deleted file mode 100644 index 3fea8bb..0000000 --- a/sample_discovercard/definition.md +++ /dev/null @@ -1,157 +0,0 @@ - -sample data ------------------------------------- - - -| Trans. Date | Post Date | Description | Amount | Category | -| ----------- | --------- | ---------------------------------------------- | ------ | -------------------- | -| 1/2/2018 | 1/2/2018 | GOOGLE *YOUTUBE VIDEOS G.CO/HELPPAY#CAP0H07TXV | 4.26 | Services | -| 1/2/2018 | 1/2/2018 | MICROSOFT *ONEDRIVE 800-642-7676 WA | 4.26 | Services | -| 1/3/2018 | 1/3/2018 | CLE CLINIC PT PMTS 216-445-6249 OHAK2C57F2F0B3 | 200 | Medical Services | -| 1/4/2018 | 1/4/2018 | AT&T *PAYMENT 800-288-2020 TX | 57.14 | Services | -| 1/4/2018 | 1/7/2018 | WWW.KOHLS.COM #0873 MIDDLETOWN OH | -7.9 | Payments and Credits | -| 1/5/2018 | 1/7/2018 | PIZZA HUT 007946 STOW OH | 9.24 | Restaurants | -| 1/5/2018 | 1/7/2018 | SUBWAY 00044289255 STOW OH | 10.25 | Restaurants | -| 1/6/2018 | 1/7/2018 | ACME NO. 17 STOW OH | 103.98 | Supermarkets | -| 1/6/2018 | 1/7/2018 | DISCOUNT DRUG MART 32 STOW OH | 1.69 | Merchandise | -| 1/6/2018 | 1/7/2018 | DISCOUNT DRUG MART 32 STOW OH | 2.19 | Merchandise | -| 1/9/2018 | 1/9/2018 | CIRCLE K 05416 STOW OH00947R | 3.94 | Gasoline | -| 1/9/2018 | 1/9/2018 | CIRCLE K 05416 STOW OH00915R | 52.99 | Gasoline | - - -screen ------------------------------------- - -``` - +---------------+ -Name:|DCARD | - +---------------+ - +---------------+ -Desc:|Discover Card | - +---------------+ - - Col Name Data Type Unique Constraint Flag -+-----------------------------------------------------------------------+ - - +-----------------+ +-------------------+ +---+ - |Trans. Date | |date |\/| | X | - +-----------------+ +-------------------+ +---+ - +-----------------+ +-------------------+ +---+ - |Post Date | |date |\/| | X | - +-----------------+ +-------------------+ +---+ - +-----------------+ +-------------------+ +---+ - |Description | |text |\/| | X | - +-----------------+ +-------------------+ +---+ - +-----------------+ +-------------------+ +---+ - |Amount | |numeric |\/| | | - +-----------------+ +-------------------+ +---+ - +-----------------+ +-------------------+ +---+ - |Category | |text |\/| | | - +-----------------+ +-------------------+ +---+ - - Somehow be able to add more -``` - - -screen builds json --------------------------------------- - - { - "name": "DCARD", - "description":"Discover Card", - "type": "csv", - "schema": [ - { - "key": "Trans. Date", - "type": "date" - }, - { - "key": "Post Date", - "type": "date" - }, - { - "key": "Description", - "type": "text" - }, - { - "key": "Amount", - "type": "numeric" - }, - { - "key": "Category", - "type": "text" - } - ], - "unique_constraint": { - "type": "key", - "fields": [ - "{Post Date}", - "{Trans. Date}", - "{Description}" - ] - } - } - -SQL ---------------------------------------- -SELECT - jsonb_pretty(r.x) -FROM - tps.srce_set( - 'DCARD', - $$ - { - "name": "DCARD", - "description":"Discover Card", - "type": "csv", - "schema": [ - { - "key": "Trans. Date", - "type": "date" - }, - { - "key": "Post Date", - "type": "date" - }, - { - "key": "Description", - "type": "text" - }, - { - "key": "Amount", - "type": "numeric" - }, - { - "key": "Category", - "type": "text" - } - ], - "unique_constraint": { - "type": "key", - "fields": [ - "{Post Date}", - "{Trans. Date}", - "{Description}" - ] - } - } - $$ -) r(x) - -backend handles SQL ------------------------------------ - -`sql = "SELECT tps.srce_set(_name, _json)"` - -`json_return_value = connection.execute(sql)` - -handle json_return_value -* insert: notify and clear? update list of sources on screen? -* could not insert: print reason from json - -import the data ------------------------------------- -SELECT - * -FROM - tps.srce_import('C:\users\fleet\documents\tps_etl\sample_discovercard\data.csv','DCARD') x(message) diff --git a/sample_discovercard/mapping.md b/sample_discovercard/mapping.md deleted file mode 100644 index 9ad012b..0000000 --- a/sample_discovercard/mapping.md +++ /dev/null @@ -1,169 +0,0 @@ - - -regular expression screen ---------------------------------------------- - -``` - +------------------------+----+ - source | DCARD | \/ | - +-----------------------------+ - +-----------------------------+ - new name |First 20 | - +-----------------------------+ - +-----------------------------+ - function | extract(replace) | \/ | - +------------------------+----+ - - - - (each block is a regex, all blocks are concatenated into an array and linked to mapped ^alues) - - first 20 characters - +----------------------------------+ - - +----------------------------------------------------------------------------------------------------+ - + | +-----------------------------+ | - | | Field Name| Description | \/| expressed as jsonb path "{Description}") | - +-------+ | +-----------------------------+ | - | | +-------------------------+ | - + |label of return ^alue |f20 | | - | +-------------------------+ | - | +-------------------------+ | - | regular expression |.{1,20} | supply test run ^alues | - | +-------------------------+ | - | +-------------------------+ | - | replace wit | | | - | +-------------------------+ | - | +---+ | - | Map Results|Y/N| | - | +---+ | - | +---+ | - | Find All Matches| g | | - | +---+ | - | filter(s) | - | +-------------------------------------------+ | - | +----------------+ +----------------+ | - | |Category | |Restaurantes | | - | +----------------+ +----------------+ | - | +----------------+ +----------------+ | - | |Category | |Services | | - | +----------------+ +----------------+ | - | | - +----------------------------------------------------------------------------------------------------+ - -``` - - -map definition ----------------------------------------------------------- - - { - "defn": [ - { - "key": "{Description}", - "map": "y", - "flag": "g", - "field": "f20", - "regex": ".{1,20}", - "retain": "y" - } - ], - "name": "First 20", - "where": [ - {"Category":"Restaurantes"}, - {"Category":"Services"} - ], - "function": "extract", - "description": "pull first 20 characters from description for mapping" - } - -SQL ---------------------------------------------- -SELECT - x.x -FROM - tps.srce_map_def_set( - 'DCARD'::text, - 'First 20'::text, - $$ { - "defn": [ - { - "key": "{Description}", - "map": "y", - "flag": "", - "field": "f20", - "regex": ".{1,20}", - "retain": "y" - } - ], - "name": "First 20", - "where": [ - {} - ], - "function": "extract", - "description": "pull first 20 characters from description for mapping" - } $$::jsonb, - 1::int - ) x(x) - - -assign new key/values to the results of the regular expression, and then back to the underlying row it came from ------------------------------------------------------------------------------------------------------------------ - -| returned from expression | party | reason | city | provice | | -| ------------------------------- | ----------------- | ------------- | ------ | ------- | --- | -| {"f20": "BIG LOTS #00453 STOW"} | Big Lots | Home Supplies | Stow | Ohio | | -| {"f20": "1794MOTHERHOOD #1794"} | Motherhood | Clothes | | | | -| {"f20": "3 PALMS HUDSON OH"} | 3 Palms | Restaurantes | Hudson | Ohio | | -| {"f20": "36241 7-ELEVEN STOW "} | 7-Eleven | Gasoline | Stow | Ohio | | -| {"f20": "7-ELEVEN 36241 STOW "} | 7-Eleven | Gasoline | Stow | Ohio | | -| {"f20": "98626 - 200 PUBLIC S"} | Public Sq Parking | Recreation | | | | -| {"f20": "ACE HARDWARE HUDSON "} | Ace Hardware | Home Maint | Hudson | Ohio | | -| {"f20": "ACH CAFE AND STARBUC"} | Starbucks | Restaurantes | | | | - - -function call to setup a a new map value ---------------------------------------------- -SELECT - x.message -FROM - tps.srce_map_val_set( - 'DCARD' - ,'First 20' - ,'{"f20": "DISCOUNT DRUG MART 3"}'::JSONB - ,'{"party":"Discount Drug Mart","reason":"groceries"}'::JSONB - ) x(message); - -function call to re-run all the maps for a source ----------------------------------------------------- - -SELECT - x.message -FROM - tps.srce_map_overwrite('DCARD') x(message); - - - -mass insert ------------------------------------------------------- - -INSERT INTO - tps.map_rv -SELECT - * -FROM - ( - VALUES - ('DCARD','First 20','{"f20": "DISCOUNT DRUG MART 3"}','{"party":"Discount Drug Mart","reason":"groceries"}'), - ('DCARD','First 20','{"f20": "TARGET STOW OH"}','{"party":"Target","reason":"groceries"}'), - ('DCARD','First 20','{"f20": "WALMART GROCERY 800-"}','{"party":"Walmart","reason":"groceries"}'), - ('DCARD','First 20','{"f20": "CIRCLE K 05416 STOW "}','{"party":"Circle K","reason":"gasoline"}'), - ('DCARD','First 20','{"f20": "TARGET.COM * 800-591"}','{"party":"Target","reason":"home supplies"}'), - ('DCARD','First 20','{"f20": "ACME NO. 17 STOW OH"}','{"party":"Acme","reason":"groceries"}'), - ('DCARD','First 20','{"f20": "AT&T *PAYMENT 800-28"}','{"party":"AT&T","reason":"internet"}'), - ('DCARD','First 20','{"f20": "AUTOZONE #0722 STOW "}','{"party":"Autozone","reason":"auto maint"}'), - ('DCARD','First 20','{"f20": "BESTBUYCOM8055267948"}','{"party":"BestBuy","reason":"home supplies"}'), - ('DCARD','First 20','{"f20": "BUFFALO WILD WINGS K"}','{"party":"Buffalo Wild Wings","reason":"restaurante"}'), - ('DCARD','First 20','{"f20": "CASHBACK BONUS REDEM"}','{"party":"Discover Card","reason":"financing"}'), - ('DCARD','First 20','{"f20": "CLE CLINIC PT PMTS 2"}','{"party":"Cleveland Clinic","reason":"medical"}') - ) x \ No newline at end of file diff --git a/sample_discovercard/test_scripts/srce_set_test.sql b/sample_discovercard/test_scripts/srce_set_test.sql deleted file mode 100644 index 163c6b7..0000000 --- a/sample_discovercard/test_scripts/srce_set_test.sql +++ /dev/null @@ -1,4 +0,0 @@ -SELECT * FROM TPS.SRCE_SET( - $$ - {"name":"dcard","source":"client_file","loading_function":"csv","constraint":["{Trans. Date}","{Post Date}","{Description}"],"schemas":{"default":[{"path":"{Trans. Date}","type":"date","column_name":"Trans. Date"},{"path":"{Post Date}","type":"date","column_name":"Post Date"},{"path":"{Description}","type":"text","column_name":"Description"},{"path":"{Amount}","type":"numeric","column_name":"Amount"},{"path":"{Category}","type":"text","column_name":"Category"}],"mapped":[{"path":"{Trans. Date}","type":"date","column_name":"Trans. Date"},{"path":"{Post Date}","type":"date","column_name":"Post Date"},{"path":"{Description}","type":"text","column_name":"Description"},{"path":"{Amount}","type":"numeric","column_name":"Amount"},{"path":"{Category}","type":"text","column_name":"Category"},{"path":"{party}","type":"text","column_name":"Party"},{"path":"{reason}","type":"text","column_name":"Reason"}]}} - $$::JSONB) \ No newline at end of file diff --git a/sample_discovercard/test_scripts/test_map_set.sql b/sample_discovercard/test_scripts/test_map_set.sql deleted file mode 100644 index e46d91d..0000000 --- a/sample_discovercard/test_scripts/test_map_set.sql +++ /dev/null @@ -1,27 +0,0 @@ -SELECT - * -FROM - tps.srce_map_def_set( - $$ - { - "srce":"dcard", - "sequence":1, - "defn": [ - { - "key": "{Description}", - "map": "y", - "flag": "", - "field": "f20", - "regex": ".{1,20}", - "retain": "y" - } - ], - "name": "First 20", - "where": [ - {} - ], - "function": "extract", - "description": "pull first 20 characters from description for mapping" - } - $$ - ) \ No newline at end of file diff --git a/sample_discovercard/test_scripts/test_map_val_set.sql b/sample_discovercard/test_scripts/test_map_val_set.sql deleted file mode 100644 index 137d537..0000000 --- a/sample_discovercard/test_scripts/test_map_val_set.sql +++ /dev/null @@ -1,6 +0,0 @@ -SELECT - * -FROM - tps.map_rv_set( - $$[{"source":"dcard","map":"First 20","ret_val":{"f20": "DISCOUNT DRUG MART 3"},"mapped":{"party":"Discount Drug Mart","reason":"groceries"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "TARGET STOW OH"},"mapped":{"party":"Target","reason":"groceries"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "WALMART GROCERY 800-"},"mapped":{"party":"Walmart","reason":"groceries"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "CIRCLE K 05416 STOW "},"mapped":{"party":"Circle K","reason":"gasoline"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "TARGET.COM * 800-591"},"mapped":{"party":"Target","reason":"home supplies"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "ACME NO. 17 STOW OH"},"mapped":{"party":"Acme","reason":"groceries"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "AT&T *PAYMENT 800-28"},"mapped":{"party":"AT&T","reason":"internet"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "AUTOZONE #0722 STOW "},"mapped":{"party":"Autozone","reason":"auto maint"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "BESTBUYCOM8055267948"},"mapped":{"party":"BestBuy","reason":"home supplies"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "BUFFALO WILD WINGS K"},"mapped":{"party":"Buffalo Wild Wings","reason":"restaurante"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "CASHBACK BONUS REDEM"},"mapped":{"party":"Discover Card","reason":"financing"}},{"source":"dcard","map":"First 20","ret_val":{"f20": "CLE CLINIC PT PMTS 2"},"mapped":{"party":"Cleveland Clinic","reason":"medical"}}]$$::jsonb - ) \ No newline at end of file diff --git a/sample_discovercard/test_scripts/test_srce_import.sql b/sample_discovercard/test_scripts/test_srce_import.sql deleted file mode 100644 index 2a2e224..0000000 --- a/sample_discovercard/test_scripts/test_srce_import.sql +++ /dev/null @@ -1,7 +0,0 @@ -SELECT - * -FROM - tps.srce_import( - 'dcard' - ,$$[{"Trans. Date":"1/2/2018","Post Date":"1/2/2018","Description":"GOOGLE *YOUTUBE VIDEOS G.CO/HELPPAY#CAP0H07TXV","Amount":4.26,"Category":"Services"},{"Trans. Date":"1/2/2018","Post Date":"1/2/2018","Description":"MICROSOFT *ONEDRIVE 800-642-7676 WA","Amount":4.26,"Category":"Services"},{"Trans. Date":"1/3/2018","Post Date":"1/3/2018","Description":"CLE CLINIC PT PMTS 216-445-6249 OHAK2C57F2F0B3","Amount":200,"Category":"Medical Services"},{"Trans. Date":"1/4/2018","Post Date":"1/4/2018","Description":"AT&T *PAYMENT 800-288-2020 TX","Amount":57.14,"Category":"Services"},{"Trans. Date":"1/4/2018","Post Date":"1/7/2018","Description":"WWW.KOHLS.COM #0873 MIDDLETOWN OH","Amount":-7.9,"Category":"Payments and Credits"},{"Trans. Date":"1/5/2018","Post Date":"1/7/2018","Description":"PIZZA HUT 007946 STOW OH","Amount":9.24,"Category":"Restaurants"},{"Trans. Date":"1/5/2018","Post Date":"1/7/2018","Description":"SUBWAY 00044289255 STOW OH","Amount":10.25,"Category":"Restaurants"},{"Trans. Date":"1/6/2018","Post Date":"1/7/2018","Description":"ACME NO. 17 STOW OH","Amount":103.98,"Category":"Supermarkets"},{"Trans. Date":"1/6/2018","Post Date":"1/7/2018","Description":"DISCOUNT DRUG MART 32 STOW OH","Amount":1.69,"Category":"Merchandise"},{"Trans. Date":"1/6/2018","Post Date":"1/7/2018","Description":"DISCOUNT DRUG MART 32 STOW OH","Amount":2.19,"Category":"Merchandise"},{"Trans. Date":"1/9/2018","Post Date":"1/9/2018","Description":"CIRCLE K 05416 STOW OH00947R","Amount":3.94,"Category":"Gasoline"},{"Trans. Date":"1/9/2018","Post Date":"1/9/2018","Description":"CIRCLE K 05416 STOW OH00915R","Amount":52.99,"Category":"Gasoline"},{"Trans. Date":"1/13/2018","Post Date":"1/13/2018","Description":"AUTOZONE #0722 STOW OH","Amount":85.36,"Category":"Automotive"},{"Trans. Date":"1/13/2018","Post Date":"1/13/2018","Description":"DISCOUNT DRUG MART 32 STOW OH","Amount":26.68,"Category":"Merchandise"},{"Trans. Date":"1/13/2018","Post Date":"1/13/2018","Description":"EL CAMPESINO STOW OH","Amount":6.5,"Category":"Restaurants"},{"Trans. Date":"1/13/2018","Post Date":"1/13/2018","Description":"TARGET STOW OH","Amount":197.9,"Category":"Merchandise"},{"Trans. Date":"1/14/2018","Post Date":"1/14/2018","Description":"DISCOUNT DRUG MART 32 STOW OH","Amount":13.48,"Category":"Merchandise"},{"Trans. Date":"1/15/2018","Post Date":"1/15/2018","Description":"TARGET.COM * 800-591-3869 MN","Amount":22.41,"Category":"Merchandise"},{"Trans. Date":"1/16/2018","Post Date":"1/16/2018","Description":"BUFFALO WILD WINGS KENT KENT OH","Amount":63.22,"Category":"Restaurants"},{"Trans. Date":"1/16/2018","Post Date":"1/16/2018","Description":"PARTA - KCG KENT OH","Amount":4,"Category":"Government Services"},{"Trans. Date":"1/16/2018","Post Date":"1/16/2018","Description":"REMEMBERNHU 402-935-7733 IA","Amount":60,"Category":"Services"},{"Trans. Date":"1/16/2018","Post Date":"1/16/2018","Description":"TARGET.COM * 800-591-3869 MN","Amount":44.81,"Category":"Merchandise"},{"Trans. Date":"1/16/2018","Post Date":"1/16/2018","Description":"TREE CITY COFFEE & PASTR KENT OH","Amount":17.75,"Category":"Restaurants"},{"Trans. Date":"1/17/2018","Post Date":"1/17/2018","Description":"BESTBUYCOM805526794885 888-BESTBUY MN","Amount":343.72,"Category":"Merchandise"},{"Trans. Date":"1/19/2018","Post Date":"1/19/2018","Description":"DISCOUNT DRUG MART 32 STOW OH","Amount":5.98,"Category":"Merchandise"},{"Trans. Date":"1/19/2018","Post Date":"1/19/2018","Description":"U-HAUL OF KENT-STOW KENT OH","Amount":15.88,"Category":"Travel/ Entertainment"},{"Trans. Date":"1/19/2018","Post Date":"1/19/2018","Description":"WALMART GROCERY 800-966-6546 AR","Amount":5.99,"Category":"Supermarkets"},{"Trans. Date":"1/19/2018","Post Date":"1/19/2018","Description":"WALMART GROCERY 800-966-6546 AR","Amount":17.16,"Category":"Supermarkets"},{"Trans. Date":"1/19/2018","Post Date":"1/19/2018","Description":"WALMART GROCERY 800-966-6546 AR","Amount":500.97,"Category":"Supermarkets"},{"Trans. Date":"1/20/2018","Post Date":"1/20/2018","Description":"GOOGLE *GOOGLE PLAY G.CO/HELPPAY#CAP0HFFS7W","Amount":2.12,"Category":"Services"},{"Trans. Date":"1/20/2018","Post Date":"1/20/2018","Description":"LOWE'S OF STOW, OH. STOW OH","Amount":256.48,"Category":"Home Improvement"},{"Trans. Date":"1/23/2018","Post Date":"1/23/2018","Description":"CASHBACK BONUS REDEMPTION PYMT/STMT CRDT","Amount":-32.2,"Category":"Awards and Rebate Credits"},{"Trans. Date":"1/23/2018","Post Date":"1/23/2018","Description":"INTERNET PAYMENT - THANK YOU","Amount":-2394.51,"Category":"Payments and Credits"},{"Trans. Date":"1/27/2018","Post Date":"1/27/2018","Description":"GIANT-EAGLE #4096 STOW OH","Amount":67.81,"Category":"Supermarkets"},{"Trans. Date":"1/27/2018","Post Date":"1/27/2018","Description":"OFFICEMAX/OFFICE DEPOT63 STOW OH","Amount":21.06,"Category":"Merchandise"},{"Trans. Date":"1/27/2018","Post Date":"1/27/2018","Description":"TARGET STOW OH","Amount":71,"Category":"Merchandise"},{"Trans. Date":"1/29/2018","Post Date":"1/29/2018","Description":"NETFLIX.COM NETFLIX.COM CA19899514437","Amount":14.93,"Category":"Services"},{"Trans. Date":"1/30/2018","Post Date":"1/30/2018","Description":"SQ *TWISTED MELTZ KENT OH0002305843011416898511","Amount":16.87,"Category":"Restaurants"},{"Trans. Date":"1/30/2018","Post Date":"1/30/2018","Description":"TARGET STOW OH","Amount":49.37,"Category":"Merchandise"}]$$ - ) \ No newline at end of file diff --git a/sample_paycom/srce.json b/sample_paycom/srce.json deleted file mode 100644 index 7962054..0000000 --- a/sample_paycom/srce.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "name": "paycom", - "source": "client_file", - "loading_function": "csv", - "unique_constraint": { - "type": "key", - "fields": ["{transaction}", "{loc_code}", "{perd_start}", "{perd_end}"] - }, - "schemas": { - "default": [ - { - "key": "perd_start", - "type": "date", - "column_name": "perd_start" - }, - { - "key": "perd_end", - "type": "date", - "column_name": "perd_end" - }, - { - "key": "check_date", - "type": "date", - "column_name": "check_date" - }, - { - "key": "loc_code", - "type": "text", - "column_name": "loc_code" - }, - { - "key": "loc_descr", - "type": "text", - "column_name": "loc_descr" - }, - { - "key": "loc_glseg", - "type": "text", - "column_name": "loc_glseg" - }, - { - "key": "loc_over", - "type": "text", - "column_name": "loc_over" - }, - { - "key": "dep_code", - "type": "text", - "column_name": "dep_code" - }, - { - "key": "dep_descr", - "type": "text", - "column_name": "dep_descr" - }, - { - "key": "dep_nat", - "type": "text", - "column_name": "dep_nat" - }, - { - "key": "dep_over", - "type": "text", - "column_name": "dep_over" - }, - { - "key": "di_code", - "type": "text", - "column_name": "di_code" - }, - { - "key": "di_descr", - "type": "text", - "column_name": "di_descr" - }, - { - "key": "di_glseg", - "type": "text", - "column_name": "di_glseg" - }, - { - "key": "di_over", - "type": "text", - "column_name": "di_over" - }, - { - "key": "title_code", - "type": "text", - "column_name": "titel_code" - }, - { - "key": "title_descr", - "type": "text", - "column_name": "title_descr" - }, - { - "key": "title_glseg", - "type": "text", - "column_name": "title_glseg" - }, - { - "key": "title_over", - "type": "text", - "column_name": "title_over" - }, - { - "key": "ee_code", - "type": "text", - "column_name": "ee_code" - }, - { - "key": "ee_glseg", - "type": "text", - "column_name": "ee_glseg" - }, - { - "key": "ee_over", - "type": "text", - "column_name": "ee_over" - }, - { - "key": "acct_type_code", - "type": "text", - "column_name": "acct_type_code" - }, - { - "key": "hours", - "type": "numeric", - "column_name": "hours" - }, - { - "key": "nat_code", - "type": "text", - "column_name": "nat_code" - }, - { - "key": "nat_over", - "type": "text", - "column_name": "nat_over" - }, - { - "key": "gl_ref", - "type": "text", - "column_name": "gl_ref" - }, - { - "key": "gl_group", - "type": "text", - "column_name": "gl_group" - }, - { - "key": "gl_descr", - "type": "text", - "column_name": "gl_descr" - }, - { - "key": "gl_code", - "type": "text", - "column_name": "gl_code" - }, - { - "key": "gl_amount", - "type": "numeric", - "column_name": "gl_amount" - }, - { - "key": "pp_code", - "type": "text", - "column_name": "pp_code" - }, - { - "key": "pp_descr", - "type": "text", - "column_name": "pp_descr" - }, - { - "key": "pp_gl", - "type": "text", - "column_name": "pp_gl" - }, - { - "key": "pp_over", - "type": "text", - "column_name": "pp_over" - }, - { - "key": "transaction", - "type": "text", - "column_name": "transaction" - } - ] - } -}