diff --git a/macros/multiple_databases/create_index.sql b/macros/multiple_databases/create_index.sql new file mode 100644 index 0000000..855666b --- /dev/null +++ b/macros/multiple_databases/create_index.sql @@ -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 -%}