Skip to content

Commit 68726cd

Browse files
committed
docs(snowflake): secure functions
1 parent 4b384b7 commit 68726cd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/content/docs/snowflake/features/user-defined-functions.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,20 @@ SELECT sample_func('foobar');
140140
```
141141

142142
The result of the query is `echo: foobar`.
143+
144+
## Secure Functions
145+
146+
Secure UDFs are user-defined functions that protect sensitive information and prevent unauthorized users from viewing function definitions, underlying data, or implementation details.
147+
148+
LocalStack supports Secure UDFs, allowing you to tests sensitive data privacy & security controls. To create a Secure UDF, you need to use the `SECURE` keyword in the `CREATE FUNCTION` statement.
149+
150+
```sql
151+
CREATE OR REPLACE FUNCTION secure_func(x VARCHAR)
152+
RETURNS VARCHAR
153+
LANGUAGE PYTHON
154+
RUNTIME_VERSION='3.8' HANDLER='secure_func'
155+
AS $$
156+
def secure_func(i):
157+
return 'echo: ' + i
158+
$$;
159+
```

0 commit comments

Comments
 (0)