https://slingdata.io logo
Hi, i am working on ELT to postgres -
# sling-help
i
Hi, i am working on ELT to postgres - looking at this example : I have a unique key that is composite of 2 columns . If I understand correctly - this will create two indexes: 1. One for col1 and One for col2 my_schema.another_table: target_options: table_keys: index: [col1, col2]
f
@itamar s a new feature is in the works to make this easier, will come next release. In upcoming release, you'll be able to do
index: [[col1, col2]]
For now you can use
target_options.table_ddl
for compiste index.
i
Thanks
@flarco Hi, i tested it and it works when you use one line. target_options: add_new_columns: false column_casing: snake table_keys: primary: [[user_id,brand_id]] when i use only the index: [[user_id,brand_id]] it works , when using primary or unique i get error: --- datatype.go:388 SetKeys --- could not set primary key. Did not find column available: ["id","user_id","brand_id"," Thanks
@flarco Hi, are the primary and unique are going to be adjust to work as well? or should i use hooks to create if not exist? Thanks
i guessed you miss that, I want to know if to wait for it or change my code...
f
hi @itamar s yes apologies, this will be added into next release, the PK will accept the same as index
Unique as well
i
@flarco Hi when will be the next release ?
f
Hey @itamar s releasing today
i
@flarco thanks 🙂
@flarco hi it seems that unique doesnt work well. it still create seperated Also is there an option to set the ASC or DESC ?
f
@itamar s try with 1.5.22