When using dashboard variable to select a Vertica-field name to select / group by:
a. This functions as expected unless the Vertica field allows and contains any records w/ that field being null
b. I can patch with a coalesce(fieldname,’0_UNKNOWN’) but I find that to be a hack and many queries were already stable using your previous unsigned version
test case: create a table and add a NULL varchar. Table fails to load unless metric is loaded with coalesce as shown. e.g.:
-- fails to load with this row where v1 is VARCHAR
dbadmin=> insert into vtest (ts, set, i1, v1) values (current_timestamp-interval '3 day', 4, 9, null);
-- unless query is set to COALESCE on v1:
SELECT
ts AS "time",
COALESCE(v1,'null') AS metric,
set
FROM public.vtest
WHERE
$__timeFilter(ts)
ORDER BY 1,2
test case: create a table and add a NULL varchar. Table fails to load unless metric is loaded with coalesce as shown. e.g.: -- fails to load with this row where v1 is VARCHAR dbadmin=> insert into vtest (ts, set, i1, v1) values (current_timestamp-interval '3 day', 4, 9, null); -- unless query is set to COALESCE on v1: SELECT ts AS "time", COALESCE(v1,'null') AS metric, set FROM public.vtest WHERE $__timeFilter(ts) ORDER BY 1,2