Skip to main 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

Fields

FieldTypeRequiredDescriptionValidators
namestrUnique report identifierminLen: 1, maxLen: 255
report_typestrReport execution mode: 'Code Report' (indie) or 'Analytics Report' (enterprise)-
data_sourceNoneData source adapter: SQL, Elastic, ClickHouse (for Analytics Reports)-
queryNoneReport query: SQL file path, SQL query, or Elastic DSL JSON-
enabledboolWhether the report is active-
parameters_schemaNone(
"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'}}"
) | - |

Permissions

RoleCreateDeleteReadWrite
Admin
Employee
Manager

Configuration

SettingValue
SubmittableFalse
Track ChangesTrue

Controller

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