diff --git a/sample_discovercard/mapping.md b/sample_discovercard/mapping.md index e53d4a0..4d7fb8b 100644 --- a/sample_discovercard/mapping.md +++ b/sample_discovercard/mapping.md @@ -79,10 +79,10 @@ map definition SQL --------------------------------------------- -select +SELECT x.x -from - TPS.srce_map_def_set( +FROM + tps.srce_map_def_set( 'DCARD'::text, 'First 20'::text, $$ { @@ -120,4 +120,25 @@ assign new key/values to the results of the regular expression, and then back to | {"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 | | | | \ No newline at end of file +| {"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); \ No newline at end of file