...
CREATE OR REPLACE DATA METRIC FUNCTION
ces_governance.dmfs [db].[schema].duplicate_perc (ARG_T table(ARG_C1 STRING))
RETURNS NUMBER(19,6)
COMMENT = 'Count of duplicate records expressed as a percentage of total unique records'
AS
$$
SELECT
(1-((select count(1) from (select ARG_C1 from ARG_T group by 1 having count(1)>1))
/(select count(1) from ARG_T)))*100
$$;
...
CREATE OR REPLACE DATA METRIC FUNCTION
ces_governance.dmfs [db].[schema].unique_perc (ARG_T table(ARG_C1 STRING))
RETURNS NUMBER(19,6)
COMMENT = 'Count of unique records expressed as a percentage of total records'
AS
'SELECT ((select count(distinct ARG_C1) from ARG_T)/(select count(1) from ARG_T))*100';
...
More DMFs for different dimensions or industries will be added over time.