From 9022affcc711108d6bf99db54d807ab35b12727d Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Sat, 4 Nov 2017 09:52:40 -0400 Subject: [PATCH] add some info queries - listing of maps, and items not mapped --- list_maps.pgsql | 19 +++++++++++++++++++ map_rv_items_not_mapped.pgsql | 0 2 files changed, 19 insertions(+) create mode 100644 list_maps.pgsql create mode 100644 map_rv_items_not_mapped.pgsql diff --git a/list_maps.pgsql b/list_maps.pgsql new file mode 100644 index 0000000..f422e7e --- /dev/null +++ b/list_maps.pgsql @@ -0,0 +1,19 @@ +SELECT + m.srce, + m.target, + regex->>'function' regex_function, + regex->>'where' where_clause, + e.v ->> 'field' result_key_name, + e.v ->> 'key' target_json_path, + e.v ->> 'flag' regex_options_flag, + e.v->>'map' map_intention, + e.v->>'retain' retain_result, + e.v->>'regex' regex_expression, + e.rn target_item_number +FROM + tps.map_rm m + LEFT JOIN LATERAL jsonb_array_elements(m.regex->'defn') WITH ORDINALITY e(v, rn) ON true +ORDER BY + m.srce, + m.target, + e.rn \ No newline at end of file diff --git a/map_rv_items_not_mapped.pgsql b/map_rv_items_not_mapped.pgsql new file mode 100644 index 0000000..e69de29