Skip to content

Commit

Permalink
modified the missing columns in dim_project -- Location to project_lo…
Browse files Browse the repository at this point in the history
…cation_code

region-name --> project_name-description  as per the DDL
Wrong check col mentioned in dim_permit_type
  • Loading branch information
vishreddy01 committed Feb 15, 2024
1 parent 80b097c commit a6b77cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions pmt/dbt/pmt_dbt/.user.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
id: 73d3947f-0ec5-49b5-954b-e94a2de7e735
2 changes: 1 addition & 1 deletion pmt/dbt/pmt_dbt/snapshots/dpl/dim_permit_type.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
target_schema='pmt_dpl',
strategy='check',
unique_key='unqid',
check_cols=['permit_status_description'],
check_cols=['permit_type_description'],
invalidate_hard_deletes=True,
bind=False,
)
Expand Down
10 changes: 5 additions & 5 deletions pmt/dbt/pmt_dbt/snapshots/dpl/dim_project.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
target_schema='pmt_dpl',
strategy='check',
unique_key='unqid',
check_cols=['project_name','location','project_status_code','region_name'],
check_cols=['project_name','project_location_code','project_status_code','project_region_description'],
invalidate_hard_deletes=True,
bind=False,
)
Expand All @@ -16,7 +16,7 @@ with ats_data as (
prj.project_id:: varchar(20),
--replace(replace(prj.location::text, chr(10), NULL::text), chr(13), NULL::text) AS project_location, ---not sure what these replace values are supposed to do? returns null
prj.project_name,
prj.location,
prj.location as project_location_code,
prj.project_status_code,
amfr.region_name as project_region_description,
'ATS' || '|'|| coalesce(cast(prj.project_id as varchar),'~') as unqid
Expand All @@ -30,7 +30,7 @@ fta_data as (
Select distinct 'FTA' as src_sys_code
,null as project_id
,null as project_name
,null as location
,null as project_location_code
,null as project_status_code
,null as project_region_description
,'FTA' || '|'|| coalesce(cast(null as varchar(5)),'~') as unqid
Expand All @@ -41,7 +41,7 @@ rrs_rp_data as (
Select 'RRS_RP' as src_sys_code
,null as project_id
,null as project_name
,null as location
,null as project_location_code
,null as project_status_code
,null as project_region_description
,'RRS_RP' || '|'|| coalesce(cast(null as varchar(5)),'~') as unqid
Expand All @@ -51,7 +51,7 @@ rrs_rup_data as (
Select 'RRS_RUP' as src_sys_code
,null as project_id
,null as project_name
,null as location
,null as project_location_code
,null as project_status_code
,null as project_region_description
,'RRS_RUP' || '|'|| coalesce(cast(null as varchar(5)),'~') as unqid
Expand Down

0 comments on commit a6b77cc

Please sign in to comment.