> For the complete documentation index, see [llms.txt](https://enterprise-docs.datacamp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enterprise-docs.datacamp.com/integrating-our-data-into-your-tools-via-data-connector-2.0/migrating-from-data-connector-1.0.md).

# Migrating from Data Connector 1.0

If you are migrating from the previous version of Data Connector, this section is for you.

### Motivation

We are constantly improving our Enterprise reporting to gain insights and make tracking your users' progress on our platform even more straightforward.

The main change in Data Connector 2.0 is the data model. It is organized around core fact, dimension, and bridge tables, with metric tables for common reporting use cases.

This structure makes the data easier to query, adds mobile usage data, and makes it easier to build dashboards using your organization's BI tools.

Additionally, by moving to this improved data model, Data Connector now uses the same data as the rest of our Enterprise reporting. This allows for faster iteration and ensures that every report matches everywhere.

### What is changing?

#### Data Model

In version 1.0, we had a robust data model allowing a lot of granularity and detail. The downside is that it had a steeper learning curve.

We have simplified the model, going from this:

<figure><img src="https://562960931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkJKV1xpCBb6myYGAGdfV%2Fuploads%2Fgit-blob-a560aef3370936899f4aefb8899daf5ec0f2d707%2Ferdv1.svg?alt=media" alt=""><figcaption><p>Data Connector 1.0 Data Model</p></figcaption></figure>

To the model shown in the [Data Connector 2.0 ERD](/integrating-our-data-into-your-tools-via-data-connector-2.0/explore-the-data-model.md#data-connectors-erd).

Finding the correct table for your queries is now quicker and easier. Data Connector 2.0 exposes the core event model through fact, dimension, and bridge tables, and provides metric tables for common reporting use cases.

#### Improvements

Data Connector 2.0 now exposes 16 core fact, dimension, and bridge tables, plus 4 metric tables for common reporting use cases. It also includes mobile usage data and uses the same reporting source as the rest of Enterprise reporting.

<table><thead><tr><th></th><th align="center">Data Connector 1.0</th><th align="center" valign="middle">Data Connector 2.0</th></tr></thead><tbody><tr><td>Core fact, dimension, and bridge tables</td><td align="center">29 mart tables</td><td align="center" valign="middle">16 tables</td></tr><tr><td>Metric tables</td><td align="center">0</td><td align="center" valign="middle">4</td></tr><tr><td>Mobile data</td><td align="center">No</td><td align="center" valign="middle">Yes</td></tr><tr><td>Common reporting queries</td><td align="center">Usually require multiple joins</td><td align="center" valign="middle">Often use one metric table or one fact table</td></tr><tr><td>Enterprise reporting consistency</td><td align="center">No</td><td align="center" valign="middle">Yes</td></tr></tbody></table>

### Sample queries (1.0 vs. 2.0)

Comparing the SQL code required to answer the same question on both data models illustrates why we decided to change.

For example, let's calculate the total time in Learn content (assessments, courses, practices, and projects) between January 15 and February 14, 2025.

On Data Connector 1.0, you needed to do this:

```sql
WITH time_per_type AS (
        SELECT sum(time_spent) AS total_time_spent
        FROM data_connector_1234.exercise_fact
        WHERE date_id BETWEEN 20250115 AND 20250214

        UNION ALL

        SELECT sum(time_spent) AS total_time_spent
        FROM data_connector_1234.practice_fact
        WHERE date_id BETWEEN 20250115 AND 20250214

        UNION ALL

        SELECT sum(time_spent) AS total_time_spent
        FROM data_connector_1234.project_fact
        WHERE date_id BETWEEN 20250115 AND 20250214

        UNION ALL

        SELECT sum(time_spent) AS total_time_spent
        FROM data_connector_1234.assessment_fact
        WHERE date_id BETWEEN 20250115 AND 20250214
)

SELECT sum(total_time_spent) AS time_spent_seconds
FROM time_per_type
```

The granularity built into the model made it harder to answer more general questions that are frequently asked.

With Data Connector 2.0's model, the same question can be answered with the following query:

```sql
SELECT sum(duration_engaged) AS time_spent_seconds
FROM data_connector_1234.fact_learn_events
WHERE occurred_at BETWEEN TIMESTAMP '2025-01-15 00:00:00' AND TIMESTAMP '2025-02-14 23:59:59'
    AND event_name IN (
        'course_engagement',
        'practice_engagement',
        'project_engagement',
        'assessment_engaged'
    )
```

### What do I need to do to switch?

Data Connector 2.0 still uses AWS S3 buckets to hold your organization's data, so connecting to the new version is straightforward.

For more details, please refer to our [Getting started with Data Connector](https://enterprise-docs.datacamp.com/integrating-our-data-into-your-tools-via-data-connector-2.0/getting-started-with-data-connector-2.0) and [Using Data Connector](https://enterprise-docs.datacamp.com/integrating-our-data-into-your-tools-via-data-connector-2.0/using-data-connector-2.0) sections.
