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

Why does generate_source skip writing schema_name if it matches the source name? #108

Closed davesgonechina closed 1 year ago

davesgonechina commented 1 year ago

https://github.com/dbt-labs/dbt-codegen/blob/46586eae319543ad7c57c47bd8ba1da7ebe2f953/macros/generate_source.sql#L34-L36

I'm experimenting with modifying generate_source to preserve existing descriptions if they already exist in the graph, and because a source yaml file generated with this macro sometimes lacks a schema_name field I am writing conditional logic to select source nodes from the graph based on the schema or instead the source_name if schema does not exist, rather than just schema every time, or also changing generate_source to always write schema_name no matter what.

Was the choice to skip populating schema_name made because it was considered redundant bloat, or were there other reasons?

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.

davesgonechina commented 1 year ago

bump, still curious about this