Jinja is a templating language widely used in many domains, including web development and data engineering. At dbt Labs, we extensively use Jinja to enable dynamic SQL rendering via the dbt fusion engine, a popular data transformation tool. However the flexibility of Jinja templates (i.e., lack of types) can lead to errors in the rendered SQL code, which can be costly to debug and fix. To address this issue, we present the design and implementation of TypeJinja: a typed version of the Jinja language and its integration with the dbt fusion engine. TypeJinja statically analyzes Jinja templates and their context to detect type errors, before rendered SQL code ends up being used, providing developers with early feedback. Furthermore, TypeJinja is designed to be extensible, allowing it to be adapted to different use cases. We have evaluated TypeJinja on our codebase and found 30 previously unknown type errors, demonstrating its effectiveness in improving code quality and reducing debugging effort. TypeJinja is now part of the publicly available GitHub repository that hosts the dbt fusion engine.