Numerical variable in Snowflake sql query does not work anymore

numeric variable stopped working recently, not sure if it's after a certain update.

select CURRENT_DATE - INTERVAL '{{lookback_months}} MONTHS'


When hardcoding a number the query works

select CURRENT_DATE - INTERVAL '6 MONTHS'


Or using another date formula works

select dateadd(month, {{lookback_months}}, CURRENT_DATE)


  • Your browser and its version: Chrome 111.0.5563.146
  • Your operating system:OS 12.1
  • The type of database(s) you've connected to Metabase: Snowflake
  • The version of Metabase you're running: v0.46.1

we're fixing that in 46.2

1 Like

thanks!!