Skip to content
Draft
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
10 changes: 10 additions & 0 deletions models/staging/edfi_3/stage/stg_ef3__objective_assessments.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-- depends_on: {{ ref('base_ef3__objective_assessments') }}

with base_obj_assessments as (
select * from {{ ref('base_ef3__objective_assessments') }}
where not is_deleted
Expand Down Expand Up @@ -41,6 +43,14 @@ keyed as (
'lower(namespace)',
'lower(objective_assessment_identification_code)']
) }} as k_objective_assessment,
{{ dbt_utils.generate_surrogate_key(
['tenant_code',
'api_year',
'lower(academic_subject)',
'lower(assessment_identifier)',
'lower(namespace)',
'lower(parent_objective_assessment_reference:identificationCode::varchar)']
) }} as k_parent_objective_assessment,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we actually need some updates here to align with this fix branch #130

{{ gen_skey('k_assessment', extras = ['academic_subject']) }},
join_subject.*
{{ extract_extension(model_name=this.name, flatten=True) }}
Expand Down