# Template slot

> In Emolysis, a template slot is a named, typed placeholder in a pipeline template, such as the business key or the watermark column.

In Emolysis, a template slot is a named, typed placeholder in a pipeline template, such as the business key in an [SCD Type 2](https://emolysis.com/shapes/scd2) template or the [watermark](https://emolysis.com/glossary/watermark) column in an [Incremental append](https://emolysis.com/shapes/incremental-append) template.

For example, an SCD Type 2 template might declare a slot `business_key` of type `columns`, a slot `tracked_columns` of type `columns`, a slot `effective_from` of type `expression` and a slot `target` of type `table`. Asked to keep the history of customer addresses, the agent fills `target` and `business_key` from your catalog, where it can see the table and its key, takes the tracked columns from your request, and asks you only where the effective date should come from. The template file itself does not change; only the slot values do.

Typed slots keep generated code inside known limits. A `table` slot accepts only a table reference, an `integer` slot only a whole number and an `enum` slot only one of its listed values, so a value of the wrong kind is rejected before any code is rendered, rather than producing a query that fails on the platform or, worse, runs and does the wrong thing. Values are rendered in the target platform's dialect, so quoting and escaping follow that platform's rules.

Because the template and its tests are fixed and only the slots vary, the template's golden tests stay meaningful for every pipeline built from it: the fixtures exercise the template's logic, and the slot values decide which tables and columns that logic applies to. See also [platform profile](https://emolysis.com/glossary/platform-profile), [natural key](https://emolysis.com/glossary/natural-key) and [golden test](https://emolysis.com/glossary/golden-test).

The agent shows the filled slots before it renders anything, so you can check the key and the tracked columns in one place. See also [SCD Type 2](https://emolysis.com/glossary/scd-type-2) and [watermark](https://emolysis.com/glossary/watermark).

Slot types include table, column, columns, expression, duration and enum, so a value cannot land in the wrong place. The agent fills slots from your catalog and request, and asks you only for what is missing. See [Templates and slots](https://emolysis.com/docs/templates) for all eleven types.

---

Page: https://emolysis.com/glossary/template-slot. Emolysis is a product of Bandpey GmbH, Munich, Germany. It is in private development, and nothing is released yet.
