Set session variables before running source freshness

The problem I’m having

Source freshness giving errors for sources that needs a session variable to be set before running the source.
I’m running dbt in Snowflake and the source is a view

The context of why I’m trying to do this

Source freshness

What I’ve already tried

  • tried setting source_freshness_run_project_hooks to True and using on-run-start, but didn’t work. I believe on-run-start doesn’t run in the same session as the source freshness queries

Some example code or error messages

14:26:10    Database Error in source stripe_test2 (models/01_raw/test.yml)
  002037 (42601): SQL compilation error:
  Failure during expansion of view 'STRIPE_TEST': SQL compilation error: error line 4 at position 39
  Session variable '$START_DATE' does not exist

I’m reading the documentation and maybe the sql_headers param from models might work , however this parameter is not enabled for source configs