Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions models/marts/dim_instructors.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
with instructors as (

select *
from {{ ref('stg_instructors') }}

),

final as (

select
instructor_id,
instructor_first_name,
instructor_last_name,

concat(instructor_first_name, ' ', instructor_last_name) as instructor_name,

speciality,
club_location

from instructors

)

select *
from final
37 changes: 37 additions & 0 deletions models/marts/dim_instructors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2

models:
- name: dim_instructors
description: "Final instructor dimension with one row per instructor."

columns:
- name: instructor_id
description: "Unique identifier for each instructor."
tests:
- not_null
- unique

- name: instructor_first_name
description: "Instructor first name."
tests:
- not_null

- name: instructor_last_name
description: "Instructor last name."
tests:
- not_null

- name: instructor_name
description: "Full instructor name."
tests:
- not_null
Comment on lines +21 to +27

- name: speciality
description: "Instructor speciality."
tests:
- not_null

- name: club_location
description: "Instructor club location."
tests:
- not_null
Loading