Skip to content

Commit

Permalink
try and exclude column names with hyphens
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal committed Dec 13, 2024
1 parent 0a8fa90 commit 54d9b05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flow/shared/schema_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"log/slog"
"maps"
"slices"
"strings"

"go.temporal.io/sdk/log"

Expand Down Expand Up @@ -52,7 +53,7 @@ func BuildProcessedSchemaMapping(
columns := make([]*protos.FieldDescription, 0, len(tableSchema.Columns))
pkeyColumns := make([]string, 0, len(tableSchema.PrimaryKeyColumns))
for _, column := range tableSchema.Columns {
if !slices.Contains(mapping.Exclude, column.Name) {
if !slices.Contains(mapping.Exclude, column.Name) && !strings.Contains(column.Name, "-") {
columns = append(columns, column)
}
if slices.Contains(tableSchema.PrimaryKeyColumns, column.Name) &&
Expand Down

0 comments on commit 54d9b05

Please sign in to comment.