# Metric

Schema reference for metric definitions and the evaluation results they produce.

### Metrics Table

**Table Name:** `metrics`\
**Description:** Metric definitions for evaluation and monitoring

{% tabs %}
{% tab title="Schema" %}

| Column                | Type           | Description                     |
| --------------------- | -------------- | ------------------------------- |
| `_id`                 | string         | Metric identifier               |
| `additional_notes`    | string         | Additional notes                |
| `applied_to_services` | array\<string> | Associated service IDs          |
| `created_at`          | timestamp      | Creation timestamp              |
| `creator`             | json           | Creator information             |
| `description`         | string         | Metric description              |
| `is_deleted`          | boolean        | Deletion status                 |
| `metric_value`        | json           | Value definition (type, bounds) |
| `name`                | string         | Metric name                     |
| `org_id`              | string         | Organization identifier         |
| `region_name`         | string         | Deployment region               |
| `tags`                | json           | Associated tags                 |
| `updated_at`          | timestamp      | Last update timestamp           |
| `updated_by`          | json           | Last updater ID                 |
| `metric_value_type`   | string         | Type of metric value            |
| {% endtab %}          |                |                                 |

{% tab title="Query Example" %}

```sql
SELECT
  name,
  description,
  applied_to_services,
  metric_value
FROM metrics
WHERE is_deleted = false;
```

{% endtab %}
{% endtabs %}

### Metric Evaluation Results Table

**Table Name:** `metric_evaluation_results`\
**Description:** Results from metric evaluations

{% tabs %}
{% tab title="Schema" %}

| Column          | Type      | Description             |
| --------------- | --------- | ----------------------- |
| `_id`           | string    | Evaluation result ID    |
| `created_at`    | timestamp | Creation timestamp      |
| `justification` | string    | Result justification    |
| `metric_id`     | string    | Associated metric ID    |
| `org_id`        | string    | Organization identifier |
| `region_name`   | string    | Deployment region       |
| `result`        | string    | Evaluation result       |
| `source`        | json      | Source information      |
| `source_type`   | string    | Type of source          |
| `updated_at`    | timestamp | Last update timestamp   |
| {% endtab %}    |           |                         |

{% tab title="Query Example" %}

```sql
SELECT
  metric_id,
  result,
  justification,
  source,
  created_at
FROM metric_evaluation_results
ORDER BY created_at DESC;
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amigo.ai/developer-guide/classic-api/data-access/organization-tables/metric.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
