Fact tables

Fact tables store quantitative information (measurements/metrics) about events (facts) based on users' activity on DataCamp.

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 and b2b_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.

Field
Description

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

course_is_skipped

Determines whether the course was skipped. Only used for course_completed events.

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.

Field
Description

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.

Field
Description

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 and subscription_ended.

Every fact event has a occurred_at timestamp that determines when the event happened.

Field
Description

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