Templating
Rill uses the Go programming language's native templating engine, known as text/template
, which you might know from projects such as Helm or Hugo. It additionally includes the Sprig library of utility functions.
Example
Access an environment variable provided using rill start --env key=value
:
SELECT * FROM my_source WHERE foo = '{{ .env.key }}'
Useful resources
- Official docs (Go)
- Learn Go Template Syntax (HashiCorp)
- Sprig Function Documentation