While creating a UDF in databricks SQL, how can I declare a local variable?
Something like this?
CREATE OR REPLACE FUNCTION len()
set myString = 'my value';
RETURNS INT
RETURN length(myString);
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-09-2023 06:26 AM
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-15-2023 11:02 PM
Hi @Ravi Vā
Great to meet you, and thanks for your question!
Let's see if your peers in the community have an answer to your question. Thanks.