add new functions to overview sample document

This commit is contained in:
Paul Trowbridge 2018-03-01 23:39:53 -05:00
parent 1a0799c785
commit 296ad6da68

View File

@ -79,10 +79,10 @@ map definition
SQL SQL
--------------------------------------------- ---------------------------------------------
select SELECT
x.x x.x
from FROM
TPS.srce_map_def_set( tps.srce_map_def_set(
'DCARD'::text, 'DCARD'::text,
'First 20'::text, 'First 20'::text,
$$ { $$ {
@ -121,3 +121,24 @@ assign new key/values to the results of the regular expression, and then back to
| {"f20": "98626 - 200 PUBLIC S"} | Public Sq Parking | Recreation | | | | | {"f20": "98626 - 200 PUBLIC S"} | Public Sq Parking | Recreation | | | |
| {"f20": "ACE HARDWARE HUDSON "} | Ace Hardware | Home Maint | Hudson | Ohio | | | {"f20": "ACE HARDWARE HUDSON "} | Ace Hardware | Home Maint | Hudson | Ohio | |
| {"f20": "ACH CAFE AND STARBUC"} | Starbucks | Restaurantes | | | | | {"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);