Skip to content

Commit 95e208f

Browse files
committed
Fix Snowflake resync failure due to case mismatch in _resync table suffix (#4184)
The resync suffix was appended in lowercase ("_resync"), producing mixed-case identifiers like "ACCOUNTS_resync". However, getColsFromTable() in qrep.go unconditionally applied strings.ToUpper(), converting it to "ACCOUNTS_RESYNC". Since Snowflake treats quoted identifiers as case-sensitive, the table lookup failed with "does not exist". Fix in Snowflake's getColsFromTable: replace the unconditional strings.ToUpper with snowflakeSchemaTableNormalize so quoted mixed-case identifiers are looked up consistently with how they are created. The shared cdc_flow.go is left untouched since the suffix handling is a Snowflake-specific concern.
1 parent 6d9c248 commit 95e208f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

flow/connectors/snowflake/qrep.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func (c *SnowflakeConnector) getColsFromTable(ctx context.Context, tableName str
184184
return nil, fmt.Errorf("failed to parse table name: %w", err)
185185
}
186186

187-
fq := fmt.Sprintf("%s.%s", strings.ToUpper(schemaTable.Namespace), strings.ToUpper(schemaTable.Table))
187+
fq := snowflakeSchemaTableNormalize(schemaTable)
188188

189189
channel := make(chan string, 1)
190190
ctxWithOpt := gosnowflake.WithQueryIDChan(ctx, channel)

0 commit comments

Comments
 (0)