create_nonclustered_index macro does not check for index name length #317
Labels
enhancement
New feature or request
feature: essential
good first issue
Good for newcomers
Size: Small
Milestone
I get the following error:
Failed to execute query. Error: The identifier that starts with 'test__index_on_person_id_includes_l1234567_source_value_gender_concept_id_l_source_collection_elt_loaded_at_race_conce' is too long. Maximum length is 128.
When executing:
{{
config({
"materialized": 'table',
"as_columnstore": False,
"post-hook": [
"{{ create_nonclustered_index(columns = ['person_id'], includes = ['l1234567_id_source_value', 'gender_concept_id','l1234567_source_collection','elt_loaded_at','race_concept_id','hospital_id_source_value' ]) }}",
]
})
}}
The create_nonclustered_index macro does not check the length of the index name:
{% set idx_name = (this.table + '__index_on_' + columns|join('_')|replace(" ", "_") + '_includes_' + includes|join('_')|replace(" ", "_")) %}
So when there are too many included columns, the index name is too long.
The text was updated successfully, but these errors were encountered: