Skip to content

Render functions in the Tera DuckDB extension

Function category

Render

1 function

Render Tera templates with JSON context. Single-function surface; the optional `template_path` argument lets you load templates from disk by name rather than embedding them inline.

tera_render

Scalar function Render
Signature
2 overloaded forms · click to inspect
Arguments (Positional)
Argument template Type VARCHAR Mode Positional Description
Argument varargs Type ANY Mode Positional Description Varargs
Description
1 Inline variable
SELECT tera_render('{{ foo }}', '{"foo":"bar"}');
2 Nested context
SELECT tera_render('Hello {{ user.name }}', '{"user":{"name":"Alice"}}');
3 Disable autoescape
SELECT tera_render('{{ v }}', '{"v":"B&O"}', autoescape := false);
4 Render a named template file
SELECT tera_render('email.html', '{"name":"Alice"}', template_path := './templates/*.html');