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

[CT-1679] Python Materialization #6459

Closed
2 tasks done
reletreby opened this issue Dec 19, 2022 · 3 comments
Closed
2 tasks done

[CT-1679] Python Materialization #6459

reletreby opened this issue Dec 19, 2022 · 3 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@reletreby
Copy link

reletreby commented Dec 19, 2022

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 (Amazon Redshift) gives

Materialization "materialization_table_default" only supports languages ['sql']; got "python"

The model I am running is
def model(dbt,session): dbt.config(materialized="table") return session.sql("select 'hello world' as message")

and I run it as
pipenv run dbt run --models intermediate.python_models.python_template --target qa

and I have the following versions
`Core:

  • installed: 1.3.1
  • latest: 1.3.1 - Up to date!

Plugins:

  • redshift: 1.3.0 - Up to date!
  • postgres: 1.3.1 - Up to date!`

Expected Behavior

I 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: Mac OSX M1
- Python: 3.8.16
- dbt:1.3.1
- Amazon Redshift

Which database adapter are you using with dbt?

No response

Additional Context

No response

@reletreby reletreby added bug Something isn't working triage labels Dec 19, 2022
@github-actions github-actions bot changed the title Python Materialization [CT-1679] Python Materialization Dec 19, 2022
@owenprough-sift
Copy link

https://docs.getdbt.com/docs/build/python-models#supported-data-platforms

In their initial launch, Python models are supported on three of the most popular data platforms: Snowflake, Databricks, and BigQuery/GCP (via Dataproc).

Is this issue therefore "please bring Python models to Redshift"?

@dbeatty10
Copy link
Contributor

Is this issue therefore "please bring Python models to Redshift"?

That's what I'm hearing @owenprough-sift 😎

Thanks for opening this issue @reletreby ! As noted by @owenprough-sift above, we don't currently support Python models in Redshift, and that is why you are getting that error message.

We do have an issue open for adding Python models, so I'm going to close this one as a duplicate. You can subscribe to it if you want to get notifications (see screenshot below for how to subscribe):

Go to dbt-labs/dbt-redshift#204 and click this button on the right hand side of your screen to subscribe:
image

@dbeatty10 dbeatty10 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2022
@arybach
Copy link

arybach commented Dec 30, 2022

From docs:
"In a dbt Python model, all Python code is executed remotely on the platform. None of it is run by dbt locally. We believe in clearly separating model definition from model execution".
Is there a way to specify where python code is run (at least for testing purposes) or pass an archive similar to aws lambda function setup?
This would be my next issue after postgres support is live)

@jtcohen6 jtcohen6 added duplicate This issue or pull request already exists and removed triage labels Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants