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

Add ENABLE_SCHEMA_EVOLUTION flag for snowflake_table resource. #2676

Open
RenanBasilio opened this issue Apr 4, 2024 · 3 comments
Open

Add ENABLE_SCHEMA_EVOLUTION flag for snowflake_table resource. #2676

RenanBasilio opened this issue Apr 4, 2024 · 3 comments
Labels
category:resource feature-request Used to mark issues with provider's missing functionalities resource:table Issue connected to the snowflake_table resource

Comments

@RenanBasilio
Copy link

RenanBasilio commented Apr 4, 2024

Terraform CLI and Provider Versions

Terraform: 1.7.4
Provider: 0.87.2

Use Cases or Problem Statement

Our company maintains snowpipes and their target tables via the snowflake terraform provider. Some of these pipelines including evolving schemas, and we'd like to use Snowflake's built in schema evolution features to handle this.

This means we often have to create the tables via terraform and then subsequently run an ALTER TABLE statement in Snowflake in order to enable schema evolution, or skip using terraform for those tables entirely.

Proposal

The provider should support setting the property enable_schema_evolution during table creation.

The table should be initialized by terraform with the initial column configuration provided and with the enable_schema_evolution flag set.

This flag being set should also set the lifecycle rule to ignore changes to nested column attributes, as these may be added or modified externally by Snowflake schema evolution. This last step could be done either implicitly or explicitly.

How much impact is this issue causing?

Medium

Additional Information

No response

@RenanBasilio RenanBasilio added the feature-request Used to mark issues with provider's missing functionalities label Apr 4, 2024
@sfc-gh-asawicki
Copy link
Collaborator

Hey @RenanBasilio. Thanks for reaching out to us.

Have you considered using https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes?

@RenanBasilio
Copy link
Author

The issue isn't with the inability to ignore changes, so much so as the option to enable schema evolution not being available when creating the table via the provider.

@sfc-gh-asawicki
Copy link
Collaborator

We will support the missing param as part of https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#supporting-all-snowflake-ga-features. I will share a more concrete ordering of resources we will tackle in the next two weeks.

sfc-gh-asawicki added a commit that referenced this issue May 7, 2024
- Add missing parameters (References #2676)
- Temporary fix the warehouse resource behavior; it will be addressed
with the warehouse redesign because the existing conditional logic is
questionable and we plan to get rid of the defaults (SNOW-1348102)
(References #2763)
- Prove data type problem with functions; it will be addressed with
function redesign because it requires deeper refactor (SNOW-1348103)
(References #2735)
- Suppress the diff for synonym columns in table resource; it will be
addressed with table redesign because the collate test had to be skipped
(SNOW-1348114) (References #2733)
@sfc-gh-jcieslak sfc-gh-jcieslak added resource:table Issue connected to the snowflake_table resource category:resource labels May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:resource feature-request Used to mark issues with provider's missing functionalities resource:table Issue connected to the snowflake_table resource
Projects
None yet
Development

No branches or pull requests

3 participants