Skip to content

Commit

Permalink
feat: implement indexing macro for SQL Server
Browse files Browse the repository at this point in the history
  • Loading branch information
silviustanimir authored and cverhoef committed Aug 10, 2022
1 parent 0adf1b5 commit c4fba9f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions macros/multiple_databases/create_index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{%- macro create_index(source_table) -%}

{%- if target.type == 'sqlserver' -%}
drop index if exists cci on {{ this.database }}.{{ var("schema_sources") }}.{{ source_table }};
create clustered columnstore index cci on {{ this.database }}.{{ var("schema_sources") }}.{{ source_table }};
{%- endif -%}

{%- endmacro -%}

0 comments on commit c4fba9f

Please sign in to comment.