dbt-snowflake icon indicating copy to clipboard operation
dbt-snowflake copied to clipboard

[Bug] Cannot Update DynamicTable

Open kds1010 opened this issue 6 months ago • 1 comments

Is this a new bug in dbt-snowflake?

  • [X] I believe this is a new bug in dbt-snowflake
  • [X] I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When apply dbt run to an existing model materialized = 'dynamic_table, it fails with following error message:

 SnowflakeDynamicTableConfig.__init__() missing 6 required positional arguments: 'name', 'schema_name', 'database_name', 'query', 'target_lag', and 'snowflake_warehouse'
  
  > in macro dynamic_table_get_build_sql (macros/materializations/dynamic_table.sql)
  > called by macro materialization_dynamic_table_snowflake (macros/materializations/dynamic_table.sql)
  > called by model XXXXXX

Expected Behavior

Generate alter XXXX command to update the configuration. After the investigation, I've found that it seems this query returns column name with uppercase but here refers it as lowercase and it returns None for necessary configurations.

Steps To Reproduce

  1. Deploy a model with materialized = 'dynamic_table'
  2. Run again

Relevant log output

No response

Environment

- OS: Ubuntu 22.04
- Python: 3.11
- dbt-core: 1.8.5
- dbt-snowflake: 1.8.3

Additional Context

No response

kds1010 avatar Aug 14 '24 07:08 kds1010