From 1ad4e74f46d1fe9ce8c1cf54d455a5e608e5b551 Mon Sep 17 00:00:00 2001 From: Matz Rasmus Date: Wed, 27 Nov 2024 12:00:52 +0200 Subject: [PATCH] sqlfluff --- .../int_organisaatio_rakenne.sql | 15 +++++++-------- dbt/models/pub/pub_dim_hakukohde.sql | 2 +- dbt/models/pub/pub_dim_hakutoive.sql | 1 - dbt/models/pub/pub_dim_organisaatio_rakenne.sql | 4 ++-- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/dbt/models/int/int_yleiskayttoiset/int_organisaatio_rakenne.sql b/dbt/models/int/int_yleiskayttoiset/int_organisaatio_rakenne.sql index 894ee9e..1545332 100644 --- a/dbt/models/int/int_yleiskayttoiset/int_organisaatio_rakenne.sql +++ b/dbt/models/int/int_yleiskayttoiset/int_organisaatio_rakenne.sql @@ -13,17 +13,17 @@ with recursive organisaatio as ( org (parent_oid, child_oid) as ( select - ylempi_organisaatio as parent_oid, - organisaatio_oid as child_oid + ylempi_organisaatio as parent_oid, + organisaatio_oid as child_oid from organisaatio union all select - orga.parent_oid, - org2.organisaatio_oid as child_oid + orga.parent_oid, + org2.organisaatio_oid as child_oid from organisaatio as org2 - inner join org as orga on orga.child_oid = org2.ylempi_organisaatio + inner join org as orga on org2.ylempi_organisaatio = orga.child_oid ), final as ( @@ -33,10 +33,9 @@ final as ( from org union select - organisaatio_oid as parent_oid, - organisaatio_oid as child_oid + organisaatio_oid as parent_oid, + organisaatio_oid as child_oid from organisaatio ) select * from final - diff --git a/dbt/models/pub/pub_dim_hakukohde.sql b/dbt/models/pub/pub_dim_hakukohde.sql index e79b104..d8fc8c2 100644 --- a/dbt/models/pub/pub_dim_hakukohde.sql +++ b/dbt/models/pub/pub_dim_hakukohde.sql @@ -119,4 +119,4 @@ final as ( ) select * from final -order by haku_oid \ No newline at end of file +order by haku_oid diff --git a/dbt/models/pub/pub_dim_hakutoive.sql b/dbt/models/pub/pub_dim_hakutoive.sql index 6b93f1d..8ff8efd 100644 --- a/dbt/models/pub/pub_dim_hakutoive.sql +++ b/dbt/models/pub/pub_dim_hakutoive.sql @@ -53,4 +53,3 @@ final as ( ) select * from final -order by haku_oid \ No newline at end of file diff --git a/dbt/models/pub/pub_dim_organisaatio_rakenne.sql b/dbt/models/pub/pub_dim_organisaatio_rakenne.sql index 2b206b0..0824989 100644 --- a/dbt/models/pub/pub_dim_organisaatio_rakenne.sql +++ b/dbt/models/pub/pub_dim_organisaatio_rakenne.sql @@ -8,11 +8,11 @@ }} with source as ( - select * from {{ ref('int_organisaatio_rakenne') }} + select * from {{ ref('int_organisaatio_rakenne') }} ) select parent_oid, child_oid from source -order by 1,2 \ No newline at end of file +order by 1, 2