dbt-sqlserver icon indicating copy to clipboard operation
dbt-sqlserver copied to clipboard

Creating indexes in the indexes section of a model config

Open semcha opened this issue 3 years ago • 4 comments

Implementation of #163

  • [x] clustered / nonclustered indexes
  • [x] row-store (b-tree) / columnstore indexes
  • [x] uniqueness (UNIQUE) for row-store indexes (clustered and nonclustered)
  • [x] nonclustered row-store index may have included columns: INCLUDE (col1, col2)
  • [x] data compression: ROW / PAGE compression for row-store and COLUMNSTORE / COLUMNSTORE_ARCHIVE for columnstore
  • [x] partitioning (partition schema name and partition column)

semcha avatar Dec 18 '21 23:12 semcha

Hi @swanderz! It takes 4-5 days to test, but I'm ready to accept suggestions/edits 🚀

semcha avatar Dec 19 '21 00:12 semcha

Am I correct to think that this PR introduces the possibility to create a unique non-clustered index, which wasn't possible before?

This would be very useful for us!

NicolasPA avatar Jan 03 '22 11:01 NicolasPA

@NicolasPA Yep, of course:

indexes=[
    {'type': 'nonclustered', 'columns': ['customer_id'], 'unique': True}
]

semcha avatar Jan 03 '22 14:01 semcha

Should be rebased on latest master

sdebruyn avatar May 22 '22 10:05 sdebruyn