Codegen for dbt

TLDR: We’ve released another new package, codegen.


In our recent guide to how we structure our dbt projects, you may have noticed we really like code that follows a pattern. And wherever there’s a pattern, chances are, there’s an opportunity for automation!

Introducing our newest package, codegen! This package creates valid YAML and SQL for some of our repetitive tasks, like creating yaml for Sources, and generating “base models”.

The interface for these right now is a little clunky – you call the macro as a run-operation, and then copy and paste the results from the command line into your project. But I’m already using this regularly and have found it really speeds up my development workflows!

Here it is in action:

There’s lots more to do on this front (I’ve even already added some issues), PRs are definitely welcome :slight_smile:

2 Likes