Dynamically get snapshot strategy using macros

The problem I’m having

using a macro to return the strategy type in a snapshot.

The context of why I’m trying to do this

I want to return the strategy based on a sql query using the macro below

Some example code or error messages

{% snapshot snapshot__dbo_Job_Notes %}
        target_schema = var('snapshot_schema'),
        target_database = var('snapshot_database'),
        tags = ['sedona', 'job','operations', 'org_IA'],
        unique_key = 'item_sk',
        strategy = get_snapshot_strategy('dbo', 'Job_Notes', 'IA'),
        updated_at = 'etl_timestamp',
        check_cols = ['Job_Notes_Id', 'Job_Id', 'Notes', 'Access_Level', 'UserCode', 'Entered_Date', 'Edit_UserCode', 'Edit_Date', 'Note_Type_Id'],
        post_hook = snapshot__post_hook(this)
select * from {{ ref('stg__dbo_Job_Notes') }}
{% endsnapshot %}

I want to return the strategy based on a sql query using the macro below

{% macro get_snapshot_strategy(schema, table, org_code) %}
declare @etl_method as varchar(30) = NULL 
declare @etl_mode as varchar(30) = NULL 
  @etl_method = t.etl_method, 
  @etl_mode = t.etl_mode 
   source_tables t 
  join organizations o on o.org_id = t.org_id 
  and o.org_code = {{org_code}} 
  and o.is_active = 1 
  t.table_source = {{table}} 
  and t.schema_source = {{schema}} 
  and t.is_active = 1 case when @etl_method IS NULL 
  OR @etl_mode IS NULL then return '''' else 
	when @etl_mode = 'Full' then '''check''' 
	else '''timestamp''' end 
  end as result
{% endmacro %}


It’s not possible to set configs of any kind based on the outcome of a SQL query. Because configs are set prior to actually running any sort of SQL query.

Note: @Jeremy Yeo originally posted this reply in Slack. It might not have transferred perfectly.

@a_slack_user Thanks. what i am trying to do is call macro from the strategy field in snapshot. the macro i am calling is what has the SQL. is that possible?