Parameters & Templating
What templating exists today, what’s deprecated, and what works in SQL vs programmatic query APIs.
Sidemantic supports templating in a narrow place: parameter interpolation in filter strings for programmatic queries.
Warning
The SQL interface does not interpolate {{ ... }}.
What Exists Today
- Filter templating in programmatic
query/compileflows. - You register parameters on the graph (Python) and pass
parametersvalues.
Example:
sql = layer.compile(
metrics=["orders.revenue"],
dimensions=["orders.status"],
filters=["orders.order_date >= {{ start_date }}"],
parameters={"start_date": "2024-01-01"},
)
What’s Deprecated
- “Template parameters” are deprecated as a general feature and are intentionally constrained.
Why README Mentions Jinja2
Sidemantic uses Jinja2 as the templating engine for the supported interpolation path (filters). It is not a guarantee that every interface or SQL string supports templating.
Migration Guidance
- If you’re using
{{ ... }}in semantic SQL: move that logic into programmatic query filters or into your warehouse views/models.