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.
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
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.
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.
fact_certification_events
This table captures ordinary Certification events and the separate CPE skill-verification lifecycle.
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
CPE skill-verification events
skill_verification_started— The learner started the CPE assessment.skill_verification_completed— The learner completed the CPE assessment. Its timestamp is the reporting-period anchor for CPE activity.skill_verification_granted— The learner met the assessment and associated-course requirements and was awarded the certificate and CPE credits.skill_verification_failed— The CPE assessment attempt failed.
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.
CPE attempts use the same certification_id and attempt_id join pattern, but their lifecycle is independent from ordinary Certification events. The assessment and associated course can be completed in either order. Credits are populated only when the skill_verification_granted event is emitted.
user_id
The unique user identifier
date_id
The date identifier (YYYYMMDD)
certification_id
The unique certification or CPE skill-verification 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 or CPE skill-verification attempt identifier
cpe_exam_reported_score
The reported CPE assessment score. Populated on completed events, or on a failed event when no completion event exists; otherwise null
is_cpe_course_completed
Whether the learner completed the associated course at any time
cpe_course_completed_at
The first completion timestamp for the course associated with the CPE skill verification, populated only when completion occurred during group membership; otherwise null
cpe_credits_obtained
The credits awarded on a skill_verification_granted event; otherwise null
Filtering CPE in fact_certification_events
Because fact_certification_events holds events for both ordinary Certifications and CPE skill verifications, you can separate them either by event name or by joining with dim_certification:
Select only CPE events: Filter for event names starting with
skill_verification_(skill_verification_started,skill_verification_completed,skill_verification_granted,skill_verification_failed), or join withdim_certificationand filter forcertification_type = 'cpe'.Select only ordinary Certification events (excluding CPE): Filter for event names starting with
certification_(or exclude event names starting withskill_verification_), or join withdim_certificationand filter forcertification_type != 'cpe'.
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
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.
fact_ai_insights_disclosures
This table captures non-sensitive topics and AI-tool mentions during AI Tutor conversations.
For tool signals, each row is the first disclosure for a learner and displayed tool label while the learner was part of the group. For topic signals, each row is the first disclosure for a learner, AI Tutor step, and topic while the learner was part of the group.
discloser_id
The hashed identifier of the user
thread_id
The AI Tutor conversation identifier
slice_id
The hashed identifier of the conversation slice the signal came from
signal_type
The disclosure type: topic for a learner disclosure or tool for an AI-tool mention
step
The AI Tutor step associated with the disclosure: task, challenge, refinement need, or profiling
category
The assigned classification: a topic cluster for topic signals or a canonical tool label for tool signals
detail
The extracted disclosure for topic signals or the raw tool mention for tool signals
is_internal_tool
For tool signals, whether the mentioned tool is a company-internal bespoke tool. This is null for topic signals
occurred_at
The timestamp of the conversation's first message (UTC), used to scope the disclosure to group membership
generated_at
The timestamp when the disclosure signal was generated (UTC)
Last updated