Many thanks in advance.
I'm looking to use Snowflake to share sensitive data as a provider. I can securely share the data via a secure UDF on a share, but I'd feel more comfortable if I could measure how many rows a consumer queries.
I.e. I want to know the size of the output table when the example UDTF (below) is called:
CREATE OR REPLACE SECURE FUNCTION CLIENT_ACCESS
(INPUT_RECORDID STRING, INPUT_LOOKUP INTEGER)
RETURNS TABLE
(RECORDID STRING, LOOKUP INTEGER, SENSITIVE_DATA STRING)
AS
$$
Select INPUT_RECORDID AS RECORDID, PROVIDER_DATA.* FROM
<DB>.<SCHEMA>.SHARED_DATA PROVIDER_DATA
WHERE
PROVIDER_DATA.LOOKUP = INPUT_LOOKUP
$$;
Does Snowflake measure consumer usage to this granularity? If so, how can I access the information? If not, how could I measure this within the UDF?
Bonus Points (and boundless thanks) if I can measure the size of the column inputs too.