dbt-labs / dbt-codegen

Macros that generate dbt code
https://hub.getdbt.com/dbt-labs/codegen/latest/
Apache License 2.0
484 stars 106 forks source link

Add generate_base_model_from_ref macro #36

Closed OhadSrur closed 3 years ago

OhadSrur commented 3 years ago

Description & motivation

Add generate_base_model_from_ref macro. PR adjustments following @clrcrl rename suggestion, for cancelled PR #35.

Checklist

clrcrl commented 3 years ago

I'm closing this PR

Since this PR was opened, we've developed stronger opinions about what should go in a package and what shouldn't. We learnt this the hard way, after merging a lot of macro sin dbt-utils, that have become hard to maintain. In general, if we feel that the macro will benefit at least a quarter of the package users, we are open to merging it.

While this code is really good, when I looked at it with that lens, I found it hard to justify merging it: in general, we only write base models on top of sources. The use case where this might come in handy is writing models on top of seeds, however in that case, we tend to instead ensure our seed is already in the structure we want — after all, seeds should only be very-small data!

Thanks so much for the PR, and apologies that I let it go stale. Find me on dbt Slack and I'll try to send some stickers your way!