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

snowflake: add option to ignore null values in schema evolution #3211

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

rockwotj
Copy link
Collaborator

Mor options! This allows folks to include nulls when managing the
schema. If you are managing the schema explicitly (ie. using a schema in
schema registry) this can make a lot of sense, by default we expect
people to just throw data at the connector and we should just drop nulls
because we don't know what type the column will eventually be.

@rockwotj rockwotj force-pushed the null_schema branch 2 times, most recently from 4ff37d7 to cbf9ee4 Compare February 26, 2025 02:10
Copy link
Collaborator

@mihaitodor mihaitodor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one tiny typo :) :shipit:

@@ -121,6 +122,7 @@ ALTER TABLE t1 ADD COLUMN a2 NUMBER;
`),
service.NewObjectField(ssoFieldSchemaEvolution,
service.NewBoolField(ssoFieldSchemaEvolutionEnabled).Description("Whether schema evolution is enabled."),
service.NewBoolField(ssoFieldSchemaEvolutionIgnoreNulls).Description("If `true`, then new columns that are `null` are ignored and schema evolution is not triggered. If `false` then null columns trigger schema migrations in Snowflake. NOTE: unless you already know what type this column will be in advanced, it's highly encouraged to ignore null values.").Default(true).Advanced(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: advanced -> advance

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch :)

Mor options! This allows folks to include nulls when managing the
schema. If you are managing the schema explicitly (ie. using a schema in
schema registry) this can make a lot of sense, by default we expect
people to just throw data at the connector and we should just drop nulls
because we don't know what type the column will eventually be.
@rockwotj rockwotj merged commit 95261f3 into redpanda-data:main Feb 26, 2025
4 checks passed
@rockwotj rockwotj deleted the null_schema branch February 26, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants