dbt-labs / dbt-semantic-interfaces

The shared semantic layer definitions that dbt-core and MetricFlow use.
Apache License 2.0
71 stars 14 forks source link

[Feature] Add config block to saved queries to flag a saved query as enabled/disabled for the declarative cache. #237

Open Jstein77 opened 10 months ago

Jstein77 commented 10 months ago

Is this your first time submitting a feature request?

Describe the feature

Declarative Cache The Declarative Cache stores saved queries that a user specifies (declares) in the data warehouse. The basic flow for populating and reading from this cache is:

- Saved Query → Orchestration → Build table → Same Query → Select * from table

The declarative cache will be specified in the config object under a saved query. This gives us the benefit of defaulting to all saved queries being cached or not and for that flag to be flipped the other way in any given saved query.

saved_queries:
  - name: my_query
      description:
      query_params:
          *...*
      exports:
          *...*
    config:
      cache:
        enabled: true|false

This allows us to keep a clean distinction for an export which is not under our management vs. a cache that is purely under our management.

Describe alternatives you've considered

No response

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response