Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-3086] [Feature] Add "name" to Postgres index configuration #52

Open
3 tasks done
pscanlon1 opened this issue Sep 6, 2023 · 3 comments
Open
3 tasks done

[CT-3086] [Feature] Add "name" to Postgres index configuration #52

pscanlon1 opened this issue Sep 6, 2023 · 3 comments
Labels
enhancement New feature or request help_wanted Extra attention is needed

Comments

@pscanlon1
Copy link

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Can we add the "name" config to Postgres index configuration in DBT? I have been using it but when it creates a hashed index name, it fails when I try and combine this with hasura. I would like to override the default index config to supply my own unique name for an index.

Describe alternatives you've considered

Writing a script that runs after DBT runs to rename the index

Who will this benefit?

everyone using Postgres and graphql

Are you interested in contributing this feature?

I could try with some direction

Anything else?

No response

@pscanlon1 pscanlon1 added enhancement New feature or request triage labels Sep 6, 2023
@github-actions github-actions bot changed the title [Feature] Add "name" to Postgres index configuration [CT-3086] [Feature] Add "name" to Postgres index configuration Sep 6, 2023
@dbeatty10
Copy link
Contributor

We'd be open to your suggestion to making the name of an index configurable @pscanlon1.

I'm labeling this as help_wanted to indicate that we're reserving this for you or another community member to submit a PR to implement this feature request.

I created a proof-of-concept for some of the relevant code changes in dbt-labs/dbt-core#8656 (which also describes a couple key test cases).

You can create own PR using it as a guide.

The most time-consuming part is likely to be implementing the relevant functional tests.

@dbeatty10 dbeatty10 added help_wanted Extra attention is needed and removed triage labels Sep 16, 2023
@dbeatty10 dbeatty10 transferred this issue from dbt-labs/dbt-core Apr 10, 2024
@bdewilde
Copy link

I have a related feature request (implementation-wise), though for different reasons: Postgres indexes have other configurable options besides name, columns, uniqueness, and type, and they are super useful in certain cases. In my case, I've sometimes needed to specify the "nulls [not] distinct" and "where" options, which aren't available via dbt's model "indexes" config, so have had to find workarounds. Would dbt-postgres be interested in supporting additional index configuration, or are y'all trying to limit the complexity here? Thanks for your consideration! 🙇‍♂️

@dbeatty10
Copy link
Contributor

@bdewilde in general, we prefer to limit complexity wherever possible. But we're also trying to enable & empower where it's practical. So often a tricky set of trade-offs!

We'd be open to consider specifying the "nulls [not] distinct" and "where" options, etc. if you are willing to open up separate issue(s) for them (including describing any workarounds you've utilized instead).

That said, expanding configuration of indexes in dbt-postgres isn't very high on our list and we might not be able to assess those feature requests in a timely manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help_wanted Extra attention is needed
Projects
None yet
3 participants