Skip to content

[UDFs] support functions in python #12043

@graciegoheen

Description

@graciegoheen

Housekeeping

  • I am a maintainer of dbt-core

Short description

many warehouses support python function (snowflake docs)

this allows users to write functions beyond what SQL can do

Acceptance criteria

  • i can create a function in python
  • i can write python code for the logic of that function
  • the function create statement will specify that the language is python
CREATE OR REPLACE FUNCTION addone(i INT)
  RETURNS INT
  LANGUAGE PYTHON
  RUNTIME_VERSION = '3.9'
  HANDLER = 'addone_py'
AS $$
def addone_py(i):
  return i+1
$$;

Metadata

Metadata

Assignees

Labels

P0UDFsWork related to UDFsuser docs[docs.getdbt.com] Needs better documentation

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions