I have an SQL file and inside I set a variable:
SQL
SET var:id_date = cast(from_timestamp(date_sub(date_trunc(\'second\',now()), 1),\'yyyyMMdd\') as int)