Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/bcgov/nr-dap-dlh
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikas Grover authored and Vikas Grover committed Feb 15, 2024
2 parents f9f093c + a6b77cc commit 69b4f20
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 16 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/dal/extract_permits.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
target_schema='pmt_dal',
strategy='check',
unique_key='unqid',
check_cols=['ministry_code','business_area_code','permit_status_code','permit_status_date','permit_issue_date','app_received_date','app_update_dateapp_update_date','app_decision_date','app_issuance_date','app_accepted_date','app_rejected_date','app_adjudication_date','harvest_area_sq_m','harvest_auth_status','map_feature_id','permit_type_code','src_sys_description','ministry_description','business_area_description','authorization_status_description','permit_status_description','org_unit_description','permit_type_description']
check_cols=['ministry_code','business_area_code','permit_status_code','permit_status_date','permit_issue_date','app_received_date','app_update_dateapp_update_date','app_decision_date','app_issuance_date','app_accepted_date','app_rejected_date','app_adjudication_date','harvest_area_sq_m','harvest_auth_status','map_feature_id','permit_type_code','src_sys_description','ministry_description','business_area_description','authorization_status_description','permit_status_description','org_unit_description','permit_type_description'],
invalidate_hard_deletes=True,
bind=False,
)
Expand Down
2 changes: 1 addition & 1 deletion pmt/dbt/pmt_dbt/snapshots/dpl/dim_authorization_status.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ select * from rrs_rup_data

union ALL
select * from rrs_rp_data
;


{% endsnapshot %}
2 changes: 1 addition & 1 deletion pmt/dbt/pmt_dbt/snapshots/dpl/dim_business_area.sql
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ with corp_data as (
--insert into pmt_dpl.dim_business_area
select *
from corp_data
;


{% endsnapshot %}
2 changes: 1 addition & 1 deletion pmt/dbt/pmt_dbt/snapshots/dpl/dim_location.sql
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ select * from rrs_rup_data

union ALL
select * from rrs_rp_data
;


{% endsnapshot %}
2 changes: 1 addition & 1 deletion pmt/dbt/pmt_dbt/snapshots/dpl/dim_ministry.sql
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ with corp_data as (
--insert into pmt_dpl.dim_ministry
select * from corp_data
where ministry_code is not null
;


{% endsnapshot %}
2 changes: 1 addition & 1 deletion pmt/dbt/pmt_dbt/snapshots/dpl/dim_permit_status.sql
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ select * from rrs_rup_data

union ALL
select * from rrs_rp_data
;



{% endsnapshot %}
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -56,6 +56,6 @@ select * from rrs_rup_data

union ALL
select * from rrs_rp_data
;


{% endsnapshot %}
12 changes: 6 additions & 6 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 All @@ -67,6 +67,6 @@ select * from rrs_rup_data

union ALL
select * from rrs_rp_data
;


{% endsnapshot %}
2 changes: 1 addition & 1 deletion pmt/dbt/pmt_dbt/snapshots/dpl/dim_source_system.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ with corp_data as (
)
--insert into pmt_dpl.dim_source_system
select * from corp_data
;


{% endsnapshot %}
2 changes: 1 addition & 1 deletion pmt/dbt/pmt_dbt/snapshots/dpl/fact_permits.sql
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,6 @@ union ALL
select * from rrs_rup_data
union ALL
select * from rrs_rp_data
;


{% endsnapshot %}

0 comments on commit 69b4f20

Please sign in to comment.