LogoLogo
HomeBlogGet a Demo
  • Introduction
  • Install Lunar
  • Learn the basics
  • 📖Docs
    • Key concepts
    • Component JSON
    • Catalog JSON
    • Lunar CLI Reference
  • 📝Configuration
    • lunar-config.yml
      • catalogers
      • catalogers/hooks
      • domains
      • components
      • collectors
      • collectors/hooks
      • policies
    • lunar.yml
  • 🛠️Plugin SDKs
    • Plugins configuration
      • lunar-cataloger.yml
      • lunar-collector.yml
      • lunar-policy.yml
    • Bash SDK
      • Cataloger
      • Collector
    • Python SDK
      • Collector
      • Policy
        • Check
        • Path
        • ComponentData
        • NoDataError
        • Utility Functions
  • ⚙️SQL API
    • Overview
    • Views
      • domains
      • components
      • component_deltas
      • initiatives
      • policies
      • checks
      • prs
      • catalog
Powered by GitBook

©️ Earthly Technologies

On this page
  • Schema
  • Notes
  • Usage examples
  1. SQL API
  2. Views

initiatives

initiatives

The initiatives view provides information about initiatives in Lunar. Initiatives are collections of policies organized around a specific goal or purpose.

Schema

Column
Type
Description

name

TEXT

The identifier for the initiative

description

TEXT

A description of the initiative

owner

TEXT

The owner of the initiative

config_version

TEXT

The version of the configuration where this initiative is defined

Notes

  • Initiatives are organized collections of policies designed around a specific goal or compliance requirement

  • Each initiative can contain multiple policies and may span different components

Usage examples

List all initiatives in the system:

SELECT *
FROM initiatives
ORDER BY name;

Find initiatives owned by a specific person:

SELECT *
FROM initiatives
WHERE owner = 'security-team@example.com';

Get a list of initiatives and the number of policies within each:

SELECT 
  i.name AS initiative_name,
  i.description,
  COUNT(p.name) AS policy_count
FROM initiatives i
LEFT JOIN policies p ON i.name = p.initiative_name
GROUP BY i.name, i.description
ORDER BY policy_count DESC;
Previouscomponent_deltasNextpolicies

Last updated 17 hours ago

⚙️