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] Always escape column identifiers #541

Merged
merged 6 commits into from
May 2, 2024

Conversation

nathan-artie
Copy link
Contributor

@nathan-artie nathan-artie commented May 2, 2024

Adds a new flag LegacyMode to SnowflakeDialect. In legacy mode reserved column identifiers are lowercased and non-reserved column identifiers are uppercased. In regular mode all column identifiers are uppercased.

@nathan-artie nathan-artie requested a review from Tang8330 May 2, 2024 02:22
@@ -7,7 +7,7 @@ import (
"github.com/artie-labs/transfer/lib/sql"
)

var dialect = sql.SnowflakeDialect{UppercaseEscNames: true}
var dialect = sql.SnowflakeDialect{}
Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't using legacy mode because we don't need to escape any more tables right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, we've been escaping all Snowflake tables for some time.

@nathan-artie nathan-artie merged commit 4ea8b83 into master May 2, 2024
1 check passed
@nathan-artie nathan-artie deleted the nv/always-escape-snowflake branch May 2, 2024 02:36
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