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

Support skip indexes #358

Open
stephen-up opened this issue Sep 20, 2024 · 1 comment
Open

Support skip indexes #358

stephen-up opened this issue Sep 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@stephen-up
Copy link

Hi, it would be great if dbt-ch supported skip indexes, much like it does projections.

Eg

{{ config(  
  engine='MergeTree()',
  order_by='id,
  materialized='table',
  indexes=[{
    'name': 'minmax_received_ts',
    'column': 'received_ts',
    'type': 'minmax',
    'granularity': '2'
  }],
) }}

That would run statements like

ALTER TABLE {{ this }} ADD INDEX IF NOT EXISTS {{ name }} {{ column }} TYPE {{ type }} GRANULARITY {{ granularity }};
ALTER TABLE {{ this }} MATERIALIZE INDEX {{ name }};

Currently, I have a work around, and define them in post_hooks but it times out sometimes.

Thanks

Is your feature request related to a problem? Please describe.
We have trouble with long run times, poor performance and stability.

Describe the solution you'd like
It would be great if dbt supported skip indexes, like it does projections.

@stephen-up stephen-up added the enhancement New feature or request label Sep 20, 2024
@stephen-up
Copy link
Author

Added in #397

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant