Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Python Materialization for dbt-postgres and dbt-core #10496

Closed
1 of 2 tasks
PratikshaPanpaliya opened this issue Jul 29, 2024 · 2 comments
Closed
1 of 2 tasks
Labels
enhancement New feature or request python_models wontfix Not a bug or out of scope for dbt-core

Comments

@PratikshaPanpaliya
Copy link

PratikshaPanpaliya commented Jul 29, 2024

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

Running a simple Python module (Postgres) gives
Materialization "materialization_table_default" only supports languages ['sql']; got "python"
While creating python model which is connecting to Greenplum (Postgres Adapter)

and I have the following versions
`Core:

installed: 1.8.4
latest: 1.8.4 - Up to date!
Plugins:

postgres: 1.8.2
dbt-python
sqlalchemy

Expected Behavior

expect not to see this error as python should be supported!

Steps To Reproduce

I have added information in the body of the issue above

Relevant log output

No response

Environment

- OS:
- Python:
- dbt:

Which database adapter are you using with dbt?

No response

Additional Context

NA

@PratikshaPanpaliya PratikshaPanpaliya added bug Something isn't working triage labels Jul 29, 2024
@dbeatty10 dbeatty10 added enhancement New feature or request and removed bug Something isn't working labels Jul 29, 2024
@dbeatty10 dbeatty10 changed the title [Bug]Python Materialization for dbt-postgres and dbt-core [Feature] Python Materialization for dbt-postgres and dbt-core Jul 29, 2024
@dbeatty10
Copy link
Contributor

Thanks for reaching out @PratikshaPanpaliya !

dbt Python models are only supported on Snowflake, Databricks, and BigQuery/GCP. The reason for those platforms specifically is that they all have a mechanism for the Python code to use the compute resources of the platform itself.

This isn't the case for Redshift and Python, so that is why neither dbt-redshift nor dbt-postgres support dbt Python models. So I'm closing this issue as "not planned".

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 29, 2024
@dbeatty10 dbeatty10 added wontfix Not a bug or out of scope for dbt-core and removed triage labels Jul 29, 2024
@derycck
Copy link

derycck commented Jan 11, 2025

You can use an old version of DBT core with the 'dbt-fal' adapter to support python-models in the postgres database.

You should be aware that the dbt-fal adapter was discontinued in September/2023.
So although it allows you to use python-models in postgres, you will never have access to the new DBT features.

In a legacy project, I use the requirements below:

  • dbt-postgres==1.5.5
  • dbt-fal[postgres]

With this, I can use python-models in a postgres database.
But be aware that this is not being maintained.
https://github.com/fal-ai/dbt-fal


There was an attempt to continue the dbt-fal adapter. But since April/2024 there are no updates. With compatibility with dbt-core 1.7.17.
https://github.com/kudryk/dbt-postgres-python


If you know of another adapter that supports python-model in a postgres database, please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python_models wontfix Not a bug or out of scope for dbt-core
Projects
None yet
Development

No branches or pull requests

3 participants