Open mike-weinberg opened 5 months ago
I've asked the engineering team to take a look. Here's some shots in the dark in the interim.
SnowflakeDynamicTableConfig.init() missing 1 required positional argument: 'snowflake_warehouse'
SnowflakeDynamicTableConfig
macro dynamic_table_get_build_sql()
SnowflakeDynamicTableConfig
that make use of snowflake_warehouse
that you might want to look at (and add logs/prints)
dynamic_table_get_build_sql
causes the error? the closer you can get us to the error, the easier to solve.-d
debug flag (dbt -d run ...
) give you any more information?WOO thank you i can take a look at some of these, much appreciated @dataders !
hi! ok little status update:
'developer__small' if not target=='prod' else '__svc__prod__transformations__small'
works like a charm (and is a viable albeit tedious workaround){% set warehouse = get_warehouse('small') %}
and then referencing that in the config, yields the same error. extra
aspect of configs are parsed)so the things I know are:
so from all of these things I suspect that this has to do with differences in how the extra config is used for snowflake dynamic tables which differs from how this is used for other materialization types, namely grabbing it from the top level of a standard config, which appears (after digging) to be part of the BaseAdapter
class as part of its class init method.
I might be way way off base here but it seems like these differences in how snowflake warehouse is initialized results in a difference in how they are parsed, such that one can use macros and the other cannot.
I wondered if this is a partial parsing issue, so i tried running a dbt clean
first. that made no difference.
So unless I drop out of dbt cloud and start mucking with dbt itself, I am a little stuck. If you have suggestions for how to develop on DBT itself, I'd love to do some sort of intro session to developing on dbt.
@mike-weinberg taking a look into this, what dbt version are you using?
@colin-rogers-dbt Running into this as well on v1.8.3
Is this your first time submitting a feature request?
Describe the feature
in most materialization types in snowflake, i can use a macro for dynamically switching what warehouse is in use based on if i am in dev or prod. it seems that when i try this in a DT materialization, I get an error.
eg:
works fine.
yields an error like the following sanitized error:
unfortunately i cannot figure out exactly what the problem is, but it is notable that this config comes from the
extra
part of thedbt_adapter
repo's contract inrelation.py
I assume this has something to do with the parser but tbh that's all black magic to me.
Describe alternatives you've considered
No response
Who will this benefit?
dynamic table users for whom their company requires separation of warehouses between production and dev and use a macro in order to dispatch based on what environment they're in.
Are you interested in contributing this feature?
happily, i just need direction =))))
Anything else?
No response