# Tool Usage Metrics Archive

The *tool\_usage\_metrics\_archive* mart is an archive of the [tool\_usage\_metrics](https://resources.unizin.org/products/data-and-analytics/unizin-data-platform/data-stores/data-marts/tool-usage-metrics/tool-usage-metrics) mart. Every hour, the current hour's records from the *tool\_usage\_metrics* mart are appended to this mart. This mart can be used to refer to prior hours of tool usage.&#x20;

**BQ Prod Dataset Locations**

* mart\_general

## Interactive Mart Dependency Diagram <a href="#user-content-schema" id="user-content-schema"></a>

The following visualization shows the construction of this data mart defined in the [UDP marts](https://gitlab.com/unizin-community/unizin-data-platform/marts) repository. More information on the repository and diagram can be found on [this marts page](https://resources.unizin.org/products/data-and-analytics/unizin-data-platform/data-stores/data-marts).

{% hint style="info" %}
[Click here to open the interactive chart.](https://assets.public.unizin.org/udp-marts/mart/mart__general__tool_usage_metrics_archive.svg)
{% endhint %}

<figure><img src="https://3709019308-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKYwtHNGgdPXS3PWAlZUr%2Fuploads%2Fak0J496ucZfB51JjGSk2%2Fmart__general__tool_usage_metrics_archive.svg?alt=media&#x26;token=b0ebc8bc-878b-48e7-b1fc-11623ccf5f76" alt=""><figcaption><p>mart_general.tool_usage_metrics_archive</p></figcaption></figure>

## Schema <a href="#user-content-schema" id="user-content-schema"></a>

### **mart/general/tool\_usage\_metrics\_archive**

| Field name                         | Type     | Description                                                                                                                                   |
| ---------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| ed\_app\_id                        | STRING   | The EdApp ID of the tool.                                                                                                                     |
| run\_hour                          | DATETIME | The date and hour of when the *tool\_usage\_metrics* mart was updated for the given record.                                                   |
| total\_events                      | INTEGER  | The total number of events associated with the tool as of the run hour.                                                                       |
| total\_events\_1hour               | INTEGER  | The total number of events for the tool in the previous hour as of the run hour.                                                              |
| total\_events\_6hour               | INTEGER  | The total number of events for the tool in the previous 6 hours as of the run hour.                                                           |
| total\_events\_12hour              | INTEGER  | The total number of events for the tool in the previous 12 hours as of the run hour.                                                          |
| total\_events\_day                 | INTEGER  | The total number of events for the tool over the past day as of the run hour.                                                                 |
| total\_events\_week                | INTEGER  | The total number of events for the tool over the past week as of the run hour.                                                                |
| total\_events\_month               | INTEGER  | The total number of events for the tool over the past month as of the run hour.                                                               |
| total\_events\_year                | INTEGER  | The total number of events for the tool over the past year as of the run hour.                                                                |
| earliest\_event\_time              | DATETIME | The overall earliest event time associated with the tool as of the run hour.                                                                  |
| latest\_event\_time                | DATETIME | The overall latest event time associated with the tool as of the run hour.                                                                    |
| earliest\_event\_time\_1hour       | DATETIME | The earliest event time for the tool in the previous hour as of the run hour.                                                                 |
| latest\_event\_time\_1hour         | DATETIME | The latest event time for the tool in the previous hour as of the run hour.                                                                   |
| earliest\_event\_time\_6hour       | DATETIME | The earliest event time for the tool in the previous 6 hours as of the run hour.                                                              |
| latest\_event\_time\_6hour         | DATETIME | The latest event time for the tool in the previous 6 hours as of the run hour.                                                                |
| earliest\_event\_time\_12hour      | DATETIME | The earliest event time for the tool in the previous 12 hours as of the run hour.                                                             |
| latest\_event\_time\_12\_hour      | DATETIME | The latest event time for the tool in the previous 6 hours as of the run hour.                                                                |
| earliest\_event\_time\_day         | DATETIME | The earliest event time for the tool over the past day as of the run hour.                                                                    |
| latest\_event\_time\_day           | DATETIME | The latest event time for the tool over the past day as of the run hour.                                                                      |
| earliest\_event\_time\_week        | DATETIME | The earliest event time for the tool over the past week as of the run hour.                                                                   |
| latest\_event\_time\_week          | DATETIME | The latest event time for the tool over the past week as of the run hour.                                                                     |
| earliest\_event\_time\_month       | DATETIME | The earliest event time for the tool over the past month as of the run hour.                                                                  |
| latest\_event\_time\_month         | DATETIME | The latest event time for the tool over the past month as of the run hour.                                                                    |
| earliest\_event\_time\_year        | DATETIME | The earliest event time for the tool over the past year as of the run hour.                                                                   |
| latest\_event\_time\_year          | DATETIME | The latest event time for the tool over the past year as of the run hour.                                                                     |
| num\_seconds\_since\_latest\_event | INTEGER  | The number of seconds since the latest event for the tool as of the run hour.                                                                 |
| num\_minutes\_since\_latest\_event | INTEGER  | The number of minutes since the latest event for the tool as of the run hour.                                                                 |
| num\_hours\_since\_latest\_event   | INTEGER  | The number of hours since the latest event for the tool as of the run hour.                                                                   |
| num\_days\_since\_latest\_event    | INTEGER  | The number of days since the latest event for the tool as of the run hour.                                                                    |
| hourly\_low\_events\_threshold     | INTEGER  | The number of events for an hour under which a tool is considered to have low hourly events and the `low_hourly_events_flag` is raised.       |
| six\_hr\_low\_events\_threshold    | INTEGER  | The number of events for 6 hours under which a tool is considered to have low 6 hour events and the `low_six_hr_events_flag` is raised.       |
| twelve\_hr\_low\_events\_threshold | INTEGER  | The number of events for 12 hours under which a tool is considered to have low 12 hour events, and the `low_twelve_hr_events_flag` is raised. |
| daily\_low\_events\_threshold      | INTEGER  | The number of events for a day under which a tool is considered to have low daily  events, and the `low_daily_events_flag` is raised.         |
| low\_hourly\_events\_flag          | INTEGER  | Flag indicating low event volume for the previous hour of events for the tool as of the run hour.                                             |
| low\_six\_hr\_events\_flag         | INTEGER  | Flag indicating low event volume for the previous 6 hours of events for the tool as of the run hour.                                          |
| low\_twelve\_hr\_events\_flag      | INTEGER  | Flag indicating low event volume for the previous 12 hours of events for the tool as of the run hour.                                         |
| low\_daily\_events\_flag           | INTEGER  | Flag indicating low event volume for the previous day of events for the tool as of the run hour.                                              |
| low\_events\_flag                  | INTEGER  | Flag indicating low event volume for the tool overall as of the run hour.                                                                     |
