[FEAT] Redshift CREATE EXTERNAL FUNCTION support
- Dominant language
- Rust
- Stars
- 13.8k
- Forks
- 2.6k
- Avg merge
- 21h 31m
- Merged PRs (30d)
- 56
Description
**Is your feature request related to a problem? Please describe.**
When `dbtf compile --static-analysis strict` is run in a Redshift project that uses Lambda EXTERNAL FUNCTION UDFs (https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_FUNCTION.html), dbt-fusion throws `error: dbt0209: No function {function_name}` on model files invoking the external function.
**Is your feature request related to a particular component of the dbt Fusion Engine**
- [ ] CLI Features
- [ ] Adapter or Database Driver Features
- [X] SQL Understanding Features
- [ ] VS Code extension
**Describe the solution you'd like**
Not sure what is the best way forward, but either extending REDSHIFT dialect to recognise CREATE EXTERNAL FUNCTION statements and store the function defined, or a way to manually define functions in a variable in `dbt_project.yml` so that dbt-fusion recognizes the external function names?
**Describe alternatives you've considered**
I set `static_analysis = off` to the model files invoking an external function, but it also means that those models cannot be part of the lineage.
**Additional context**
We previously initialized UDFs outside of Lambda, but Redshift doesn't support Python 3 UDFs anymore (June, 30 2026: https://aws.amazon.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/)
Contributor guide
Assessment
This issue has not been assessed yet.