Skip to content

Commit 381db5f

Browse files
Linting
1 parent f431fb6 commit 381db5f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

models/claims_preprocessing/claims_enrollment/claims_enrollment__member_months.sql

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ with stg_eligibility as (
1414
, min(enrollment_start_date) as min_enrollment_start_date
1515
, max(enrollment_end_date) as max_enrollment_end_date
1616
from {{ ref('normalized_input__eligibility') }} as elig
17-
group by
17+
group by
1818
person_id
1919
, payer
2020
, {{ quote_column('plan') }}
@@ -30,7 +30,8 @@ with stg_eligibility as (
3030
from {{ ref('reference_data__calendar') }}
3131
group by year, month, year_month
3232
)
33-
select
33+
34+
select
3435
-- Generate a unique key for each member month
3536
dense_rank() over (
3637
order by
@@ -43,12 +44,12 @@ select
4344
, a.person_id
4445
-- As a temporary fix, we are nulling out member_id to get to the grain we want.
4546
-- In a future release we will remove this field.
46-
, cast(null as {{ dbt.type_string() }}) as member_id
47+
, cast(null as {{ dbt.type_string() }}) as member_id
4748
, b.year_month
4849
, a.payer
4950
, a.{{ quote_column('plan') }}
5051
, a.data_source
5152
from stg_eligibility as a
5253
inner join month_start_and_end_dates as b
5354
on a.min_enrollment_start_date <= b.month_end_date
54-
and a.max_enrollment_end_date >= b.month_start_date
55+
and a.max_enrollment_end_date >= b.month_start_date

0 commit comments

Comments
 (0)