I’m looking to modify config values to the dynamic table materialization depending on the environment/profile being used. This materialization gets these settings via config, so I want create a custom materialization that just modifies the config values and then call the real materialization. Everything works except it doesn’t seem like there is a way to modify config values within the context of a macro.
I know I can create a macro that sets the config values, but I’d like to keep the config definition the same and just intercept so developers on my project don’t have to remember to use the custom macro.
Is there a way to pass a new config object when calling the materialization?
What I’ve already tried
config.set('target_lag', '15 minutes')
Simple example
This is conceptually what I want to do.
{%- materialization custom_dynamic_table, adapter='snowflake' -%}
-- just hard-coding to keep it simple, but there would be logic to determine the right setting here
{% config.set('target_lag', '15 minutes') %}
-- Call the built-in dynamic table materialization
{{ materialization_dynamic_table_snowflake() }}
{%- endmaterialization -%}