TM Learnings
1. Dataset Name
tm_learnings_v2
2. Description
An upskilling-activity-level dataset that combines three learning and development sources into a single unified table: course completions from the LMS, project-based upskilling from team membership records, and development plan completions. Each row represents one upskilling activity, including the source type, completion date, associated skill, and full employee context. This dataset powers course completion counts, unique participant counts, skills gained, and monthly trend metrics on the TM Skills dashboard.
3. Source Tables
- customer_views.course_attendance (Course branch — LMS course completion records, UNNEST on courses.skills_json for skill extraction, LEFT JOIN to customer_views.courses for course metadata)
- customer_views.project_teammembers_details (Project branch — project team member completion records, WHERE project_completed_ts IS NOT NULL)
- customer_views.profile_upskilling (Upskilling branch — development plan completions, UNNEST on calibration_json for skill extraction)
- customer_views.employee (aliased c — joined to all three branches on profile_id to enrich with employee context; joined twice in the outer CTE structure)
4. Grain
One row per upskilling activity per employee per skill per source type. Because skills are unnested from JSON arrays in the Course and Upskilling branches, a single course with three associated skills will produce three rows. The source_type column ('Course', 'Project', 'Upskilling') distinguishes which UNION ALL branch each row originates from.
5. Dashboards Supported
- TM Skills Dashboard
6. Metrics Supported
| Metric | Supported Breakdowns |
| Courses, Projects and Development Plans Completed | location_country, seniority, business_unit, lob |
| Skills Added by Upskilling | business_unit, lob, location_country, seniority |
| Employees who Completed Courses, Projects, Development plans | business_unit, lob, seniority, location_country, source_type |
| Monthly Trend in Employees Completing Projects | seniority, location_country, lob, business_unit |
| Employees who Completed Projects- Business Unit | location_country, seniority, lob |
| Employees who Completed Courses | location_country, seniority, lob, business_unit |
| Employees who Completed Projects | project_teammember_lob, project_teammember_seniority, project_teammember_business_unit, project_teammember_location_country |
| Employees who Completed Development Plan | business_unit, location_country, seniority, lob |
| Employees who Completed Development Plan- Business Unit | location_country, seniority, lob |
7. Known Exclusions / Filters Applied
- Course branch: WHERE completion_date IS NOT NULL in course_attendance. Skills are UNNEST'd from courses.skills_json — rows without matching course skills will not appear. completion_percentage is hardcoded to 1 for all course rows (fully completed by definition of having a completion_date).
- Project branch: WHERE project_completed_ts IS NOT NULL in project_teammembers_details. completion_percentage is hardcoded to 1. project_completed_ts is used as the completion_date for this branch.
- Upskilling branch: no explicit completion filter in the UNION ALL — filtering to fully completed activities (completion_percentage = 1.0) is applied at the widget level via implicit_filters. Skills are UNNEST'd from calibration_json.
- source_type is a derived column: 'Course' (course_attendance branch), 'Project' (project_teammembers_details branch), 'Upskilling' (profile_upskilling branch). Available as a drilldown dimension for combined completion metrics.
- The employee context (business_unit, lob, location_country, seniority, etc.) is joined from employee via profile_id. Project-branch rows carry both employee-level and project-team-member-level attributes (prefixed project_teammember_*).
- Employees who Completed Development Plan - All Time and its Business Unit breakdown have no date range filter applied — they are all-time snapshots. All other metrics filter by completion_date (Course/Upskilling) or project_end_ts (Project).
8. Schema
| Column Name | Data Type | Notes |
| profile_id | bigint | Employee's profile identifier. Sourced from course_attendance or profile_upskilling; project_teammember_profile_id for the Project branch, resolved via employee join. |
| use_profile_id | bigint | Alias for profile_id in the activity record (a.profile_id). COUNT DISTINCT grain for participant counts in combined completion metrics. |
| employee_id | varchar | Employee identifier; sourced from employee |
| business_unit | varchar | Business unit of the employee; sourced from employee |
| lob | varchar | Line of business; sourced from employee |
| location_country | varchar | Employee's country; sourced from employee |
| seniority | varchar | Employee's seniority level; sourced from employee |
| gender | varchar | Employee's gender; sourced from employee |
| race | varchar | Employee's race/ethnicity; sourced from employee |
| source_type | varchar | Derived: 'Course' (course_attendance branch), 'Project' (project_teammembers_details branch), 'Upskilling' (profile_upskilling branch). Available as a drilldown dimension. |
| completion_date | datetime | Activity completion date. course_attendance.completion_date (Course); project_completed_ts from project_teammembers_details (Project); updated_at from profile_upskilling (Upskilling). NULL for Project rows (which use project_end_ts for date filtering). |
| lms_course_id | varchar | LMS course identifier (Course branch) or plan_assignment_id cast to varchar (Upskilling branch) or project_id (Project branch); sourced from course_attendance or respective branch. COUNT DISTINCT grain for total completions metric. |
| plan_id | varchar | Development plan identifier; sourced from profile_upskilling. NULL for Course and Project rows. |
| skill_name | varchar | Skill associated with the completed activity. UNNEST'd from courses.skills_json (Course), project_skill from project_teammembers_details (Project), UNNEST'd from calibration_json in profile_upskilling (Upskilling). |
| completion_percentage | double | Proportion completed. Hardcoded to 1 for Course and Project branches. CAST(completion_percentage AS FLOAT) from profile_upskilling for Upskilling branch. Widget-level implicit filter: IN ('1.0') applied for Upskilling. |
| title | varchar | Course or project title. course_attendance.title (Course), project_title (Project), NULL (Upskilling). |
| category | varchar | Course category; sourced from courses.category. NULL for Project and Upskilling rows. |
| project_id | varchar | Project identifier; sourced from project_teammembers_details. NULL for Course and Upskilling rows. |
| project_end_ts | datetime | Project end timestamp; sourced from project_teammembers_details. Used for date-range filtering in Project branch metrics. |
| project_start_ts | datetime | Project start timestamp; sourced from project_teammembers_details |
| project_completed_ind | bigint | Flag (0/1) indicating project completion; sourced from project_teammembers_details |
| project_teammember_profile_id | bigint | Profile ID of the project team member; sourced from project_teammembers_details. COUNT DISTINCT grain for Employees who Completed Projects. |
| project_teammember_business_unit | varchar | Business unit of the project team member; sourced from project_teammembers_details |
| project_teammember_lob | varchar | Line of business of the project team member; sourced from project_teammembers_details |
| project_teammember_location_country | varchar | Country of the project team member; sourced from project_teammembers_details |
| project_teammember_seniority | varchar | Seniority of the project team member; sourced from project_teammembers_details |
| project_teammember_gender | varchar | Gender of the project team member; sourced from project_teammembers_details |
| project_teammember_race | varchar | Race/ethnicity of the project team member; sourced from project_teammembers_details |