looker-health-vacuum

“looker-health-vacuum” provides a set of commands to audit and identify unused LookML objects in a Looker instance.

About

The looker-health-vacuum tool helps you identify unused LookML objects such as models, explores, joins, and fields. The action parameter selects the type of vacuum to perform:

  • models: Identifies unused explores within a model.
  • explores: Identifies unused joins and fields within an explore.

Parameters

fieldtyperequireddescription
actionstringtrueThe vacuum to perform: models, or explores.
projectstringfalseThe name of the Looker project to vacuum.
modelstringfalseThe name of the Looker model to vacuum.
explorestringfalseThe name of the Looker explore to vacuum.
timeframeintfalseThe timeframe in days to analyze for usage. Defaults to 90.
min_queriesintfalseThe minimum number of queries for an object to be considered used. Defaults to 1.

Example

Identify unnused fields (in this case, less than 1 query in the last 20 days) and joins in the order_items explore and thelook model

tools:
  health_vacuum:
    kind: looker-health-vacuum
    source: looker-source
    description: |
      health-vacuum Tool

      This tool suggests models or explores that can removed
      because they are unused.

      It accepts 6 parameters:
        1. `action`: can be "models" or "explores"
        2. `project`: the project to vacuum (optional)
        3. `model`: the model to vacuum (optional)
        4. `explore`: the explore to vacuum (optional)
        5. `timeframe`: the lookback period in days, default is 90
        6. `min_queries`: the minimum number of queries to consider a resource as active, default is 1

      The result is a list of objects that are candidates for deletion.
fieldtyperequireddescription
kindstringtrueMust be “looker-health-vacuum”
sourcestringtrueLooker source name
descriptionstringtrueDescription of the tool that is passed to the LLM.