Skip to content

Report

CQRS report configuration.

Defines reports that support zero-cliff scalability from
startup (Code Reports) to enterprise (Analytics with OLAP).
Attributes:
name: Unique report identifier
report_type: Report execution mode (Code Report or Analytics Report)
data_source: Data source adapter (SQL, Elastic, ClickHouse)
query: Report query (SQL file path, SQL query, or Elastic DSL)
enabled: Whether the report is active

Source: report.py

Field Type Required Description Validators
name str Unique report identifier minLen: 1, maxLen: 255
report_type str Report execution mode: ‘Code Report’ (indie) or ‘Analytics Report’ (enterprise) -
data_source None Data source adapter: SQL, Elastic, ClickHouse (for Analytics Reports) -
query None Report query: SQL file path, SQL query, or Elastic DSL JSON -
enabled bool Whether the report is active -
parameters_schema None (
"Parameter definitions keyed by field name. "
"Each value is a dict with keys: type (link|date|date_range|text|select), "
"resource (for link fields), label (display name). "
"Example: {'company': {'type': 'link', 'resource': 'Company', 'label': 'Company'}}"
) | - |
Role Create Delete Read Write
Admin
Employee
Manager
Setting Value
Submittable False
Track Changes True

Controller hooks are implemented in *_controller.py files. Available lifecycle hooks:

  • validate() - Called before save, raise exceptions for validation errors
  • before_insert() - Called before inserting a new document
  • after_insert() - Called after successfully inserting
  • before_save() - Called before saving (insert or update)
  • after_save() - Called after saving
  • before_delete() - Called before deleting
  • after_delete() - Called after deleting