dbt-labs / dbt-codegen

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

`generate_base_model` should work with seeds #94

Closed elyobo closed 1 year ago

elyobo commented 1 year ago

Describe the feature

Wrapping a base model around a seed is frequently useful, but generate_base_model expects sources onlyl.

Describe alternatives you've considered

Additional context

Not database specific, but I have seeds that are static extracts from other systems that just spit out CSV. I'd rather keep processing of the CSVs to a minimum to make updating them as simple as possible (reexport, reseed, rebuild) and so want to use a base model to e.g. rename unfriendly columns, clean up and retype data etc.

This would also benefit generate_source; a seed is a type of source and the same needs to document and wrap in base models exist.

Who will this benefit?

Users of seeds and base models.

Are you interested in contributing this feature?

Yes, but need guidance.

elyobo commented 1 year ago

Maybe just double documenting these as sources is a reasonable approach, seems to work.

Noted also that using seeds for data is frowned upon and so perhaps the lack of support is deliberate.

github-actions[bot] commented 1 year ago

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.

github-actions[bot] commented 1 year ago

Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.