Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lisätty urhammkoul ja kaksoistutkinto hakukohteeseen #66

Merged
merged 1 commit into from
Nov 7, 2024
Merged
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
8 changes: 6 additions & 2 deletions dbt/models/pub/pub_dim_hakukohde.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ int as (
end as tutkinnon_taso_sykli,
coalesce(
hako.koulutuksenalkamiskausi, (coalesce(haku.koulutuksenalkamiskausi, tote.koulutuksen_alkamiskausi))
) as koulutuksen_alkamiskausi
) as koulutuksen_alkamiskausi,
hako.toinenasteonkokaksoistutkinto as toinen_aste_onko_kaksoistutkinto,
coalesce(hako.jarjestaaurheilijanammkoulutusta,false) as jarjestaa_urheilijan_ammkoulutusta
from hakukohde as hako
left join toteutus as tote on hako.toteutus_oid = tote.toteutus_oid
left join haku as haku on hako.haku_oid = haku.haku_oid
Expand Down Expand Up @@ -106,7 +108,9 @@ final as (
when koulutuksen_alkamiskausi_tyyppi = 'alkamiskausi ja -vuosi' then koulutuksen_alkamisvuosi
when koulutuksen_alkamiskausi_tyyppi = 'tarkka alkamisajankohta' then date_part('year',koulutuksen_alkamispaivamaara)
end as koulutuksen_alkamisvuosi,
henkilokohtaisen_sunnitelman_lisatiedot
henkilokohtaisen_sunnitelman_lisatiedot,
toinen_aste_onko_kaksoistutkinto,
jarjestaa_urheilijan_ammkoulutusta
from step2
)

Expand Down
Loading