dbt-core icon indicating copy to clipboard operation
dbt-core copied to clipboard

[SL] Add `cache` configuration to `Export` configurations of `SavedQuery`

Open QMalcolm opened this issue 1 year ago • 0 comments

Housekeeping

  • [X] I am a maintainer of dbt-core

Short description

The SavedQuery config is getting a new top level property, cache. This is to to enable semantic layer implementations to setup caching as they see fit. This is being added to the dbt-semantic-interfaces protocol definitions in https://github.com/dbt-labs/dbt-semantic-interfaces/issues/252. The value for the cache key is an object with one attribute (currently) enabled which is either true or false.

Acceptance criteria

  • cache can optionally be specified in the config of SavedQuerys
  • if cache is specified for SavedQuerys in a dbt_project.toml, it is properly inherited
  • if a cache isn't specified, a default cache object is still created with enabled = false

Suggested Tests

  • cache can be specified in a SavedQuery config
  • cache can be specified for a SavedQuery config via the dbt_project.toml
  • the cache defined in yaml for the SavedQuery overrides settings from the dbt_project.toml
  • if no cache is specified, a default one is supplied with enabled = false

Impact to Other Teams

Affects the Cloud Artifacts team as new properties will be present Affects the Semantic Layer team as they need this to be able to implement functionality

Will backports be required?

No

Context

No response

QMalcolm avatar Feb 08 '24 01:02 QMalcolm