Skip to content

Commit 50b9c77

Browse files
committed
fix: add update_key to format map in GetFormatMap for source configuration
1 parent e74952b commit 50b9c77

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

core/sling/config.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,9 @@ func (cfg *Config) GetFormatMap() (m map[string]any, err error) {
911911
if cfg.StreamName != "" {
912912
m["stream_name"] = strings.ToLower(cfg.StreamName)
913913
}
914+
if cfg.Source.UpdateKey != "" {
915+
m["update_key"] = cfg.SrcConn.Type.Quote(cfg.Source.UpdateKey)
916+
}
914917
}
915918

916919
if cfg.TgtConn.Type.IsDb() {
@@ -1012,6 +1015,9 @@ func (cfg *Config) GetFormatMap() (m map[string]any, err error) {
10121015
streamScanner := dbio.TypeDbDuckDb.GetTemplateValue("function." + duck.GetScannerFunc(fileFormat))
10131016
m["stream_scanner"] = g.R(streamScanner, "uri", strings.TrimPrefix(uri, "file://"))
10141017
}
1018+
if cfg.Source.UpdateKey != "" {
1019+
m["update_key"] = dbio.TypeDbDuckDb.Quote(cfg.Source.UpdateKey)
1020+
}
10151021
}
10161022
}
10171023

0 commit comments

Comments
 (0)