Skip to main content

Metric table

A metric table with its full definition.

idstring

ID of the metric table.

table_schemastring

Schema.

table_namestring

Table name.

grainstring

How much time one row covers.

Possible values: [hour, day, week, month, quarter, year, single_number]

columns object[]

Columns and their roles.

  • Array [
  • idstring

    ID of the column.

    column_namestring

    Warehouse column name.

    Example: revenue
    rolestring

    What the column holds.

    Possible values: [time, metric_value, dimension, identifier, ignored]

    metric_namestringnullable

    Name of the metric, required for metric_value columns.

    Example: Revenue
    roll_upstringnullable

    How a metric_value column adds up into longer periods.

    Possible values: [add_up, latest_value, earliest_value, average, median, p75, p90, min, max, no_roll_up]

    entitystringnullable

    Entity an identifier column identifies.

    Example: user
    linked_event_propertystringnullable

    Event property a dimension column matches, so filters can apply to both.

  • ]
  • disabledboolean

    Disabled tables are not indexed or queried.

    needs_reindexboolean

    The definition changed since the last indexing.

    last_indexed_atstringnullable

    When the table was last indexed, ISO 8601.

    last_indexing_errorstringnullable

    Error of the last indexing.

    last_detected_grainstringnullable

    Grain found in the data at the last indexing.

    Possible values: [hour, day, week, month, quarter, year, single_number]

    Metric table
    {
    "id": "string",
    "table_schema": "string",
    "table_name": "string",
    "grain": "hour",
    "columns": [
    {
    "id": "string",
    "column_name": "revenue",
    "role": "time",
    "metric_name": "Revenue",
    "roll_up": "add_up",
    "entity": "user",
    "linked_event_property": "string"
    }
    ],
    "disabled": true,
    "needs_reindex": true,
    "last_indexed_at": "string",
    "last_indexing_error": "string",
    "last_detected_grain": "hour"
    }