We've been using shared data analyses in production for three years. Here's how you can create reusable templates for common metrics and analyses.
Our friend Benn Stancil recently wrote a great post about templates — his term for sharable, pre-built dashboards and reports. Do yourself a favor and read it.
Templates do seem inevitable: the concept of reusable code is something software developers have relied on for literally decades. It's fundamental to how all software is built. The data community has been borrowing best practices from the software world since the beginning, from version control in Git to staging environments to testing. But we still can't use their single most powerful technique.
Each time an analyst switches jobs they have to rebuild the same metrics from scratch. Even if they've done it (lots of times) before, the data is so different that the SQL needs to be fully rewritten. Software engineers would just call a function like monthly_recurring_revenue(data) and move on with their lives.
At this point it's literally easier to set up a data warehouse and populate it from scratch than it is to get a single metric into production.