Discussed in #743
Originally posted by igrpon May 26, 2026
There is index key in table_keys section, however - is there a way to define several indexes on different set of columns ?
Currently it is like this (ref: #225 or https://docs.slingdata.io/concepts/replication/target-options)
streams:
my_stream:
target_options:
table_keys:
index: [col1, col2]
I want to:
streams:
my_stream:
target_options:
table_keys:
index:
- index1: [col1, col2]
- index2: [col3]
Maybe there are some YAML tricks or not-documented way to do so ? Tried several options - nothing works :(
(sling accepts if I put severl index keys, but only the first index is created, others are skipped)
ALSO:
I suggest loose validation and checks sling does on list of columns in index: [col1, col2] - currently only defined & known columns are allowed, however - in Postgres & other DBs it is possible to define expression indexes - indexes that are based on functions/expressions from columns data. E.g.
CREATE INDEX ind_expressoion ON table (LOWER( CONCAT(col1, col2) ))
this is blocked by sling - sling checks if the expression LOWER( CONCAT(col1, col2) ) is existing column, but this is 100% correct
@flarco - I think it's better to issue a WARN here, but not block SQL execution (or add some CLI / YAML option to allow that)
Thank you!
Discussed in #743
Originally posted by igrpon May 26, 2026
There is
indexkey intable_keyssection, however - is there a way to define several indexes on different set of columns ?Currently it is like this (ref: #225 or https://docs.slingdata.io/concepts/replication/target-options)
I want to:
Maybe there are some YAML tricks or not-documented way to do so ? Tried several options - nothing works :(
(sling accepts if I put severl
indexkeys, but only the first index is created, others are skipped)ALSO:
I suggest loose validation and checks sling does on list of columns in
index: [col1, col2]- currently only defined & known columns are allowed, however - in Postgres & other DBs it is possible to define expression indexes - indexes that are based on functions/expressions from columns data. E.g.this is blocked by sling - sling checks if the expression
LOWER( CONCAT(col1, col2) )is existing column, but this is 100% correct@flarco - I think it's better to issue a WARN here, but not block SQL execution (or add some CLI / YAML option to allow that)
Thank you!