waqas
waqas

Reputation: 49

Data Sharing How can I share a UDF with a reader account?

I am setting up a data share for a user and would like to also give them access to a UDF as well.

I can share the data with the account like this: create it and share warehouse and database

CREATE DATABASE shared_db1 FROM SHARE ab12345.share1;
GRANT USAGE ON WAREHOUSE testing_vw TO ROLE PUBLIC;
GRANT IMPORTED PRIVILEGES ON DATABASE shared_db1 TO ROLE PUBLIC;

Can I do the same for the UDF object

GRANT USAGE ON UDFobject TO ROLE PUBLIC;

Is there a special privilege I need to set up for the consumer account?

Upvotes: 0

Views: 186

Answers (1)

Suzy Lockwood
Suzy Lockwood

Reputation: 1170

I believe you can share UDFs but only if it's a secure UDF. Here's a couple links to review: https://docs.snowflake.net/manuals/sql-reference/udf-secure.html https://www.snowflake.com/blog/the-power-of-secure-user-defined-functions-for-protecting-shared-data/

Upvotes: 1

Related Questions