# Migrating from UDW to UDP

The [UDP 2.0.53 release](/products/data-and-analytics/unizin-data-platform/release-notes/2.0.53-all-canvas-native-data.md) introduced a new feature whereby all Canvas-native data, independent of whether it can be joined with SIS data, is imported into the UDP context store. This means that Unizin member institutions may begin migrating their reports, applications, and other dependencies on the [Unizin Data Warehouse (UDW)](/products/data-and-analytics/unizin-data-warehouse.md) to the [UDP Context store](/products/data-and-analytics/unizin-data-platform/data-stores/data-lake/udp-context-store.md).

To facilitate the transition from the Canvas Data 1.0 schema (which is supported by the UDW) to the Unizin Common Data Model, we recommend using a [mapping document](https://docs.udp.unizin.org/ucdm/canvas-to-ucdm.html). In the [mapping file](https://docs.udp.unizin.org/ucdm/canvas-to-ucdm.html), every Canvas Data 1 table and column is matched to a UCDM entity and element.

For example, this query in the UDW:

Becomes the following query in the UDP Context store:

{% code title="UDW Query" %}

```sql
WITH course_modules AS (
	SELECT
    md.course_id AS course_id
    , COUNT(1) AS num_modules
  FROM
    module_dim AS md
  WHERE
    workflow_state = 'active'
  GROUP BY
    md.course_id
)

SELECT
  cd.code AS course_code
  , cd.name AS course_name
  , cm.num_modules AS num_modules
FROM
  course_dim AS cd
LEFT JOIN course_modules AS cm ON cd.id=cm.course_id
;
```

{% endcode %}

Becomes the following query in the UDP Context store:

{% code title="UDP Query" %}

```sql
WITH course_offering_modules AS (
  SELECT
    m.course_offering_id AS course_offering_id
    , COUNT(1) AS num_modules
  FROM
    entity.module AS m
  WHERE
    status = 'active'
  GROUP BY
    m.course_offering_id
)

SELECT
  co.subject AS course_subject
  , co.number AS course_number
  , co.title AS course_title
  , com.num_modules AS num_modules
FROM
  entity.course_offering AS co
LEFT JOIN course_offering_modules AS com ON co.course_offering_id=com.course_offering_id
;
```

{% endcode %}


---

# 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://resources.unizin.org/products/data-and-analytics/unizin-data-platform/miscellaneous/migrating-from-udw-to-udp.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.
