measure


Description

{“what”:“Definitions of computed metrics, each tied to a table and entity.”,“why”:“Without it, metrics cannot be defined, versioned, or shared across the system.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:36.672818693+00:00”}

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id int4 10 √ null

{“what”:“Unique integer identifier for each measure row.”,“why”:“Without it, rows cannot be uniquely referenced by foreign keys or updates.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:36.786819904+00:00”}

table_id int4 10 null
metabase_table.id fk_measure_ref_table_id C

{“what”:“Integer identifier of the database table the measure is defined on.”,“why”:“Without it, the measure’s scope is unknown, so it cannot be computed.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:36.812386602+00:00”}

creator_id int4 10 null
core_user.id fk_measure_ref_creator_id C

{“what”:“Integer identifier of the user who created the measure.”,“why”:“Without it, ownership and audit trail for the measure is lost.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:36.859806103+00:00”}

name varchar 254 null

{“what”:“Short human-readable name for the measure, e.g., ‘Total Revenue’.”,“why”:“Without it, measures cannot be displayed or referenced in UI/API.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:36.885268535+00:00”}

description text 2147483647 √ null

{“what”:“Free-form text explaining the measure’s purpose or calculation.”,“why”:“Without it, context for future maintainers is missing.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:37.024936024+00:00”}

archived bool 1 false

{“what”:“Flag indicating whether the measure is soft-deleted (true) or active (false).”,“why”:“Without it, inactive measures would still appear in lists and computations.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:37.109303773+00:00”}

definition text 2147483647 null

{“what”:“The actual formula or SQL expression that computes the measure.”,“why”:“Without it, the measure cannot be evaluated.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:37.143878613+00:00”}

created_at timestamptz 35,6 null

{“what”:“UTC timestamp when the measure row was inserted.”,“why”:“Without it, creation time is unknown, affecting audit and ordering.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:37.178529095+00:00”}

updated_at timestamptz 35,6 null

{“what”:“UTC timestamp of the last update to the measure row.”,“why”:“Without it, stale definitions cannot be detected.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:37.247966211+00:00”}

entity_id bpchar 21 √ null

{“what”:“Character code identifying the entity type the measure applies to (e.g., ‘order’).”,“why”:“Without it, measures cannot be filtered by entity type.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:37.297198485+00:00”}

dependency_analysis_version int4 10 0

{“what”:“Integer version number for the measure’s dependency analysis, incremented on changes.”,“why”:“Without it, cached analysis results may be stale.”,“by”:“fleet-annotator-worker”,“at”:“2026-09-23T04:08:37.324985346+00:00”}

Indexes

Constraint Name Type Sort Column(s)
measure_pkey Primary key Asc id
idx_measure_creator_id Performance Asc creator_id
idx_measure_table_id Performance Asc table_id
measure_entity_id_key Must be unique Asc entity_id

Relationships