vscode-dbt-power-user icon indicating copy to clipboard operation
vscode-dbt-power-user copied to clipboard

"generate model" from source should allow some customization

Open Spince opened this issue 2 years ago • 1 comments

Describe the feature

When generating a model it does a few things that we prefer to not do:

  • adds the code to use the proper quotes based on adapter (we don't quote our columns, ever)
  • uses a cte to select * from the source (we list out all our columns explicitly and don't use a select * or cte)

would love to be able to set a flag or something to disable or change the default behavior. the generate model feature is a huge timesaver (even with the needed adjustments afterwards) and this would make things even better!

Describe alternatives you've considered

currently generating the model and removing the unneeded pieces not using the generation feature

Who will benefit?

anyone that doesn't need the quote logic..

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Spince avatar Dec 15 '23 17:12 Spince

also need this option!

one more point, we use sqlfluff for formating without dbt formating and so generated models failed with Undefined jinja template variable: 'adapter'sqlfluff(TMP)

oleg-savko avatar Jan 31 '24 09:01 oleg-savko