Skip to content

Commit c06ff28

Browse files
committed
clean up snowcap resource files. update dbt-coves template to not lower the source name. add config key above meta for marking policy tags
1 parent f992b3d commit c06ff28

8 files changed

Lines changed: 41 additions & 26 deletions

File tree

File renamed without changes.

secure/snowcap/resources/tag_masking_policies.yml renamed to secure/snowcap/resources_enterprise/masking__tag_policies.yml

File renamed without changes.
File renamed without changes.

secure/snowcap/resources_enterprise/row_access_policies.yml renamed to secure/snowcap/resources_enterprise/row_access__policies.yml

File renamed without changes.

secure/snowcap/resources_enterprise/role_grants__row_access.yml renamed to secure/snowcap/resources_enterprise/row_access__role_grants.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Role grants for row access policies
22
# These are only applied to enterprise accounts with row access policy support
33

4-
roles:
5-
- name: z_policy_row_region_de
6-
- name: z_policy_row_region_all
7-
84
role_grants:
95
# Grant RAP apply role to base analyst and transformer
106
- to_role: z_base__analyst
@@ -15,13 +11,10 @@ role_grants:
1511
roles:
1612
- z_rap__apply__country__iso_3
1713

18-
# Grant region-based row access to analyst role
14+
# Grant full row access to analyst role
1915
- to_role: analyst
2016
roles:
21-
- z_row_access__region__na
22-
- z_row_access__region__latam
23-
- z_row_access__region__emea
24-
- z_row_access__region__apac
17+
- z_policy_row_region_all
2518

2619
# Grant country-specific row access to DE analyst
2720
- to_role: de__analyst

secure/snowcap/resources_enterprise/row_access__roles.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ roles:
77
- name: z_row_access__region__latam
88
- name: z_row_access__region__emea
99
- name: z_row_access__region__apac
10+
- name: z_policy_row_region_all
1011

1112
# Hierarchy - grant country roles to region roles
1213
role_grants:
@@ -137,3 +138,10 @@ role_grants:
137138
- z_row_access__country_code__iso_3__tuv
138139
- z_row_access__country_code__iso_3__vnm
139140
- z_row_access__country_code__iso_3__vut
141+
142+
- to_role: z_policy_row_region_all
143+
roles:
144+
- z_row_access__region__na
145+
- z_row_access__region__latam
146+
- z_row_access__region__emea
147+
- z_row_access__region__apac

transform/.dbt_coves/templates/staging_model.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
with raw_source as (
22

33
select *
4-
from {% raw %}{{{% endraw %} source('{{ relation.schema.lower() }}', '{{ relation.name.lower() }}') {% raw %}}}{% endraw %}
4+
from {% raw %}{{{% endraw %} source('{{ relation.schema }}', '{{ relation.name }}') {% raw %}}}{% endraw %}
55

66
),
77

transform/models/L1_inlets/loans/stg_personal_loans.yml

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,23 @@ models:
1212
# config:
1313
# store_failures_as: view
1414
description: The state in which the borrower resides
15-
meta:
16-
masking_tag: pii
15+
config:
16+
meta:
17+
masking_tag: pii
1718
- name: annual_inc
1819
description: The borrower's annual income
19-
meta:
20-
masking_tag: pii
20+
config:
21+
meta:
22+
masking_tag: pii
2123
- name: collections_12_mths_ex_med
22-
description: Number of collections in the last 12 months excluding medical
24+
description:
25+
Number of collections in the last 12 months excluding medical
2326
collections
2427
- name: collection_recovery_fee
2528
description: Post charge off collection fee
2629
- name: delinq_2_yrs
27-
description: The number of 30+ days past-due incidences of delinquency in
30+
description:
31+
The number of 30+ days past-due incidences of delinquency in
2832
the borrower's credit file for the past 2 years
2933
- name: desc
3034
description: Loan description provided by the borrower
@@ -35,12 +39,14 @@ models:
3539
- name: emp_length
3640
description: Employment length in years
3741
- name: emp_title
38-
description: The job title supplied by the borrower when applying for the
42+
description:
43+
The job title supplied by the borrower when applying for the
3944
loan
4045
- name: funded_amnt
4146
description: The total amount committed to that loan at that point in time
4247
- name: funded_amnt_inv
43-
description: The total amount committed by investors for that loan at that
48+
description:
49+
The total amount committed by investors for that loan at that
4450
point in time
4551
- name: grade
4652
description: LC assigned loan grade
@@ -49,7 +55,8 @@ models:
4955
- name: initial_list_status
5056
description: The initial listing status of the loan
5157
- name: inq_last_6_mths
52-
description: The number of inquiries in past 6 months (excluding auto and
58+
description:
59+
The number of inquiries in past 6 months (excluding auto and
5360
mortgage inquiries)
5461
- name: installment
5562
description: The monthly payment owed by the borrower if the loan originates
@@ -84,7 +91,8 @@ models:
8491
- name: out_prncp
8592
description: Remaining outstanding principal for total amount funded
8693
- name: out_prncp_inv
87-
description: Remaining outstanding principal for portion of total amount funded
94+
description:
95+
Remaining outstanding principal for portion of total amount funded
8896
by investors
8997
- name: policy_code
9098
description: Publicly available
@@ -99,22 +107,26 @@ models:
99107
- name: revol_bal
100108
description: Total credit revolving balance
101109
- name: revol_util
102-
description: Revolving line utilization rate, or the amount of credit the
110+
description:
111+
Revolving line utilization rate, or the amount of credit the
103112
borrower is using relative to all available revolving credit
104113
- name: sub_grade
105114
description: LC assigned loan subgrade
106115
- name: term
107-
description: The number of payments on the loan. Values are in months and
116+
description:
117+
The number of payments on the loan. Values are in months and
108118
can be either 36 or 60
109119
- name: title
110120
description: The loan title provided by the borrower
111121
- name: total_acc
112-
description: The total num(#) of credit lines currently in the borrower's
122+
description:
123+
The total num(#) of credit lines currently in the borrower's
113124
credit file
114125
- name: total_pymnt
115126
description: Payments received to date for total amount funded
116127
- name: total_pymnt_inv
117-
description: Payments received to date for portion of total amount funded
128+
description:
129+
Payments received to date for portion of total amount funded
118130
by investors
119131
- name: total_rec_int
120132
description: Interest received to date
@@ -125,8 +137,10 @@ models:
125137
- name: url
126138
description: URL for the LC page with listing data
127139
- name: verification_status
128-
description: Indicates if income was verified by LC, not verified, or if the
140+
description:
141+
Indicates if income was verified by LC, not verified, or if the
129142
income source was verified
130143
- name: zip_code
131-
description: The first 3 numbers of the zip code provided by the borrower
144+
description:
145+
The first 3 numbers of the zip code provided by the borrower
132146
in the loan application

0 commit comments

Comments
 (0)