duckdb/dbt-duckdb

Python models and external materialisation

Nintorac opened this issue · 4 comments

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

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.

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

oh awesome, thanks!

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.