Fact tables
Fact tables store quantitative information (measurements/metrics) about events (facts) based on users' activity on DataCamp.
The fact tables available are:
Events in the fact tables only include activity that occurred while the user was part of the group. This means that any events from before the user joined or after they left the group are not included in these tables. As a result, the recorded activity reflects only the period during which the user was associated with the group, rather than their complete history on the platform. This is an important distinction to keep in mind when aggregating metrics using fact tables, as the totals may not represent a user’s full learning journey on DataCamp.
fact_learn_events
This table captures learning events and user interactions on the platform.
These are the event types in this table:
Starts and completion events, arguably the most common, reflect content starts and/or completions:
assessment_startedandassessment_completedcourse_startedandcourse_completedchapter_startedandchapter_completedexercise_completedpractice_completedproject_startedandproject_completedtrack_startedandtrack_completedassignment_completedandassignment_completed_late– The assignment was completed on time (on or before the due date) or late (after the due date).assignment_assigned– The assignment was issued to the assignee.assignment_missed– The assignment was not completed before the due date.assignment_unassigned– The assignment was deleted after the creation.
When an assignment is missed, an
assignment_missedevent is logged. If the user later completes the assignment after the due date, anassignment_completed_lateevent is also recorded. In this case, both the missed and late completion events are preserved.
In assignment events, the duration_engaged and xp_earned columns remain NULL. Engagement time and XP are recorded through the learner’s interactions with the assigned content, such as course_engagement and assessment_engaged.
Engagement events that reflect user interaction with particular content, such as time spent and XP earned:
assessment_engagedcourse_engagementpractice_engagementproject_engagement
One-off XP events:
alpa_onboardingb2b_onboarding_xp_boost
We stopped awarding b2b_onboarding_xp_boost in October 2024
Most fact events are associated with a specific content item via the content_id column, which can be used to perform a join with the dim_content table. For track events, the track_version_id column is used (and the content_id column will be empty), which can be used to join with the dim_track table. Assignment events use assignment_id to join with dim_assignment and retrieve assignment details.
Every fact event has a occurred_at timestamp that determines when the event happened.
Additionally, content-specific fields will have data when the event is related to specific content types. For example, assessment_score will contain the assessment score for assessment_completed events.
For course-related and chapter-related events (e.g., course_started, course_completed, chapter_started, chapter_completed, course_engagement), the course_variant_id column identifies which variant the user interacted with. A user can start and complete both the Datacamp and AI Tutor variant of the same course, resulting in separate events for each variant. Use course_variant_id to filter or group by variant. Join with dim_course_variant for variant metadata.
user_id
The unique user identifier
date_id
The date identifier (YYYYMMDD)
content_id
The unique content identifier
course_variant_id
The course variant identifier. 1 = datacamp, 2 = ai-tutor. Populated for course and chapter events. Can be joined with dim_course_variant for variant details.
track_version_id
The unique track identifier
assignment_id
The unique assignment identifier
event_name
The name of the event
occurred_at
The timestamp when the event took place (UTC)
xp_earned
The XP earned on the event
duration_engaged
The time (in seconds) the user spent engaged with the particular content item
assessment_score
The assessment score (0-200)
assessment_percentile
The percentile that corresponds to the assessment score
assessment_knowledge_level
The skill level (Novice, Lower Intermediate, Upper Intermediate, Lower Advanced, Upper Advanced) that correlates to the assessment score
course_is_skipped
Determines whether the course was skipped. Only used for course_completed events.
Not all events in the fact learn events table will have a corresponding content item in dim_content. This is due to a limitation in our system, where some content items are hard deleted on our end. Despite this, we still include events related to these deleted content items in the fact table because they represent valuable user activity—users gained XP and spent time engaging with the content. Even if the content reference is missing, these events provide meaningful insights into user learning behavior and should not be excluded from reporting.
Please check the Domain Gotchas section for more details.
fact_certification_events
This table captures certification events and user interactions on the platform.
These are the event types in this table:
Certification milestone events
certification_registeredcertification_withdrawncertification_failedcertification_expiredcertification_granted
Certification component events
Attempts
certification_attempt_expiredcertification_out_of_attempts
Case Studies
certification_case_study_registeredcertification_case_study_presentation_submittedcertification_case_study_gradedcertification_case_study_failedcertification_case_study_passed
Project
certification_project_registeredcertification_project_passedcertification_project_failedcertification_project_expired
Skill Assessment
certification_skill_assessment_registeredcertification_skill_assessment_failedcertification_skill_assessment_passed
Every event is tied to a specific certification attempt. Use certification_id to join with dim_certification for certification metadata. Use attempt_id to stitch events that belong to the same attempt — the same attempt_id value is shared across the parent certification milestone events and all three component families (project, skill assessment, case study), so a full per-attempt funnel can be reconstructed by ordering events by occurred_at within an attempt_id.
Each component family emits a _registered event for every attempt the user starts, plus the corresponding outcome events (_passed, _failed, and where applicable _expired or _graded). This gives complete funnel coverage per attempt: which component the user started, which they finished, and how each outcome was reached.
user_id
The unique user identifier
date_id
The date identifier (YYYYMMDD)
certification_id
The unique certification identifier
event_name
The name of the event
xp_earned
The XP earned on the event
occurred_at
The timestamp when the event took place (UTC)
attempt_id
The unique certification attempt identifier
fact_datalab_events
This table captures events related to interactions within DataLab on the platform.
These are the event types in this table:
Workbook creation:
workspace_created
Engagement events that reflect interactions with DataLab workbooks:
workspace_publication_viewedworkspace_viewedWhen a user spends time viewing a DataLab workbook
workspace_visitedWhen a user spends time either viewing or editing a workbook
Please note that the workspace_viewed events are a subset of workspace_visited events. Only one of the two events should be used when calculating time spent on DataLab workbooks.
Most fact events are associated with a specific DataLab workbook via the workbook_id column. The workbook_id is used in the URL for the workbook. DataLab workbooks have the following URLs: https://www.datacamp.com/datalab/w/workbook_id.
Every fact event has a occurred_at timestamp that determines when the event happened.
user_id
The unique user identifier
date_id
The date identifier (YYYYMMDD)
workbook_id
The unique workbook identifier
event_name
The name of the event
occurred_at
The timestamp when the event took place (UTC)
duration_engaged
The time (in seconds) when the user was engaged with the workbook
workbook_source
Source of the workbook (e.g., dataset template, course continuation).
workbook_class
Class of the workbook (e.g., notebook, exploration).
fact_permission_events
This fact table captures permission, license and invite related events across the platform.
Event types in this table include:
Subscription:
subscription_started,subscription_ended(with related subscription metadata, e.g., license counts).License:
user_license_allocated,user_license_revoked.Invites:
invite_sent,invite_claimed,invite_withdrawn.
Each event is one row and carries an occurred_at timestamp indicating when the event happened.
team_id
The unique team identifier if the event is associated with a specific team
user_id
The unique user identifier if the event is associated with a specific user
The email of the person invited
date_id
The date identifier (YYYYMMDD)
event_name
The name of the event
occurred_at
The timestamp when the event took place (UTC)
invite_id
The unique invite identifier
is_active
Indicates whether the subscription or the license is currently active
product
Product the event is associated to, e.g. 'learn' or 'workspace'
license
License the event is associated to, e.g. 'enterprise', 'teams', etc...
slug
The product slug, e.g. 'learn.enterprise'
nb_licenses_purchased
The number of licenses purchased.
Last updated