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.
Some event types in this table:
Completion events, arguably the most common, reflect content completions, i.e.,
course_completed
,assessment_completed
,project_completed
, etc.Engagement events that reflect user interaction with particular content, such as time spent and XP earned. Examples:
course_engagement
,project_engagement
, etc.One-off XP events, such as
alpa_onboarding
andb2b_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.
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.
group_id
The unique group identifier
user_id
The unique user identifier
date_id
The date identifier (YYYYMMDD)
content_id
The unique content identifier
track_version_id
The unique track 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, Intermediate, Advanced) that correlates to the assessment score
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.
Some event types in this table:
Certification milestone events like
certification_registered
,certification_failed
,certification_withdrawn
, etc.Certification component events like
certification_case_study_passed
,certification_project_registered
, etc.
Most fact events are associated with a specific certification attempt via the certification_id
column, which can be used to perform a join with the dim_certification
table. Every time a user attempts a certification, they are assigned a unique attempt_id.
Every fact event has a occurred_at
timestamp that determines when the event happened.
group_id
The unique group identifier
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
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.
Some event types in this table:
Engagement events that reflect interactions with DataLab workbooks like
workspace_viewed
,workspace_visited
, etc.
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.
group_id
The unique group identifier
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
fact_permission_events
This fact table captures permission-related events on the platform. It includes various events, such as subscription starts and ends for a group and related information like the number of licenses purchased.
Event types in this table:
Subscription-related events like
subscription_started
andsubscription_ended
.
Every fact event has a occurred_at
timestamp that determines when the event happened.
group_id
The unique group identifier if the event is associated with the group
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
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 is currently active
nb_licenses_purchased
The number of licenses purchased
Last updated