From 0e028af435ce3f77e8b495fb27a73685a012191c Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Fri, 1 Jun 2018 13:37:14 -0400 Subject: [PATCH] when setting the map regex, retain the whole json being supplied --- deploy/setup.sql | 2 +- interface/map_def/srce_map_def_set.sql | 2 +- interface/source_maint/srce_build_view.sql | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/setup.sql b/deploy/setup.sql index 9023077..e8cd9d7 100644 --- a/deploy/setup.sql +++ b/deploy/setup.sql @@ -361,7 +361,7 @@ BEGIN --map name ,ae.r->>'name' --map definition - ,ae.r->'regex' + ,ae.r --map aggregation sequence ,(ae.r->>'sequence')::INTEGER --history definition diff --git a/interface/map_def/srce_map_def_set.sql b/interface/map_def/srce_map_def_set.sql index c69abe4..a752dac 100644 --- a/interface/map_def/srce_map_def_set.sql +++ b/interface/map_def/srce_map_def_set.sql @@ -20,7 +20,7 @@ BEGIN --map name ,ae.r->>'name' --map definition - ,ae.r->'regex' + ,ae.r --map aggregation sequence ,(ae.r->>'sequence')::INTEGER --history definition diff --git a/interface/source_maint/srce_build_view.sql b/interface/source_maint/srce_build_view.sql index 5b6710e..faaa464 100644 --- a/interface/source_maint/srce_build_view.sql +++ b/interface/source_maint/srce_build_view.sql @@ -12,7 +12,7 @@ BEGIN _path:= ARRAY['schemas',_schema]::text[]; --_srce:= 'dcard'; SELECT - 'DROP VIEW IF EXISTS tpsv.'||_srce||'_'||_path[2]||'; CREATE VIEW tpsv.'||_srce||'_'||_path[2]||' AS SELECT id, logid, '||string_agg('(allj#>>'''||r.PATH::text||''')::'||r.type||' AS "'||r.column_name||'"',', ')||' FROM tps.trans WHERE srce = '''||_srce||''';' + 'DROP VIEW IF EXISTS tpsv.'||_srce||'_'||_path[2]||'; CREATE VIEW tpsv.'||_srce||'_'||_path[2]||' AS SELECT id, logid, allj, '||string_agg('(allj#>>'''||r.PATH::text||''')::'||r.type||' AS "'||r.column_name||'"',', ')||' FROM tps.trans WHERE srce = '''||_srce||''';' INTO _sql FROM