> For the complete documentation index, see [llms.txt](https://resources.unizin.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://resources.unizin.org/products/data-and-analytics/unizin-data-platform/data-stores/data-lake/udp-event-store/expanded-table/expanded-table-canvas-edapp-mapping.md).

# Expanded table: Canvas edApp mapping

A feature of the expanded table is a consolidation or normalization of Canvas ed\_app values to allow for easier reporting. Canvas sends a variety of ed\_app values in its Caliper events data. For reporting purposes, it’s often useful to combine these events into a single representation of data generated from Canvas.

## Examples <a href="#expandedtable-canvasedappmapping-examples" id="expandedtable-canvasedappmapping-examples"></a>

### Unconsolidated edApp values <a href="#expandedtable-canvasedappmapping-unconsolidatededappvalues" id="expandedtable-canvasedappmapping-unconsolidatededappvalues"></a>

In the query example below, we display unconsolidated ed\_app values that may be found in the legacy event store table of the UDP.

```sql
SELECT
 ed_app,
 COUNT(id) AS num_events
FROM `udp-umich-prod.event_store.events`
WHERE
 (ed_app LIKE '%instructure%' OR ed_app LIKE '%canvas%')
 AND event_time >= '2021-06-01'
 AND event_time <= '2021-06-30'
GROUP BY ed_app
ORDER BY num_events DESC
LIMIT 10
```

Results:

<div align="left"><figure><img src="https://3709019308-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKYwtHNGgdPXS3PWAlZUr%2Fuploads%2Fgit-blob-c51d29512fa2ea8570dc10a609a1bd70d1e12331%2F36929539.png?alt=media&amp;token=bf26beb9-b96a-4c6f-ae94-f664b75e9c57" alt="Query results showing all events from University of Michigan&#x27;s UDP event store between June 1, 2021, and June 30, 2021"><figcaption></figcaption></figure></div>

This query pulled all events from University of Michigan's UDP event store between June 1, 2021, and June 30, 2021. The ed\_app values contain something related to “canvas” or “instructure.” In this example, the top 10 rows based on the number of events are returned. All of these events are generated from Canvas, but as we can see, the ed\_app values are very diverse.

Normalizing these ed\_app values can make event store reporting easier.

### Consolidated edApp values <a href="#expandedtable-canvasedappmapping-consolidatededappvalues" id="expandedtable-canvasedappmapping-consolidatededappvalues"></a>

In the query example below, we display the consolidated ed\_app values that may be found in the expanded event store.

```sql
SELECT
 ed_app.id,
 COUNT(id) AS num_events
FROM `udp-umich-prod.event_store.expanded`
WHERE
 (ed_app.id LIKE '%instructure%' OR ed_app.id LIKE '%canvas%')
 AND event_time >= '2021-06-01'
 AND event_time <= '2021-06-30'
GROUP BY ed_app.id
ORDER BY num_events DESC
LIMIT 10
```

Results:

<div align="left"><figure><img src="https://3709019308-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKYwtHNGgdPXS3PWAlZUr%2Fuploads%2Fgit-blob-fb26cdbbb6b106ebb2f05b05d42244067c3c0fc8%2F36929540.png?alt=media&amp;token=bd609d13-d7a6-441e-abe0-579dc8957b69" alt="Consolidated edApp query showing results"><figcaption></figcaption></figure></div>

This query considers the same window of events as the first example above, June 1 - June 30, 2021. Similarly, we search for the same conditions in the ed\_app, containing either “instructure” or “canvas.” This time, we see only two values returned for the same events in scope. These consolidated or "normalized" ed\_app values make reporting on Canvas events more straightforward.
