Skip to main content

Templated Variables

These are useful to produce consistent query output when defining data transformations and materializing data through Views. These are not available during ad-hoc querying.

VariableDescriptionData TypeExample
@start_ts A placeholder that is used to encode the start date of the data being ingestedDatetimeSELECT timestamp, value from table_1 where timestamp ≥ @start_ts;
@end_tsA placeholder that is used to encode the start date of the data being ingestedDatetimeSELECT timestamp, value from table_1 where timestamp ≤ @end_ts;
@timezoneA placeholder used to specify the timezone for the timestamp columnStringSELECT timestamp AT TIMEZONE @timezone FROM table_1;
@execution_tsUsed to encode the date and time at which point the query is being executed. This is used specifically in Full Refresh Materialization to add an upper cap on timestamp columnDatetimeSELECT timestamp, value from table_1 where timestamp ≤ @execution_ts;