Skip to content

Templates

The generation of the final SQL statements is based on Jinja templates. The SQL composer ships with a set of default templates. Additionally one can provide custom templates when executing the program.

Currently, there are two templates for the two supported model types, namely Snowflake tables and truncate-insert procedures.

Custom templates

When you want to provide custom templates, every parameter that is defined for the metadata models can be referenced in the templates. Introducing new parameters might require changes in the backend.

When providing multiple templates store them in the following manner:

|-- <root>
|   |-- <system>
|   |    |-- <object_type>.sql.j2
|   |    |-- <object_type2>.sql.j2

The root directory is what you provide via command line when starting the program. In the metadata models you define the target system as well as the object_type parameters. Based on those settings the SQL composer will try to find the proper template to load.