Why do I need to enable something ?

By default, the Store won't materialize anything. You need to enable the models you want to materialize. We do this to avoid materializing data you don't need : if you are interested by only one dashboard of the store, then you don't need to materialize the whole core_dashboards_store.

How to enable a resource ?

Resource schould be understand as a set of tables required by a dashboard, as a whole mart or as a unique .sql file.

The +enabled: True|False is a DBT's mechanism to enable and disable resources. You schould read the DBT's documentation to learn more about it. It also works for tests and seeds.

Enabling a model is done throught the cssXX.dashboards_store/dbt_project.yml file. To enable a model, simply open the dbt_project.yml file, find the name of the resource you wan't to enable, and switch the +enabled: false key to +enabled: true.

Exemple

Enabling a mart

I have added my seeds to the human resources mart and now want to enable it.

  1. I first open my cssXX.dashboards_data/dbt_project.yml and look for the human_resources resource. I find the following :
models:
  core_dashboards_store:
    marts:
      human_resources:
        +enabled: False
  1. I then toogle the +enabled: False to +enabled: True :
models:
  core_dashboards_store:
    marts:
      human_resources:
        +enabled: True
  1. ...aaaaand it's done.

Enabling a dashboard

Let's say I wan to enable the chronic_absenteism dashboard

  1. I first open my cssXX.dashboards_data/dbt_project.yml and look for the chronic_absenteism resource. I find the following :
models:
  core_dashboards_store:
    dashboards:
      chronic_absenteeism:
        +enabled: False
  1. I then toogle the +enabled: False to +enabled: True :
models:
  core_dashboards_store:
    dashboards:
      chronic_absenteeism:
        +enabled: True

Enabling an interface

To enable an interface, the database must be linked. Please refer to the linking a database section for more information.

Let's say I need to enable the paie interface to materialize the HR mart.

  1. I first open my cssXX.dashboards_data/dbt_project.yml and look for the paie resource. I find the following :
models:
  core_dashboards_store:
    interfaces:
      paie:
        +enabled: False
vars:
  database_paie: "replaceMeWithYourDatabase"
  1. I then replace the database_paie variable with the name of my database (refer to the linking a database section for more information) :
vars:
  database_paie: "dataServer.paie" # The database's name in the warehouse. It will be interpolated in the Interface layer.
  1. I then toogle the +enabled: False to +enabled: True :
models:
  core_dashboards_store:
    interfaces:
      paie:
        +enabled: True
vars:
  database_paie: "dataServer.paie"

Between resources dependencies

A common error, is to enable a model without enabling it's dependencies :

  • For marts, it means enabling a mart, without enabling the interfaces it depends on.
  • For a dashboard it means enabling a dashboard without enabling the marts it's built upon.
The dashboards and marts pages usually specifies their dependencies. When enabling such a resource, make sure you also enable it's upstream dependencies.