With a pre select hook you can run code a WITH
statement before the select block.
{{ block "PRE_SELECT_WITH_HOOKS" . }}
with abc as (SELECT 'a' as column_a, NOW()::date as date)
{{end}}
The defined “temporary tables” cold the be used in the main SELECT block:
{{ block "SELECT" . }}
SELECT
"column_a" as column_aaa,
NOW()::date as date)
FROM
abc
{{end}}
{{ block "CONFIG" . }}
{{end}}
{{ block "SELECT" . }}
SELECT
"column_a" as column_aaa,
NOW()::date as date)
FROM
abc
{{end}}
{{ block "PRE_SELECT_WITH_HOOKS" . }}
with abc as (SELECT 'a' as column_a, NOW()::date as date)
{{end}}