Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cannot Update DynamicTable #1168

Open
2 tasks done
kds1010 opened this issue Aug 14, 2024 · 1 comment
Open
2 tasks done

[Bug] Cannot Update DynamicTable #1168

kds1010 opened this issue Aug 14, 2024 · 1 comment
Labels

Comments

@kds1010
Copy link

kds1010 commented Aug 14, 2024

Is this a new bug in dbt-snowflake?

  • I believe this is a new bug in dbt-snowflake
  • 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 kds1010 added bug Something isn't working triage labels Aug 14, 2024
@amychen1776
Copy link

@kds1010 I'm struggling to recreate this issue. Per your message - does this mean that you create a dynamic table, successfully created it on the initial run and then subsequent runs, it fails? That error message seems specific to a column name.

Would you be able to provide a sample of your dynamic table code? Did you also change from a different materialization (like table) over to dynamic table?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants