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

Python models and external materialisation #300

Closed
Nintorac opened this issue Dec 1, 2023 · 4 comments
Closed

Python models and external materialisation #300

Nintorac opened this issue Dec 1, 2023 · 4 comments

Comments

@Nintorac
Copy link
Contributor

Nintorac commented Dec 1, 2023

Python models do not respect the external materialisation flag and fall back to model

@jwills
Copy link
Collaborator

jwills commented Dec 3, 2023

IIRC this is a dbt limitation: https://docs.getdbt.com/docs/build/materializations#python-materializations

...but yes, we should likely update the external materialization to signal that this will not work as the user probably intended it.

@AlexanderVR
Copy link
Contributor

Python models have their materialization set to table by default. You can override this within the python model definition by setting dbt.config(materialization="external")

Unfortunately you can't do the override from yaml, as reported in this bug:
dbt-labs/dbt-core#8520

@Nintorac
Copy link
Contributor Author

Nintorac commented Jan 3, 2024

oh awesome, thanks!

@Nintorac Nintorac closed this as completed Jan 3, 2024
@devmessias
Copy link

Hi @AlexanderVR and @Nintorac, I've fixed this bug in this PR dbt-labs/dbt-core#8538, but I think it got lost in the limbo of PRs. Perhaps if more people comment on the PR, the dbt-core team might review it.

Note: I tested this PR on a dbt fork for my company and it worked in our pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants