Skip to content

Commit 2305040

Browse files
authored
Merge pull request #175 from dubravcik/patch-1
fix index with columns containing spaces
2 parents 8c6e576 + a5db63b commit 2305040

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dbt/include/sqlserver/macros/indexes.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ end
132132

133133
{{ log("Creating nonclustered index...") }}
134134

135-
{% set idx_name = this.table + '__index_on_' + columns|join('_') %}
135+
{% set idx_name = this.table + '__index_on_' + columns|join('_')|replace(" ", "_") %}
136136

137137
if not exists(select * from sys.indexes
138138
where

0 commit comments

Comments
 (0)