Skip to content

Commit

Permalink
Merge pull request #71 from Opetushallitus/OK-729__SUREn-siirtotiedos…
Browse files Browse the repository at this point in the history
…toja

Ok 729  suren siirtotiedostoja
  • Loading branch information
razze76 authored Nov 27, 2024
2 parents 7932da7 + 1f17c5f commit bdbaa1a
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
18 changes: 14 additions & 4 deletions dbt/models/int/int_yleiskayttoiset/int_organisaatio_rakenne.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,19 @@ org (parent_oid, child_oid) as (
org2.organisaatio_oid as child_oid
from organisaatio as org2
inner join org as orga on orga.child_oid = org2.ylempi_organisaatio
),

final as (
select
parent_oid,
child_oid
from org
union
select
organisaatio_oid as parent_oid,
organisaatio_oid as child_oid
from organisaatio
)

select
parent_oid,
child_oid
from org
select * from final

1 change: 1 addition & 0 deletions dbt/models/pub/pub_dim_hakukohde.sql
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,4 @@ final as (
)

select * from final
order by haku_oid
1 change: 1 addition & 0 deletions dbt/models/pub/pub_dim_hakutoive.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ final as (
)

select * from final
order by haku_oid
3 changes: 2 additions & 1 deletion dbt/models/pub/pub_dim_organisaatio_rakenne.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ with source as (
select
parent_oid,
child_oid
from source
from source
order by 1,2
6 changes: 5 additions & 1 deletion dbt/models/pub/pub_fct_hakemus.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{{
config(
materialized = 'table'
materialized = 'table',
indexes = [
{'columns':['haku_oid']}
]
)
}}

Expand All @@ -23,3 +26,4 @@ int as (
)

select * from int
order by haku_oid

0 comments on commit bdbaa1a

Please sign in to comment.