Skip to content

Commit

Permalink
Merge pull request #69 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 20, 2024
2 parents 21610f9 + a79ed64 commit 75645ac
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions dbt/models/dw/_dw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ models:
data_type: integer
- name: dw_metadata_dw_stored_at
data_type: timestamp with time zone
- name: dw_sure_harkinnanvaraisuudet
- name: dw_sure_harkinnanvaraisuus
columns:
- name: hakemusoid
data_type: text
Expand All @@ -1123,7 +1123,7 @@ models:
data_type: integer
- name: dw_metadata_dw_stored_at
data_type: timestamp with time zone
- name: dw_sure_proxysuoritukset
- name: dw_sure_proxysuoritus
columns:
- name: hakemusoid
data_type: text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- set stage_model = ref('stg_sure_harkinnanvaraisuudet') -%}
{%- set stage_model = ref('stg_sure_harkinnanvaraisuus') -%}
{%- set key_columns_list = ['hakemusOid'] -%}

{{ generate_dw_model_muokattu(stage_model, key_columns_list) }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- set stage_model = ref('stg_sure_proxysuoritukset') -%}
{%- set stage_model = ref('stg_sure_proxysuoritus') -%}
{%- set key_columns_list = ['hakemusOid'] -%}

{{ generate_dw_model_muokattu(stage_model, key_columns_list) }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}}

with source as ( -- noqa: PRS
select * from {{ ref('dw_sure_harkinnanvaraisuudet') }} -- noqa: PRS
select * from {{ ref('dw_sure_harkinnanvaraisuus') }} -- noqa: PRS
), -- noqa: PRS

rows as (
Expand Down
2 changes: 1 addition & 1 deletion dbt/models/int/int_sure/int_sure_pohjakoulutus.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}}

with raw as (
select * from {{ ref('dw_sure_proxysuoritukset') }} where pohjakoulutus is not null
select * from {{ ref('dw_sure_proxysuoritus') }} where pohjakoulutus is not null
),

final as (
Expand Down
4 changes: 2 additions & 2 deletions dbt/models/sources/_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ sources:
description: |
Sisältää jokaiselle tiedostolle tiedon koska viimeisin dw-ajo on mennyt tuotannossa onnistuneesti läpi.
Raw- ja stg-kerroksista voidaan poistaa kaikki rivit jotka ovat tätä aikaleimaa vanhempaa
- name: sure_harkinnanvaraisuudet
- name: sure_proxysuoritukset
- name: sure_harkinnanvaraisuus
- name: sure_proxysuoritus
4 changes: 2 additions & 2 deletions dbt/models/stg/_stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ models:
data_type: character varying
- name: dw_metadata_file_row_number
data_type: integer
- name: stg_sure_harkinnanvaraisuudet
- name: stg_sure_harkinnanvaraisuus
columns:
- name: hakemusoid
data_type: text
Expand All @@ -546,7 +546,7 @@ models:
data_type: character varying
- name: dw_metadata_file_row_number
data_type: integer
- name: stg_sure_proxysuoritukset
- name: stg_sure_proxysuoritus
columns:
- name: hakemusoid
data_type: text
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with source as (
select * from {{ source('ovara', 'sure_harkinnanvaraisuudet') }}
select * from {{ source('ovara', 'sure_harkinnanvaraisuus') }}

{% if is_incremental() %}
where dw_metadata_dbt_copied_at > (select max(dw_metadata_dbt_copied_at) from {{ this }})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
with source as (
select * from {{ source('ovara', 'sure_proxysuoritukset') }}
select * from {{ source('ovara', 'sure_proxysuoritus') }}

{% if is_incremental() %}
where dw_metadata_dbt_copied_at > (select max(dw_metadata_dbt_copied_at) from {{ this }})
Expand Down

0 comments on commit 75645ac

Please sign in to comment.