Add ability to configure index names #8656
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves dbt-labs/dbt-postgres#52
This is a proof-of-concept to implement the feature request in dbt-labs/dbt-postgres#52.
I don't personally plan to take this one over the finish line, so will rely on @pscanlon1 or someone else to create their own PR using this as a guide.
TODO
Along with a PR, make sure that this documentation is updated to add the index
name
config:https://docs.getdbt.com/reference/resource-configs/postgres-configs#indexes
Test case 1
models/my_model_index_name.sql
Test case 2
See #8655
models/my_mv_index_name.sql
Now alter the
columns
definition:models/my_mv_index_name.sql
And re-run it again and make sure the index was altered appropriately:
Problem
Solution
Checklist