dbt-postgres-python is the easiest way to run Python with your dbt project.
Introduction - 📖 README
dbt-postgres-python is only supporting the adapter originally developed by dbt-fal going forward (i.e. CLI will be dropped) and only for Postgres.
With the Python adapter, you can:
- Enable a developer-friendly Python environment for Postgres.
- Use Python libraries such as
sklearnorprophetto build more complexdbtmodels including ML models.
My work team has been using dbt-fal and have found it very useful. The FAL team in
April, 2024 chose to stop maintaining dbt-fal -- thank you very much for starting this effort. I've decided to pick it
up to try to keep it current with DBT itself, but only for the functionality my team needs.
This fork (Cleaning-the-Glass/dbt-postgres-python) contains additional modifications for use in CTG projects.
Problem: The upstream fal package pins cloudpickle==3.0.0, which conflicts with other dependencies in downstream projects.
Solution: Removed the fal PyPI package dependency entirely since we don't use fal serverless/cloud execution features.
Changes made:
- Removed
falfrompyproject.tomldependencies - Added
isolateas a direct dependency (was previously a transitive dep offal) - Simplified
fal_experimental/adapter.py,fal_experimental/teleport.py, andfal_experimental/utils/environments.pyto only support local execution - Non-local environment kinds now raise
NotImplementedError
Impact:
- ✅ Core adapter functionality (
type: fal+db_profile) works as before - ✅ Local Python model execution works as before
- ❌ fal serverless/cloud execution is no longer supported (was never used by CTG)
- ✅ No more
cloudpickle==3.0.0constraint in downstream projects