Replies: 1 comment
-
|
I posted the same post here: #12492 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
dbt Core 1.11 introduced support for user-defined functions via the
functions:resource. However, current support is limited to scalar and aggregate functions.Snowflake supports UDTFs (User-Defined Table Functions) using:
There is currently no way to define and manage such table-returning functions declaratively using dbt’s
functions:configuration.As a result, users must:
run-operationon-run-starthooksThis breaks consistency with how scalar and aggregate UDFs are managed.
Proposal
Extend the
functions:resource to support a newtype(e.g.,table) and structured return schema definition.Example YAML:
This would compile to:
Benefits
Use Case
In financial analytics environments, UDTFs are frequently used to:
SELECT * FROM TABLE(function(...)))Summary
Adding first-class support for table-returning UDTFs would complete dbt’s UDF functionality for Snowflake and improve consistency, governance, and maintainability for advanced SQL use cases.
Beta Was this translation helpful? Give feedback.
All reactions